I am reading in Young's An introduction to Hilbert Space that:
A countable orthonormal set $S$ in a Hilbert space $\mathcal{H}$ has the property $\mathcal{P}=$ {the only vector orthogonal to it is the zero vector} if and only if $S$ spans $\mathcal{H}.$
Question
I am wondering if this result can be stated in this more general form:
that an orthonormal system indexed by some set $I$ has property $\mathcal{P}$ if and only if its span is dense in $\mathcal{H}$
If true, can you give me a proof?
Suppose the span of $B$ is dense in $H$. Let $x\in H$ be orthogonal to everything in $B$. Pick a sequence $x_n \to x$, with $x_n$ in the span of $B$. By continuity of the inner product, $$ \|x\|^2=\langle x,x\rangle =\lim_{n\to\infty}\langle x_n,x\rangle=0 $$ so $x=0$.
Conversely, let $B\subset H$ have the property that the only vector orthogonal to the span of $B$ is $0$. Put $S=\overline{\text{span}(B)}$. Since $S$ is a closed subspace of $H$, we can write $$ H=S\oplus S^\perp $$ By assumption, $S^\perp=0$, so $S=H$, and we're done.