Solution (source code)

= Solution

Use $T=P_{V^\perp}|_U:U\longrightarrow V^\perp$. Positivity of the <directed subspace angle> cosine gives
$$
\|Tu\|\ge\cos\theta_{U,V^\perp}\,\|u\|,
$$
so $T$ is <injective>. The two <vector spaces> have the same finite <dimension>, $n$. By the <rank-nullity theorem>, $T$ is also <surjective>. There is no need to assume a second positive <directed subspace angle> cosine in this finite-dimensional case.

For any $f\in H$, find $u\in U$ with $Tu=P_{V^\perp}f$. Then $f-u\in V$. If $u\in U\cap V$, then $Tu=0$, and <injectivity> gives $u=0$. \b[Hence]
$$
\boxed{H=U\oplus V.}
$$
The <direct sum> is again bounded: $u=T^{-1}P_{V^\perp}f$. If $n=0$, then $U=\{0\}$ and $V^\perp=\{0\}$, so closedness of $V$ gives $V=H$ and the conclusion directly; no angle of an empty unit sphere is needed. Equal finite <dimensions> are essential to the surjectivity argument, whereas mere <injectivity> between infinite-dimensional <Hilbert spaces> is insufficient.