Unitary Operator on Hilberspace to show that Fourierbasis is a maximal Orthogonal Set I have looked at the proof Proving that the Fourier Basis is complete for C(R/$2*\pi$ , C) with $L^2$ norm
but am having trouble understanding the argumentation about the Hilberspace. I think the proof is quite nice and would like to understand it, and also need to refresh my Functional analysis. In particular:

This is probably not the most elegant way, but this method generalizes to showing the unitarity of the Fourier transform. The essential part of this proof is showing that the map L2(R/2πZ)→ℓ2(Z) given by taking the Fourier coefficients from the discrete Fourier transform is an isometry, since the discrete Fourier transform is essentially the orthogonal projection onto the closure of the span of the functions e^inx. Then, by basic Hilbert space theory, it would follow that {e^inx} is a maximal orthogonal set.

The "then by basic Hilber space theory" is not clear to me...
Is this because if you take the Span of $e^{inx}$ it has the same Image under an Unitary Operator  as L2(R/2πZ), and thus {e^inx} must be dense in L2(R/2πZ) - And if yes, whats the name of a theorem showing this/can you direct me to one?
thank you
 A: To show that $\{ e^{int} \}$ is a complete orthogonal subset of $L^2[0,2\pi]$, suppose that $(f,e^{int})=0$ for all $n\in\mathbb{Z}$. It must be shown that $f=0$ a.e.. To prove this, define
$$
                   E(\lambda)=\frac{1}{e^{-2\pi i\lambda}-1}\int_{0}^{2\pi}ie^{-i\lambda t}f(t)dt,\;\;\;\lambda\in\mathbb{C}.
$$
Then $E$ extends to an entire function of $\lambda$ because it has only removable singularities at the integers. It is not too hard to show that $E(\lambda)$ is uniformly bounded on square contours $C_n$ formed by connecting these vertices in order
$$
              \frac{2n+1}{2}(-1-i),\;\frac{2n+1}{2}(1-i),\;\frac{2n+1}{2}(1+i),\;\frac{2n+1}{2}(-1+i).
$$
Using such boundedness, a simple modification of the proof of Liouville's Theorem shows that $E$ must be a constant function. Hence, there is a constant $C$ such that
$$
             \int_{0}^{2\pi}f(t)e^{-i\lambda t}dt = C(e^{-2\pi i\lambda}-1).
$$
Choosing $\lambda=-ir$ for $r > 0$, and letting $r\rightarrow\infty$ gives $0$ on the left and $-C$ on the right. Hence, $C=0$. Therefore the left side is identically $0$ in $\lambda$. All of the derivatives with respect to $\lambda$ must also be $0$. Therefore,
$$
                    \int_{0}^{2\pi}f(t)t^{n}dt=0,\;\;\; n=0,1,2,3,\cdots.
$$
Because the polynomials are dense in $L^2$, it follows that $f=0$ a.e.. Hence, $\{ e^{int} \}_{n=-\infty}^{\infty}$ is a complete orthogonal subset of $L^2[0,2\pi]$.
A: I actually love Disinegrating's answer, but I do think it may have omitted the Hilbert space theory that OP asked about? For the sake of completeness, maybe it's good if I  describe the underlying theory for future viewers.

Definition: we say that a subset $A$ of an inner product space $H$ is an orthonormal set of vectors if we have $\langle x,y \rangle = 0$ for all distinct $x,y \in A$ as well as $\|x\|^2 = \langle x,x \rangle = 1$ for all $x \in A$.


Definition: in an inner product space $H$, we say that a set $A$ of orthonormal vectors is maximal if, given $x \in H \setminus A$, the set $\{x\} \cup A$ is not an orthonormal set of vectors.


Definition: we say that a countable, maximal, orthonormal set of vectors is an orthonormal basis.


Proposition: if $(e_n)$ is an orthonormal basis for a Hilbert space $H$ (i.e., $(e_n)$ are all distinct and $\{e_n : n\in\mathbb{N}\}$ is an orthornomal basis), then we have $v = \sum_{n\in\mathbb{N}} \langle v,e_n \rangle e_n$ for all $v \in H$.


Theorem: given a sequence $(e_n)$ of mutually orthonormal vectors in a Hilbert space $H$, we have that $(e_n)$ is an orthonormal basis if and only if, for all $v \in H$, $\|v\| = \sum_{n\in\mathbb{N}} |\langle v,e_n \rangle|^2$.

Remark: it is always true that $\|v\| \geq \sum_{n\in\mathbb{N}} |\langle v,e_n \rangle|^2$. The reverse inequality is non-trivial.
In conclusion: in the question cited by OP, the scalars $a_n$ are in fact of the form $\langle f,e_n \rangle$ for some sequence $(e_n)$ of orthonormal vectors. Thus, to be able to conclude that $(e_n)$ are maximal, the problem in the post which OP refers to is to show that $\sum_{|n| \leq N} |a_n|^2 \to \|f\|^2$. as $N\to\infty$.
For a proof of the theorem referenced above, see, perhaps, Real and Complex Analysis by Rudin, or Real Analysis: Measure Theory, Integration, and Hilbert Spaces by Stein and Shakarchi.
