On The Matrices Ab and Ba: Darryl Mccullough

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

On the matrices

AB and BA

Darryl McCullough

University of Oklahoma

March 27, 2010

1
One of the first things we learn about matrices
in linear algebra is that AB need not equal BA.

For example,
" #" # " #
1 0 0 1 0 1
= ,
0 0 0 0 0 0
but
" #" # " #
0 1 1 0 0 0
= .
0 0 0 0 0 0

So we can even have AB 6= 0 but BA = 0!

How different can AB and BA be? Can we


even write any two n × n matrices X and Y as
X = AB and Y = BA?

2
No, AB and BA cannot be just any two matri-
ces. They must have the same determinant,
where for 2 × 2 matrices the determinant is
defined by
" #
a b
det = ad − bc .
c d

The determinant function has the remarkable


property that det(AB) = det(A) det(B).

So we have

det(AB) = det(A) det(B)


= det(B) det(A)
= det(BA)

Are there other functions f for which


f (AB) = f (BA)?

3
There is another function that satisfies
f (AB) = f (BA)— the trace function, which is
just the sum of the diagonal entries:
n
X
tr(A) = tr([aij ]) = aii
i=1

Unlike the determinant function, one does not


usually have tr(AB) = tr(A) tr(B).

But one always has tr(AB) = tr(BA):


n
X
tr(AB) = (AB)ii
i=1
n X
X n
= aij bji
i=1 j=1
n X
X n
= bjiaij
j=1 i=1
n
X
= (BA)jj
j=1
= tr(BA)

4
Are there are any other functions that satisfy
f (AB) = f (BA)?

Of course we can generate lots of silly exam-


ples using the trace and determinant, such as

f (AB) = cos(23 det(AB)) − 7 tr(AB) .

In fact, just taking polynomial expressions in


trace and determinant, we can get many poly-
nomials in the matrix entries that have this
property, e. g.

6 tr2(A) det(A) = 6(a + d)2(ad − bc) .

What we are actually wondering is:

Are there polynomials p in the matrix entries


such that p(AB) = p(BA), other than polyno-
mial expressions in the trace and determinant
themselves?
5
The answer is yes. There is a source that gives
both the trace and determinant, and others as
well— the characteristic polynomial:
char(A) = det(λIn − A)
It is a polynomial in λ, with coefficients that
are are polynomials in the entries of A.

For example, for a 3 × 3 matrix we have


 
a11 a12 a13
char a21 a22 a23
 
a31 a32 a33
 
λ − a11 −a12 −a13
= det  −a21 λ − a22 −a23 
 
−a31 −a32 λ − a33
=λ3 − (a11 + a22 + a33)λ2
+ a11a22 − a12a21 + a11a33

−a13a31 + a22a33 − a23a32 λ
−(a11a22a33 − a11a23a32 + a12a23a31
−a12a21a33 + a13a21a32 − a12a22a31)
= λ3 − tr(A) λ2 + p2(A) λ − det(A)

6
In general, for an n × n matrix we have

char(A) = λn − tr(A)λn−1 + p2(A)λn−2


+ · · · + (−1)n−1pn−1(A)λ + (−1)n det(A)
for certain polynomials pi in the entries of A.

We should actually write pn,i for these


polynomials, since their formulas depend on
the size n of the matrix. And we can write
pn,1(A) = tr(A) and pn,n(A) = det(A).

So we wonder whether char(AB) = char(BA).


That would be the same as saying that
pn,i(AB) = pn,i(BA) for each of these
polynomials.

7
The answer is yes:

Theorem: If A and B are n × n matrices, then


char(AB) = char(BA).

A beautiful proof of this was given in:

J. Schmid, A remark on characteristic polyno-


mials, Am. Math. Monthly, 77 (1970), 998-
999.

In fact, he proved a stronger result, that be-


comes the theorem above if we have m = n:

Theorem: Let A be an n × m matrix and B


an m × n matrix. Then

λm char(AB) = λn char(BA)

8
Theorem: Let A be an n × m matrix and B
an m × n matrix. Then

λm char(AB) = λn char(BA)

proof (J. Schmid): Put


" # " #
λIn A In 0
C= ,D =
B Im −B λIm
Then we have
" # " #
λIn − AB λA λIn A
CD = , DC =
0 λIm 0 λIm − BA
So

λm char(AB) = det(λIm ) det(λIn − AB)


= det(CD)
= det(DC)
= det(λIn ) det(λIm − BA)
= λn char(BA)

9
So, have we now found all the f ’s with f (AB) =
f (BA)?

Yes!

Every polynomial p in the matrix entries that


satisfies p(AB) = p(BA) can be written as a
polynomial in the pn,i.
Consider first the case of diagonal matrices, where the
entries are the eigenvalues. Any p with p(AB) = p(BA)
is a similarity invariant, so gives the same values if we
permute the diagonal entries. Therefore it is a symmet-
ric polynomial in the eigenvalues. The polynomials 1,
pn,1 , pn,2 , . . . , pn,n are the elementary symmetric polyno-
mials in the eigenvalues, so any symmetric polynomial
in the eigenvalues can be written (uniquely) as a poly-
nomial in them, say p = P (1, pn,1 , . . . , pn,n), on diagonal
matrices. Since p is invariant under similarity, it equals
P on all the set of all conjugates of diagonal matrices
with distinct nonzero eigenvalues, which form an open
2
subset of Mn(R) = Rn . Since p and P are polynomials,
this implies that p = P on all of Mn(R).
10
A final question: If pn,i(X) = pn,i(Y ) for all
the polynomials, does this ensure that we can
write X = AB and Y = BA for some A and B?

No, there are easy examples that show this is


not enough, such as
! !
1 0 1 1
X=I= and Y =
0 1 0 1
X and Y have the same trace and determi-
nant (i. e. p2,1(X) = p2,1(Y ) and p2,2(X) =
p2,2(Y )), but if AB = I then A and B are in-
verses, and BA = I as well.

There are many such examples for larger n.


The condition that pn,i(X) = pn,i(Y ) for all
i is equivalent to X and Y having the same
eigenvalues, which is much weaker than being
able to write X = AB and Y = BA (which
is equivalent to similarity when X and Y are
nonsingular).
11

You might also like