Classical Theory of Fourier Series

Let $\mathbb{F}$ be either $\mathbb{C}$ or $\mathbb{R}$. The thery of Fourier series is concerned with writting a periodic function as a sum of simple waves, i.e. as functions of the form $c\sin(2\pi kx)$ or $c\cos(2\pi kx)$, $k\in\mathbb{Z},c\in\mathbb{F}$. Since $e^{2\pi i x} = \cos 2\pi x + i\sin 2\pi x$ if $f$ can be written as a sum of exponentials $f(x) = \sum_{k\in\mathbb{Z}}c_k e^{2\pi i k}$, then it can also be decomposed into a sum of simple waves.

For a function $f:\mathbb{R}\to\mathbb{C}$ periodic of period $L>0$, there is an associated 1-periodic function $F(x) = f(Lx)$. It suffices to consider 1-periodic function only and simply call these periodic. Periodic functions forms a complex vector space. Every periodic function $f$ can be seen as a function on $\mathbb{T}=\mathbb{R}/\mathbb{Z}$.

On $C(\mathbb{T})$, the integral $$ \langle f,g\rangle = \int_0^1 f(x)\overline{g(x)}dx $$ defines an inner product, making $C^(\mathbb{T})$ into an inner product space. Moreover, the space could be equipped with the $L^2$ norm: $$ ||f||_2 = \sqrt{\langle f,f\rangle}. $$

Complete the space $C(\mathbb{T})$ with respect to the $L^2$-norm and call the resulting Hilbert space $L^2(\mathbb{T})$.

Theorem. The exponentials $e_k(x)=e^{2\pi ikx},k\in\mathbb{Z}$ form an orthonormal basis $(e_k)_{k\in \mathbb{Z}}$ of the Hilbert space $L^2(\mathbb{T}$.
Proof:  The fact that $(e_k)$ form an orthonormal system is trivial. Let $S$ be the space of all series of the form $\sum_{k\in \mathbb{Z}}c_k e_k$ with $\sum_{k\in\mathbb{Z}}|c_k|^2$ finite. The map $\sum_{k\in\mathbb{Z}}c_k e_k \mapsto (c_k)_{k\in\mathbb{Z}}$ is an isomorphism $H\xrightarrow{\cong}\ell^2(\mathbb{Z})$, and therefore $S$ is a Hilbert space. These series converges in $L^2(\mathbb{T})$, hence $S$ is a Hilbert subspace of $L^2(\mathbb{T})$. Since $C(\mathbb{T})\subset S$, $C(\mathbb{T})$ completes to $L^2(\mathbb{T})$ and $S$ is a Hilbert subspace of $L^2(\mathbb{T})$, $L^2(\mathbb{Z}) = S$.