If $B$ spans a dense subspace of a Hilbert space $H$, is it a basis for $H$?

617 Views Asked by At

In the proof that every separable Hilbert space has a countable orthonormal basis, this step seems to be regarded as obvious. But I am having a hard time understanding.

The general idea of the proof is that if Hilbert space $H$ contains a countable dense subset $D$, then there exists a countable basis $B$ of $\mathrm{span}(D)$. By Gram-Schmidt orthogonalisation, we can turn $B$ into a countable orthonormal linearly independent set $O$. Therefore $\mathbf{span(D)}$ has a countable orthonormal basis, namely $O$. How do we know that $H = \overline{\mathrm{span}(D)}$ has a countable orthonormal basis? I am either missing something, or "basis" is defined differently in Hilbert space theory!?