If we have a Hilbert space $X$ and a closed subspace $M \subset X$, then using the projection theorem we can canonically find $M^\perp$ such that $X = M \oplus M^\perp$.
I'm wondering if it's possible to do an analogue to this in any topological vector space. Specifically, given a space $X$ and a closed $M \subset X$, can we decompose $X$ into $M \oplus \tilde{M}$ for some $\tilde{M}$ in a canonical way? Maybe this is a dumb question but it's not immediately clear to me that we can even complete a basis of $M$ to a basis of $X$.