Orthonormal Expansion
To properly discuss about Fourier Series, we have to understand orthonormal basis expansion / approximation. Briefly, a point in a vector space can be approximated by linear combination of basis for another space:
$$
\mathbf{w} \approx
\tilde{\mathbf{w}}
=
\sum_{m=1}^{d} w_{m} \mathbf{v}_{m} ,
\phantom{x}
\mathbf{v}_{m}\in\mathbb{V} \phantom{x} \forall \phantom{x}m \in \left\{1,...,d\right\}
$$
We can define a criteria to evaluate how well this approximation perform e.g. we define the criteria as $L_{2}$ error:
$$
e=
\left\| \mathbf{w} - \tilde{\mathbf{w}}\right\|^{2}
=
\left\langle \mathbf{w} - \tilde{\mathbf{w}},
\mathbf{w} - \tilde{\mathbf{w}} \right\rangle
$$
If the basis are orthonormal, the scalars $w_{i}$ that minimises the aforementioned error is given by the following expression:
$$
w_{m} = \left\langle\mathbf{v}_{m}, \mathbf{w}\right\rangle
$$
Worth noting that the approximation $\tilde{\mathbf{w}}$ is the projection of $\mathbf{w}$ to $\mathbb{V}$.
Connecting The Dots
Fourier series expansion is an orthonormal expansion. It approximate a function using some orthonormal basis for sinusoidal function space:
$$
f(t) \approx
\tilde{f}(t)
=
\sum_{m=1}^{d} f_{m}\cdot \frac{1}{\sqrt{T}} e^{j2\pi m \frac{t}{T}}
$$
The inner product is defined as the following:
$$
\left\langle f(t),g(t) \right\rangle =
\int_{0}^{T} \bar{f} (t)\cdot g(t) \phantom{.}dt
$$
The Fourier series coefficient is given by:
$$
f_{i} =
\left\langle \frac{1}{\sqrt{T}}e^{j2\pi m \frac{t}{T}}, f(t) \right\rangle
=
\frac{1}{\sqrt{T}}\int_{0}^{T} e^{-j2\pi m \frac{t}{T}} \cdot f(t) \phantom{.}dt
$$
I hope that last part looks familiar :)
Remarks
We have seen that Fourier series is an approximation of a function using sinusoidal function. Most of the time, approximation is not equal to the function being approximated. Some guiding questions:
- If you approximate a discontinuous function using some continuous functions, can the approximation be exactly equal to the function being approximated?
- If you approximate a non-periodic function using some periodic functions (with the same period), can the approximation be exactly equal to the function being approximated?
- If you approximate a function that is not infinitely continuously differentiable using some functions functions that are, can the approximation be exactly equal to the function being approximated?
In many engineering / science program, Fourier transform & Fourier series are taught without solid basics of functional analysis and linear algebra. Therefore, students often fail to see them as what they are: approximation and projection.