I am trying to understand the result of the Frisch-Waugh-Lovell Theorem that we can partial out a set out regressors. The model I am looking at is $y=X_1\beta_1 + X_2\beta_2 +u$
So the first step would be to regress $X_2$ on $X_1$: $$ \begin{align} X_2&=X_1\hat{\gamma}_1+\hat{w}\\ &=X_1\hat{\gamma}_1+M_{X_1}X_2 \end{align} $$ with $M_X$ being the orthogonal projection matrix ($M_X=I-P_X$). The second step is then to regress $y$ on $X_1$: $$ \begin{align} y&=X_1\hat{\gamma}_2+\hat{v}\\ &=X_1\hat{\gamma}_2+M_{X_1}y \end{align} $$ And the third step would be to regress the residuals of the previous regressions on each other: $$ \begin{align} \hat{w}&=\hat{v}\beta_2+u\\ M_{X_1}y&=M_{X_1}X_2\beta_2+u \end{align} $$ Can somebody tell me whether this would be a correct way of describing this result and in particular whether the residuals in the last equation $u$ are equal to the residuals in the model?