Let me put the comments in an answer.
Definition: A vector space basis (or Hamel basis) is a system of vectors such that every vector of the space if a linear combination (by definition only finitely many of the coefficients are non-zero) of the vectors in the system.
Examples:
- The bases you know of finite dimensional vector spaces.
- $\{1,x,x^2,...\}$ basis of $\mathbb{R}[x]$
- Hamel's basis of $\mathbb{R}$ as a $\mathbb{Q}$-vector space.
Non-example:
- $\{1, \sin(nx),\cos(nx)\}_{n=1}^{\infty}$ as a system of vectors of $L^{2}([0,2\pi])$. Because the function with graph the picture below (multiply the numbers in the picture by $\pi$) is not a finite combination of these elements. In particular a finite combination of these must be continuous but the graph below is not.
Definition: A Hilbert-space-orthogonal-basis (I put it with dashes to emphasize it is a concept by itself and not the union of the union of its parts) is an orthogonal system that is complete, where complete means that its linear combinations (finite as before) are dense in the space.
Example: The non-example above is an example of Hilbert-space-orthogonal-basis.
It is a theorem that when you have an a system of vectors that is an orthogonal-basis-of-a-Hilbert-space you can express every vector of the space as infinite linear combinations (Fourier series) of this system.
Theorem: A Hilbert space with a countable Hilbert-space-orthogonal-basis (what is called a separable Hilbert space) can only have an uncountable vector space basis (a Hamel basis).
Proof: Assume $H$ is Hilbert and $B=\{v_1,v_2,...\}\subset H$ is countable. Let $E_n$ be the set of all linear combinations of $\{v_1,v_2,...,v_n\}$. Since $E_n$ is finite dimensional it is closed in $H$. Since $H$ is infinite dimensional $E_n\neq H$. Therefore $E_n$ cannot contain any ball of $H$ (it is nowhere dense). But if $B$ is a basis then $H=\cup_n E_n$. Because $H$ is Hilbert, it is a complete metric space. By Baire category theorem it cannot be a union $\cup_n E_n$ of the countably many nowhere dense sets $E_n$.
Theorem: All Hilbert-space-orthogonal-bases have the same size.
Proof: Assume $B$ is a countable Hilbert-space-orthogonal-basis of the Hilbert space $H$ and $A$ is another Hilbert-space-orthogonal-basis of $H$. Expand each vector of $B$ as an infinite linear combination (Fourier series) of $A$. If $b\in B$ is given as $$b=\sum a_i v_i,$$
with $a_i$ scalars and $v_i\in A$. Then, by Parceval's identity $$||b||^2=\sum |a_i|^2||v_i||^2.$$
Being this a convergent series of reals, only countably many can be non-zero. So, the countably many elements of $B$ are generated, as infinite combinations, (each) by countably many elements of $A$. In total only countably many elements of $A$, say $C\subset A$, are needed to generate all elements of $B$. Therefore, if $v\in A\setminus C$, then $v$ being orthogonal to all elements of $C$ would be orthogonal to all elements of $B$. Therefore $v=0$.
Conclusion: An infinite dimensional separable Hilbert space (although it has a countable Hilbert-space-orthogonal-basis) it cannot have a vector space basis (a Hamel basis) that is also orthogonal.
Proof: From the theorems above.
- An uncountable set cannot be orthogonal in a separable Hilbert space.
- A vector space basis (a Hamel basis) of an infinite dimensional separable Hilbert space is uncountable.