I have two factors $a,b \in R^M$ which I wish to regress out of my variables $Y \in R^{M \times N}$. $b$ is a function of the variables $Y$ and is defined as:
$b = \frac{1}{N}Y1$
Regressing out the variables serially, the formula I have is:
$$\begin{eqnarray} Y_{\perp a} &=& Y - m(m^Tm)^{-1}m^TY \\ Y_{\perp a,b} &=& Y_{\perp a} - b_{\perp a}(b_{\perp a}^Tb_{\perp a})^{-1}b_{\perp a}^TY_{\perp a} \\ \text{is equivalent to:} \\ Y_{\perp a,b} &=& Y - [a,b]([a,b]^T[a,b])^{-1}[a,b]^TY \end{eqnarray}$$
Is there a formal way to prove that regressing out $[a,b]$ simultaneously to get $Y_{\perp a,b}$ is equivalent to regressing out $a$, then calculating $b_{\perp a}$ on the residual, $Y_{\perp a}$ and regressing that out to get the same $Y_{\perp a,b}$ .
I've tested this empirically in matlab and this appears to be true, but I can't come up with a formal proof.