For a random vector $X=(X_1,\ldots,X_p)'$, we define $$ \mathcal{L}(X)=\{b_0+b_1X_1+\cdots+b_pX_p,b_0,\ldots,b_p\in\mathbb{R}\}. $$ The linear regression of the $q$-dimensional random vector $Y$ on $X$ is the random vector denoted by $E L(Y|X)$ of size $q$ whose $i$-th component $E L(Y_i|X)$ is the orthogonal projection of $Y_i$ on the space $\mathcal{L}(X)$. I'm trying to prove the Three-Perpendicular Theorem: if $\mathcal{L}(Z)\subset\mathcal{L}(X)$, then $$ EL[EL(Y|Z)|X]=\color{blue}{EL[EL(Y|X)|Z]}=EL(Y|Z). $$ Can someone please help me deal with the second term above?
I can only show that the first term equals the third term by appealing to the general result that $$ EL(S|T)=E(S)+\text{Cov}(S,T)[\text{Var}(T)]^{-1}(T-ET). $$
Using the given notation, let $$ \varepsilon (S|T)=S-EL(S|T). $$ Then one can verify that $\varepsilon(S|T)$ has mean $0$ and is orthogonal to $AT$ for any conforming nonstochastic matrix $A$.
To handle the middle term in the theorem, write $$ EL(Y|X)=Y-\varepsilon(Y|X) $$ where $EL[\varepsilon(Y|X)|Z]=0$ because $\varepsilon(Y|X)$ is orthogonal to $AX$ for any nonstochastic $A$ and, because $\mathcal{L}(Z)\subset\mathcal{L}(X)$, we actually have $\varepsilon(Y|X)$ is orthogonal to $BZ$ for any nonstochastic $B$.