I read that if $U$ is a closed subspace of a Hilbert space $H$ then we can write $H$ as $H = U \oplus U^\bot$ (the direct sum).
What is not clear to me is why $U$ is required to be closed. I thought about it but in finite dimension of course every subspace is closed so that was not helpful to me.
What happens if $U$ is not closed? Why can we not write $H=U \oplus U^\bot$ in that case?
(This question arose while I was trying to prove that $U^{\bot\bot}=U$)
The best way to see what can go wrong is to find a counterexample. The easiest counterexample I can think of here is $\ell^2$.
Let $c_0 \subset \ell^2$ denote the set of sequences $(x_j)$ such that there exists an $n \in N$ such that $x_j = 0$ whenever $j \geq N$. That is, let $c_0$ denote the set of all "terminating" sequences.
What is $(c_0)^\perp$? Is is clear now that $\ell^2 \neq (c_0) \oplus (c_0)^\perp$?
As a general note: keep in mind that $U^\perp = (\overline{U})^\perp$. To answer your original question then, we have $U^ {\perp\perp} = \overline U$.