# Thread: matrix trace and idempotent

1. ## matrix trace and idempotent

$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?

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

$tr(ABC)=tr(CAB)$

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

2. Originally Posted by rainer
$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?

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

$tr(ABC)=tr(CAB)$

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

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

Tonio

3. Originally Posted by tonio
What is $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 $X'$ , anyway?

Tonio

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

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

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