Can the Fourier series be derived from the Gram-Schmidt process? How did Fourier come up with the following equation?
$$f(x) = \frac{a_0}{2}+\sum_{n=1}^\infty \left(a_n \cos(\frac{2\pi}{T}nx) + b_n \sin(\frac{2\pi}{T}nx)\right)$$
Did he use the Gram-Schmidt process, which says that any function can be expressed as a linear combination of orthonormal basis functions? 
 A: So Gram-Schmidt is just a way to take a non-orthogonal basis and construct an orthogonal basis. This does still work in infinite dimensions (because the process constructs the $k$th orthogonal basis vector using only the first $k$ original basis vectors). However, there is no reason to do this with sinusoids because they are already orthogonal. With modern tools in hand, the first significant difficulty in the theory of Fourier series is showing that the sinusoids are complete. This can be stated in a few equivalent ways; one is that the set of finite linear combinations of sinusoids (of appropriate frequency for the domain) are dense in $L^2$. Once you have orthogonality and this density property, the series expansion follows pretty much immediately.
I am not sure how Fourier guessed that this should be the case, but these days it is not hard to look up a proof.
A related place where Gram-Schmidt is useful is in constructing the Legendre polynomials, which are a different orthogonal system on $L^2([-1,1])$. They can then be slightly modified to make an orthogonal system on $L^2([a,b])$.
A: In a finite dimensional vector space $V$ with an inner product, it is easy to see that an orthonormal system of $\text{dim}(V)$ vectors generates $V$.
The generalization of finite dimensional vector spaces with an inner product are Hilbert spaces. The space $L^2$ of $T$-periodic functions with the inner product $(1/T)\int_0^Tf\bar{g}$ is a Hilbert space. One can see that the system of sines and cosines is orthonormal (just compute the inner products). So, as it happens in finite dimension, it seems that every $f\in L^2$, $T$-periodic, should be an infinite linear combination of sines and cosines.
Rigurously, one proves that the orthonormal system $F=\{1\}\cup\{\sin(2\pi nx/T),\cos(2\pi nx/T):n\in\mathbb{N}\}$ satisfies $F^{\perp}=\{0\}$, which is equivalent to the fact that every $f\in L^2$, $T$-periodic, is an infinite linear combination of sines and cosines.
A: The idea of expanding in a trigonometric series grew out of Bernoulli's work around 1750, which in turn extended the 1715 work of B. Taylor. Bernoulli was studying standing wave solutions for the vibrations of a stretched string, and to have a full solution he had to determine the amplitude coefficients of the various standing wave components so that their sum would match the initial displacement function of the string at $t=0$. The orthogonality relations used to form the Fourier series were not discovered by Fourier. Those were discovered by Euler and Clairaut in 1757. So all of this was in place before Fourier's time. Fourier was born in 1768.
Fourier's work on more general orthogonal expansions can be found in his 1807 Treatise on Heat Conduction. Many concepts grew out of Fourier's work on Heat Conduction that would eventually lead to a general inner product space around 1905, when Hilbert presented axioms for such a space, in an effort to understand the orthogonal series expansions. The inner product captured the relevant parts of integral orthogonality conditions. The Gram-Schmidt process was published by Schmidt in 1907; Schmidt was a student of Hilbert, and his process description was closely related to one described by Gram, well before general inner product space, around 1833, a few decades after Fourier's Treatise on Heat Conduction.
