TITLE: Dense subset of Hilbert space has trivial orthogonal complement
QUESTION [8 upvotes]: If $D$ is a dense subset (not subspace) of  a Hilbert space then is the orthogonal complement of $D$ equal to $\{ 0 \}$? 
This is true if $D$ is a subspace but if you only know that $D$ is a subset you cannot apply the decomposition theorem. Any ideas?

REPLY [9 votes]: Fix a vector $v$ in the orthogonal complement. The function $x\mapsto \langle x,v\rangle$ is continuous on the Hilbert space. Since it vanishes on a dense subset, it vanishes identically. In particular, it vanishes at $v$.