I found somewhere the following theorem.
An Orthonormal basis of a vector space X is a Hamel basis if and only if X is finite dimensional.
For Hilbert spaces it is quite easy to prove but for pre-Hilbert spaces I'm not really sure that this is true.
As a counterexample, the basis $(e_i)$ where each sequence $e_i$ is defined as $e_i^{(k)}=\delta_{ki}$ is an orthonormal-Hamel basis in $c_{00}$ with the inner product $||\cdot||_2$, but the space $c_{00}$ is not finite dimensional.
Where am I wrong? I know in some books they define Orthonormal basis in Hilbert spaces, but in my definition they can also exist in pre-Hilbert spaces. Is that the problem?
Thanks!
If $X$ is infinite dimensional, then it possesses an orthonormal basis $\mathscr B$, which is clearly infinite dimensional (Zorn's Lemma is required to prove it).
We shall show that $\mathscr B$ is NOT a Hamel basis.
Let $\{e_n\}_{n\in\mathbb N}\subset\mathscr B$ be an orthonormal sequence and $$ w=\sum_{k=1}^\infty 2^{-k}e_k. $$ It can be readily shown that the $w$ is perpendicular (and hence linearly independent) to the elements of $\mathscr B\!\smallsetminus\!\{e_n\}_{n\in\mathbb N}$ and linearly independent with the elements of $\{e_n\}_{n\in\mathbb N}$.
In the same way one can construct $2^{\aleph_0}$ such elements.