multiple regression residuals and "partialling out"

#1
Hi All,

I would like to clarify a bit what "partialling out" means in multiple regression. Suppose I have three variables: Y, X, and Z.

First, I regress Y on Z and obtain the residuals from this regression. Then, I estimate the following:

Residual=B0+B1X

Now, I estimate;

Y=B0+B1X+B2Z.

Conceptually, it seems to me like B1 should be identical in both regressions. However, this is not the case when I try it out myself. Can anybody clarify this a bit, or give me some reading? Thank you!