# Projection Matrix Help

I'm having trouble understanding the following in a review textbook I'm using, particularly the long equality with inverses and transposes, and the subsequent conclusion regarding the rank and trace of Qx. !

Could someone please explain it, or direct me to a link or freely available document that explains what is going on step by step?

Thank you!

It may help to call the matrix $X(X'X)^{-1}X'$ ,$\:$ "$H$" (for "hat", since it's usually called the 'hat-matrix', because it puts the hat on $y$): $\quad\hat{y}=Hy$.
Note that $H^2=H$ (expand it out, and cancel an adjacent pair of terms that is a matrix and its inverse).
Then $Q=I-H$ and $Q^2=(I-H)^2 = I^2 -HI - IH +H^2$. Using known results, simplify this down to $Q$.