Let $\DeclareMathOperator{\H}{\mathcal{H}} \H$ be an Hilbert space and $M \subset \H$ a closed subspace. Then $\H = M \oplus M^{\perp}$, where $\oplus$ denotes the orthogonal direct sum and $^\perp$ the orthogonal complement.
Since we require $M$ to be closed and it is essential for the proof, I suspect there's a counterexample to this statement for non-closed $M$ but haven't been able to come up with one. Any hints are appreciated.
Let $M$ be any dense proper subspace. Then $M^{\perp}=\{0\}$.
For an explicit example take $M$ to be the set of sequences with at most finite number of non-zero terms in $H=\ell^{2}$.