How to be sure that we can span all the periodic functions with a Fourier series? The set of functions $$B = \left\{\frac{1}{\sqrt{2}}, \cos\left(\frac{2\pi n t}{T}\right) \mid n \in \mathbb{N}, \sin\left(\frac{2\pi n t}{T}\right) \mid n \in \mathbb{N} \right\}$$ is a set of othonormal vectors with the scalar product $\langle\ f,g\rangle =\frac{2}{T}\int_{0}^{T} f(t)g(t) \,dt $.
My question is how can we be sure that this set of vector is a basis for all possible $T$-periodic function? Why can't we find other functions orthonormal to the vectors in $B$?
My point with this question is to understand why Fourier said that all real $T$-periodic function can be written as a combination of the vectors in $B$. It is clear that once you have shown that $B$ is a basis for all these functions, then of course you can write any of these functions in the basis $B$.
I would accept a non-rigourous explanation, if it makes intuitively sense. Please try (if possible) to explain the concepts intuitively rather than with complicated mathematical terms.

$f_{FT}(x)=\sum_n a_n cos(nx)+b_n sin(nx) = \sum_n \int f(t)cos(nt) cos(nx) dt +\int f(t)sin(nt) sin(nx) dt $
$= \int f(t) (\sum_n cos(nt) cos(nx) + sin(nt) sin(nx)) dt $ 
$= \int f(t) (\sum_n cos(n(t-x)) dt $ 
$= \int f(t) Re(\sum_{n} exp(in(t-x)))  dt $ 
$= \int f(t) \delta(t-x)  dt $ 
$= f(x) $
for the last equality refer: http://web.mit.edu/8.03-esg/watkins/8.03/deltf.pdf
There are conditions in which i can swap integral and infinite summation. So i am assuming $f$ satisfies all those conditions.
Edited:
Now coming to ur question: Can all periodic functions be written as fourier series. This boils down to the fact does the proof i gave works for all possible periodic functions. Answer is No. Read Section 1.1 : http://math.iisc.ernet.in/~veluma/fourier.pdf where the author mentions that it is possible to construct continuous periofic function whose fourier series differs from function at a particular point. But all hope is not lost. See theorem 1.1 in the same link where the author mentions that the set of all fourier expansions or the space spanned by the basis u have given is dense in $C[0,1]$. Hope this helps
