I am reading Stein and Shakarchi's Real Analysis, and have got stuck on an example of how orthogonal projections work. The book states the following:
Consider $L^2([-\pi,\pi])$, and let $S$ denote the subspace with all elements $F$ having the property that $F(\theta)\sim \sum_0^\infty a_n e^{in\theta}$, where $a_n$ are the Fourier coefficients of F. From the proof of Fatou's theorem, we can identify $S$ with the Hardy space $H^2(\mathbb{D})$, and so $S$ is a closed subspace unitarily isomorphic to $\ell^2(\mathbb{Z}^+)$.
I'm mainly with it, apart from saying that it's identified with the Hardy space, as I thought $H^2(\mathbb{D})$ was on the entire unit disc, not just the boundary, which F seems to be on. Also, how can you properly identify it with the Hardy space as I thought that the function F would have had to be $F(e^{i\theta})$ to make the substitution $z=e^{i\theta}$ make sense. What confused me even more was the next part:
Using this identification, if $P$ denotes the orthogonal projection from $L^2([-\pi,\pi])$ to $S$, then we may also write $P(f)(z)=\sum_0^\infty a_n z^n$.
How is this obtained? If I were to attempt to find the orthogonal projection from $L^2$ to $S$, I would have done the following:
Let $\{e^{inx}\}_{n\geq0}$ be an orthogonal basis for $S$.Then, $P(f)(\theta)=\sum_{n=0}^\infty(f(\theta),e^{in\theta})\,e^{in\theta}$. This would leave me with $P(f)(\theta)=\sum_{n=0}^\infty a_ne^{in\theta}$, which does not work out with the substitution $z=e^{in\theta}$.
As you can tell, I'm quite confused. Could somebody help clear this up?