I am currently reading a proof that involves some result from functional analysis which I would like to understand a little better -
Suppose we have a Hilbert space $\mathcal{H}$ and a closed linear subspace $\mathcal{L}$ in $\mathcal{H}$. Suppose further that we are given that $\mathcal{L}$ contains the span of two sets $P_1$ and $P_2$ which are orthogonal, and conversely the span of these sets contains $\mathcal{L}$. The orthogonality statement means that if $(\cdot,\cdot)$ denotes the inner product in $\mathcal{H}$ then \begin{equation} (f,g) = 0 \quad \forall f \in P_1 \text{ and } g \in P_2 \end{equation} Then it follows that both Span$(P_1)$ and Span($P_2$) are closed, and we have an orthogonal sum \begin{equation} \mathcal{L} = \text{Span}(P_1) \oplus \text{Span}(P_2) \end{equation}
My background in functional analysis is very sketchy unfortunately, I would like to understand what are the general results that I need to know about in order to see this conclusion as being trivial?
In particular, why do I need closure of $\mathcal{L}$ to deduce that it has this direct sum decomposition ? Does this not follow directly from the fact that Span$(P_1)$ and Span$(P_2)$ are orthognal ? Also, how do I deduce these two spaces are closed from the fact that $\mathcal{L}$ is closed ?
Many thanks !