Originally Posted by

**rainer** $\displaystyle X(X'X)^{-1}X'$

X is an n x K non-singular full rank matrix where n > K

Is the result of this matrix operation an idempotent matrix? (It seems to be when I do it in stata.)

Given the properties below, I am told it is possible to express the trace of the matrix that results from the above operation in terms of n and K. But I have been unable to figure out how. Can someone give me a clue?

$\displaystyle (A')^{-1}=(A^{-1})'$

$\displaystyle tr(ABC)=tr(CAB)$

(where A,B, and C are non-singular square matrices)