I want to prove the following equation: Let $X$ be a real-valued RV with $E(X^2)<\infty$ and let $G, H\subseteq F$ be $\sigma$-algebras such that $H\subseteq G$. Then $$E\left((X-E(X\vert H))^2\right) = E\left((X-E(X\vert G))^2\right) + E\left((E(X\vert G)-E(X\vert H))^2\right)$$
The exercise says that instead of just using the definitions of (conditional) expectation and forcing the problem, there is an interesting geometric perspective contained in this equation which can also be used to prove it. I was wondering what it is.
This seems to resemble Pythagoras, but I can't close the connection. Does anyone see this geometric perspective? How is it connected to a proof?