TITLE: Does orthogonal decomposition characterize direct sums in Hilbert space?
QUESTION [6 upvotes]: Let $H$ be a Hilbert space with inner product $(\cdot, \cdot)$.
I know that if $M$ is a closed subspace of $H$, then $H$ can be written as the direct sum $M \oplus M^\perp$, where $M^\perp$ stands for the orthogonal complement of $M$.
I would like to know if this decomposition above essentially describes all direct sums in Hilbert spaces:

If $M,N$ are closed subspaces of $H$ with $H$ being the direct sum $M \oplus N$, then is it true that $N = M^\perp$. 

So far I've tried using a direct proof that's not really getting me anywhere: take $n \in N$ and show that $(n,m) = 0$ for $m \in M$ arbitrary. Without knowing any specific about $M$ and $N$, I am not able to move any further. Is there some basic fact about the inner product that makes this all work? Or is the question deeper?
Hints or solutions are greatly appreciated.

REPLY [2 votes]: As positive result:
For orthogonal decompositions:
$$\mathcal{H}=U\oplus V:\quad U\perp V\implies U=V^\perp,V=U^\perp$$
Note it wasn't assumed closedness.