Orthonormal basis: Countable $\infty$ vs. Uncountable $\infty$ My doubt is the following, when you create an orthonormal basis for a space, the number of coefficients in each vector, and the number of vectors is equal to the dimension of the space (at least in finite dimensional spaces).
For example the standard basis for $\mathbb{R}^3$ is $(1,0,0),(0,1,0),(0,0,1)$.
What happens when we consider infinite dimensional Hilbert spaces?
For instance, let $\mathcal{L}_2(-\pi ,\pi) $ be the collections of functions $\chi =\{x(t):-\pi \leq t \leq \pi\}$ for which $\int_{-\pi}^{\pi}|x^2(t)|dt<\infty$. Define the vector addition and scalar multiplication coordinatewise such that we end up with a Hilbert space.
My text book says that there's a set of vectors $\{z_n:n=0,\pm1,...\}$ that is a complete orthonormal sequence in $\mathcal{L}_2(-\pi ,\pi)$.
My question is, I know that every single $x(t)$ has an infinite dimension, since we are considering a continuous function, but not countable infinite, while  the number of vectors $z_n$ is clearly countable infinite. 
That makes me think, isn't necessary that the number of components in a vector of the "basis" and the number of vectors that form the latter coincide?
Hopefully you will shed some light on the problem.
 A: You can indeed specify a member of ${\mathcal L}_2(-\pi,\pi)$ with countably many real numbers.  That doesn't say you have to: you can also choose to specify
the values $f(t)$ for all $t \in (-\pi,\pi)$ (modulo the non-uniqueness due to the fact that these are really 
equivalence classes of functions rather than functions: you can change $f$ on a set of measure $0$ and it's the same
member of $\mathcal L_2$).  But those uncountably many choices are not independent.
A: Your intuition is that a function $x=x(t)$ is identified by its values at each point $t\in[-\pi, \pi]$. In other words, you propose the following basis for the space $L^2([-\pi , \pi])$; 
$$
\{ e_{t_0}\ :\ t_0\in[-\pi, \pi]\}, $$ 
where we define 
$$
e_{t_0}(t):=\begin{cases} 1, & t=t_0,\\ 0, & t\ne t_0, \end{cases}$$ 
in analogy with the standard basis $\{e_j\ :\ j=1,\ldots,n\}$ of $\mathbb R^n$. 
This is a very natural intuition, but there is a subtlety; the elements of $L^2([-\pi, \pi])$ really are equivalence classes of functions, up to equality at almost all points (that is, two functions are considered equal if they agree up to a set of measure zero). Now, all functions $e_{t_0}$ are equal to zero at almost all points, so they count as the null function in $L^2$. This is where your intuition breaks down. 
A: Maybe some examples might help? 
One basis is the set $P_n(x/\pi)$ where $(1-x^2)P_n''(x)-2xP_n'=(-n)(n+1)$ and $P(1)=1$. These are the Legendre Polynomials. You can get them by performing the Graham-Schmidt Orthonormalization Process on polynomials starting with $P_0(x)=1$ and $P_1(x)=x$. 
Turns out $\int_{-1}^1P_m(x)P_n(x)dx=\delta_{mn}\frac{2}{2m+1}$ where $\delta_{mn}$ is the Kronecker Delta function. 
So if $f(x)=\sum_{k=0}^{\infty}c_kP_k(x)$
$c_k=\int_{-1}^1f(x)P_k(x)(\frac{2k+1}{2})dx$
So your basis is countable, and, for a given function, you only need one at most countable set of coefficients. 
Another possible basis, the Hermite Polynomials. Slightly tweaked for the interval in question. They are solutions to a specific differential equation. They can be generated by performing the Graham-Schmidt procedure for polynomials integrated over all space against the weight function $e^{-x^2}$. A similar process as above also gives you your needed coefficients. 
Fourier Series would be especially appropriate considering the interval.
The Stone-Weierstrass Theorem is really important in this context as well. 
