Prove that $\pi_{U}\circ\pi_{W}=0\implies\langle u,w\rangle=0$ $\forall u\in U$ and $\forall w\in U$ where $U,W\leqslant V$ is Note that $\pi_{U}$ is the orthogonal projection onto $U$ here,
same with $\pi_{V}$.
$\operatorname{Im}(\pi_{U})\perp \ker(\pi_{U})$ by our projection.
But $\ker(\pi_{U})=\operatorname{Im}(\pi_{W})$ by our assumption.
So $\operatorname{Im}(\pi_{U})\perp \operatorname{Im}(\pi_{W})\iff U \perp W$ as required. $\blacksquare$
Is this proof correct?

I was told that I cannot assume $\ker(\pi_{U})=\operatorname{Im}(\pi_{W})$ by a friend but I cannot see why.

 A: You cannot assume this, indeed. It's possible for $U$ and $W$ that fail to sum to $V$. For example, you could consider subspaces of $\Bbb{R}^3$:
\begin{align*}
U &= \operatorname{span}\{(1, 0, 0)\} \\
W &= \operatorname{span}\{(0, 1, 0)\},
\end{align*}
i.e. the $x$ and $y$ axes. The projections map as follows:
\begin{align*}
\pi_U(x, y, z) &= (x, 0, 0) \\
\pi_W(x, y, z) &= (0, y, 0).
\end{align*}
Then, $(\pi_U \circ \pi_W)(x, y, z) = \pi_u(0, y, 0) = (0, 0, 0)$, so $\pi_U \circ \pi_W = 0$. But,
$$\operatorname{Ker} \pi_U = U^\perp = \operatorname{span}\{(0, 1, 0), (0, 0, 1)\} \neq \operatorname{span}\{(0, 1, 0)\} = W = \operatorname{Im} \pi_W.$$
If you want a better way of proceeding, try using adjoints. Recall that orthogonal projections are self-adjoint, and that $u = \pi_U(u)$ for all $u \in U$ and $v = \pi_V(v)$ for all $v \in V$. Try playing with $\langle u, v\rangle = \langle \pi_U u, \pi_V v\rangle$ with these facts in mind!
A: He was right: from condition $\pi_U\circ\pi_W=0$ we can only conclude
$${\rm im}(\pi_W)\subseteq\ker(\pi_U)$$
but that's enough here:
$$W={\rm im}(\pi_W)\subseteq\ker(\pi_U)\,\perp\,{\rm im}(\pi_U)=U$$
so every element of $W$ is orthogonal to every element of $U$.
More directly, let $w\in W$ be arbitrary, then
$$0=\pi_U(\pi_W(w))=\pi_U(w)$$
so, since $\pi_U$ is an orthogonal projection to $U$, we get $w\perp U$.
