I'm trying to show that for the standard OLS regression model $$ \hat U'\hat U = U'U - U'(X'X)^{-1}X'U $$
I first substituted $\hat \beta = \beta + (X'X)^{-1}X'U $ into $\hat U = Y - \hat \beta X$, and got to this expression:
$$ U'\hat U = (U - (X'X)^{-1}X'UX)'(U - (X'X)^{-1}X'UX) $$
However, I can't seem to get the second term of the desired expression when I expand out the other terms of the quadratic. Need some help here mates.