Theorem: A Hilbert space H is separable (that is, has a countable dense subset) if and only if it has one countable orthonormal basis if and only if every orthonormal basis for H is countable.
Proof: : Suppose H is a separable and consider any orthonormal basis . Then if and we conclude . Thus has the discrete topology.
Now a separable metric space is a separable metric space has a countable dense subset. But is the only subset of itself that is dense in (since has the discrete topology) and so must be countable.
: Suppose for the converse that there is one countable orthonormal basis for . We look at the case ( is a real Hilbert space) first. It is quite easy to check that the sets
for
are each countable and that their union is countable and dense in . The closure of each is easily seen to be the -linear span of and so the closure of includes all finite linear combinations . But, each is a limit of such finite linear combinations. Hence the closure of is all of . As is countable, this shows that must be separable.
In the complex case ( is a Hilbert space over we must take instead, so that we can get all finite -linear combinations of the n the closure of (and there is no other difference in the proof).