You are on page 1of 11

The Trace of a Matrix

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

1 / 11

The trace of a square matrixnn


A = [aij ] is
trace(A) = tr(A) =

n
X

aii .

i=1

For example,

3 5

tr
4 1 2 = 5 1 + 7 = 11.
3

c
Copyright 2012
Dan Nettleton (Iowa State University)

8 7

Statistics 611

2 / 11

Some Simple Facts about Trace


Suppose k, k1 , . . . , km R and A, A1 , . . . , Am are each n n matrices.
Then
1

tr(A) = tr(A0 )

tr(kA) = k tr(A)

tr(A1 + A2 ) = tr(A1 ) + tr(A2 )

tr(

Pm

i=1 ki Ai )

Pm

i=1 ki

tr(Ai )

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

3 / 11

Result A.17:

(a) tr(AB) = tr(BA). This is known as the cyclic property of the trace.
(b) Ifmn
A = [aij ], then
0

tr(A A) =

m X
n
X

a2ij .

i=1 j=1

Proof of Result A.17: HW problem.

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

4 / 11

Suppose A is an m n matrix of rank r. Prove that there exist matrices


B and rn
C such that

mr

A = BC and rank(B) = rank(C) = r.

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

5 / 11

Proof:
Let B = [b1 , . . . , br ] where b1 , . . . , br form a basis for C(A).
Because b1 , . . . , br form a basis, they are LI so that rank(B) = r.
Let cj be the vector of the coefficients of the linear combination of
b1 , . . . , br that gives the jth column of A.
Then A = BC, where C = [c1 , . . . , cn ].
Finally, note that
r = rank(A) = rank(BC) rank(C) r rank(C) = r.

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

6 / 11

Suppose A is an n n matrix such that AA = kA for some k R.


Prove that tr(A) = k rank(A).

(Note that this result implies the trace of an idempotent matrix is equal
to its rank.)

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

7 / 11

Proof:
Let r = rank(A). Let nr
B and rn
C be matrices of rank r such that A = BC.
Then
BCBC = AA = kA = kBC = B(krr
I )C.
Now B of full column rank implies CBC = krr
I C, and
C of full row rank implies CB = krr
I.
Thus,
tr(A) = tr(BC) = tr(CB) = tr(krr
I ) = k tr(rr
I ) = k r = k rank(A). 2

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

8 / 11

Prove that tr(I PX ) = n rank(X).

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

9 / 11

Proof:

We know I PX is idempotent. Thus, tr(I PX ) = rank(I PX ).


We know I PX is the orthogonal projection matrix onto
C(X) = N (X0 ).
Thus, C(I PX ) = N (X0 ), which has dimension n rank(X).
Thus, rank(I PX ) = n rank(X).

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

10 / 11

Alternate Proof:

Because PX is idempotent, tr(PX ) = rank(PX ).


Now note that rank(PX ) = rank(X) because
rank(PX ) = rank(X(X0 X) X0 ) rank(X) = rank(PX X) rank(PX ).
(This also follows from C(X) = C(PX ).)
Thus, tr(I PX ) = tr(I) tr(PX ) = n tr(PX ) = n rank(X).

c
Copyright 2012
Dan Nettleton (Iowa State University)

Statistics 611

11 / 11

You might also like