How do you set up the space $L^2(S^1)$ and what is integration on this space. The Set up:
Let $S^1=\{e^{2\pi ix}\|x\in[0,1) \}$. Now we endow this space with the Lebesgue measure, which is defined as follows. $\mu(A)=m(f^{-1}(A))$ where $A \subseteq S^1$ $f(x)=e^{2\pi i x}$ and $m$ is the lebesgue measure on $[0,1)$. Now let $g:S^1 \to \mathbb{C}$. Then we can write $g(z)=h(z)+ik(z)$ then $\int_{S^1}g(z)d\mu=\int_{S^1}h(z)d\mu+i\int_{S^1}k(z)d\mu$ Now $h,z$ are real valued so we can the standard way to assign values to this integrals (using simple functions)
The problem:
I thinks all of this works in theory. But I do not know how to apply this in practice. Let us take the function $z^n$ what is $\int_{S^1}z^n$ ? All of this confusion was sparked by trying to understand why $\{z^n,n\in \mathbb{Z}\}$ is an orthonormal basis of $L^2(S^1)$ which made me realize I do not fully understand how to compute the integral $\int_{S^1}|z|^n\overline z=\int_{S^1}\overline z$ (since $|z|=1$). I would appreciate any clarification.
 A: Per my comment above I assumed an answer would be soon forthcoming, but it wasn't, so here goes. A few introductory comments.
Comment 1.  The Wikipedia page https://en.wikipedia.org/wiki/Pushforward_measure gives an OK explanation of aspects of the concept with reference to further resources and proofs.  Note that it even gives your example as an example (although I don't know how you could have found it if you didn't know the terminology).  If you have a textbook on measure theory (or a textbook treating integration in some degree of generality, perhaps just on $\mathbb{R}^n$ or $\mathbb{C}$), you might want to compare the Wikipedia treatment to your own resource and assure yourself that you understand the differences or similarities, particularly if this is for purposes that involve presentation to others who have not visited other resources and may not want to be referred to resources they have not seen.  I would caution anybody against using Wikipedia or results in random textbooks as "black box" authority where you can just plug in inputs and receive results; if the point of the problem is to engage with the technical particulars of push-forward measures (or what in this context might sometimes be called a "change of variables") directly, the above page and its references may nevertheless guide you further and help you deal with that.
Comment 1.5. In the context of nice mappings from simple spaces to one another, this whole "push forward" measure thing is the good old calculus change of variables formula. It might be worth thinking more about this later.  Sometimes measure theory is taught as though it's completely separate from anything that may have preceded it in a course sequence.  It's really not.
Comment 2.  I note that while your question refers to a set as being an "orthonormal" basis of $L^2(S^1)$, and hence implicitly references an inner product and notion of orthogonality, your question does not explicitly specify the inner product at issue.  This is fine, because the inner product on the $L^2$ space of a measure space is a very standard thing.  But should you have a textbook or course notes, it is possible that more information on this topic and citable results other than Wikipedia will be found around the definition of the inner product, whether in $L^2$ spaces in general or in $L^2(S^1)$ in particular.
OK, no more comments.  From its definition, the measure $\mu$ as defined in your problem is seen to be the "pushforward" (as defined on Wikipedia) of Lebesgue measure via the map $f$.  So for any $g$ on $\mathbb{T}$ we have
$$
\int_{S^1} g \, d\mu = \int_0^1 g \circ f \, d\lambda
$$
Where $\lambda$ is the usual Lebesgue measure.  And of course integrating a continuous function with respect to that (whether real or complex valued) is just boring old calculus integration, which as you note in the complex-valued case can be broken into real and imaginary parts of even more boring old real-valued calculus integration.
If $z$ is the usual identity function on $\mathbb{T}$ then for any integers $n, m$ you have
$$
\int_{S^1} z^n \overline{z^m} \, d\mu = \int_0^1 e^{2\pi int} e^{-2 \pi imt} \, dt
$$
Because $\overline{z^m} = 1/z^m$ on $\mathbb{T}$ and when you plug $f(t)$ into $z^n$ and $1/z^m$ and use properties of the exponential function you get $(e^{2\pi i t})^n = e^{2 \pi i nt}$ and $1/(e^{2\pi i t})^m = e^{-2\pi imt}$ respectively.  By more properties of the exponential function the integrand "simplifies" to $e^{2\pi i (n-m) t}$.
Now we're in the territory of previously answered questions such as Showing that complex exponentials of the Fourier Series are an orthonormal basis, in which the need to distinguish the case $n \neq m$ arises from the fact that one needs $k$ nonzero to use $\frac{1}{k} e^{kt}$ for an antiderivative for $e^{kt}$.  The calculation and comments there explain why when $n \neq m$ the result is $0$.  When $n=m$, the calculation is simpler: we're integrating $e^0 = 1$ from $0$ to $1$ $dt$ and that's $1$.  That's the desired orthogonality relation.
