Subspaces $X$ and $Y$ of a Hilbert Space with $\dim X<\infty$ and $\dim X<\dim Y$. I am working through some problems in the book Analysis Now by Pedersen, and I came across this problem:
Suppose $H$ is a Hilbert space and $X$ and $Y$ are closed subspaces of $H$ with $\dim X<\infty$ and $\dim X<\dim Y$. Prove that $X^{\perp}\cap Y\not=\{0\}$. 
I noticed someone asked the same question here: Hilbert space, functional analysis
But, I'm unsure if the answer is correct since it is not clear to me why $Y=X\cap Y+X^{\perp}\cap Y$.
If $X\subset Y$, then I would know how to solve the problem, but I am having trouble with the general case. 
 A: By changing $Y$ by a subspace of dimension $\dim(X)+1$, and $H$ by $X+Y$, we can assume $H$ is finite dimensional.
Now consider the canonical quotient map $T:Y\to H/X^\perp\simeq X$. By the rank-nullity theorem,
$$\operatorname{dim}(Y)=\operatorname{dim}(TY)+\operatorname{dim}(\ker T)\leq\operatorname{dim}(X)+\operatorname{dim}(Y\cap X^\perp)$$
But $\operatorname{dim}(Y)>\operatorname{dim}(X)$, so
$$0<\operatorname{dim}(Y\cap X^\perp).$$
A: The answer at the linked question is indeed incorrect. We get a counterexample in $\mathbb{R}^3$ (that generalises of course to Hilbert spaces of arbitrary dimension $\geqslant 3$) by taking $X = \operatorname{span} \{ e_1\}$ and $Y = \operatorname{span} \{ e_1 + e_3, e_2\}$. Then $X\cap Y = \{0\}$ and $X^{\perp} \cap Y = \operatorname{span} \{e_2\} \neq Y$.
In a Hilbert space, we can look at the orthogonal projection $P$ onto $X$. Since $\dim Y > \dim X$, it follows that $P\lvert_Y$ cannot be injective, hence
$$Y \cap X^{\perp} = \ker (P\lvert_Y) \neq \{0\}.$$
We can generalise this to complemented subspaces (every finite-dimensional subspace of a normed space is complemented) $X$ of Banach spaces $B$: If $C$ is a complementary (closed) subspace to $X$, then the canonical projection $\pi \colon B \to B/C$ cannot be injective on $Y$ if $\dim Y > \dim B/C = \dim X$, so $Y\cap C \neq \{0\}$.
Of course we can forget about everything topological and use an algebraic complement (which always exists thanks to the axiom of choice) to reach the same conclusion, but in functional analysis, algebraic complements are typically not useful, while topological complements are.
