# Thread: matrix trace and idempotent

1. ## matrix trace and idempotent

$\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)

2. 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)

What is $\displaystyle X'$ , for a square matrix??

Tonio

3. Originally Posted by tonio
What is $\displaystyle X'$ , for a square matrix??

Tonio
But X is not square. It is n-by-K, where n>K.

4. Originally Posted by rainer
But X is not square. It is n-by-K, where n>K.

Whatever: what is $\displaystyle X'$ , anyway?

Tonio

5. Originally Posted by tonio
Whatever: what is $\displaystyle X'$ , anyway?

Tonio
$\displaystyle X'$ is the transpose of $\displaystyle X$.

$\displaystyle X'X$ yields a square matrix. I think that's part of the trick.