A well known theorem about Hilbert spaces states that if $L$ is a closed subspace of Hilbert space $H$ then $H = L \oplus L^\perp$.
But can there be orthogonal decomposition of Hilbert space for some non-closed subspace $L$?
If the answer is "no" for Hilbert spaces then what about general inner-product spaces?
Obviously $L$ has to be infinite-dimensional to be non-closed. Unfortunately i'm pretty bad at infinite-dimensional examples so didn't succeed to find one yet. I'm not even sure that it exists. Probably since $L^\perp$ is always closed the existence of orthogonal decomposition somehow implies that $L$ has to be closed as well.
Any ideas will be highly appreciated. Thanks in advance.
If an inner product space $H$ is the orthogonal sum of linear subspaces $M, N$, then both $M$ and $N$ are closed in $H$.
Indeed, suppose that $x\in \overline{M}$. Since $M\subset N^\perp$ and $N^\perp$ is closed, it follows that $x\in N^\perp$. Since $H$ is the sum of $M$ and $N$, we can write $x=m+n$ with $m\in M$ and $n\in N$. But $x, m\in N^\perp$, hence $n=x-m\in N^\perp$, hence $n=0$. In conclusion, $x = m \in M$. And since $x\in \overline{M}$ was arbitrary, it follows that $ \overline{M} = M$.