This is the first of the series
of four videos on ways
to diagonalize matrices.
In this video, we're gonna talk about
traces and determinants.
In successive videos,
we'll talk about scaling
and the identity, probability
matrices, block matrices,
a bunch of other techniques.
So, for traces, the definition
of the trace of a matrix
is just the sum of the diagonal entries.
A one, one plus A two, two
plus A three, three and so on.
And I claim, that if a
matrix is diagonalizable,
if you can write A as PDP inverse,
then the trace of A is the
same as the trace of D.
And of course the matrix
D has all the eigenvalues
on the diagonal, and if you add them up,
you get the sum of the eigenvalues.
In other words, the trace
of any matrix is the sum
of the eigenvalues
counted with multiplicity.
If an eigenvalue has multiplicity three,
you count it three times.
Okay?
Now, this formula turns out to work
even if A is not diagonalizable.
We have, haven't really
dealt with non-diagonal,
how to deal with
non-diagonalizable matrices before,
but, if it's not diagonalizable, then,
it's still is the sum of the eigenvalues
multiplied by their
algebraic multiplicities.
So for example, if we have the
matrix one, two, two, four,
the trace is easy.
It's just one plus four, that's five.
So whatever the eigenvalues are,
they have to add up to five.
So if by hook or by crook, we figure out
what are the eigenvalues,
then, if one of the eigenvalues
was three then the other
eigenvalue would have to be two.
Later in this lecture
we're, we're gonna see
what one of the eigenvalues
is and then we're gonna,
just gonna instantly get the
second one from the trace.
It's not three by the way.
So why should this work?
Well there's something called
the cyclic property of traces.
If you have the product
of any two matrices,
these are two square
matrices of the same size,
so you take their product, and you,
asked for the trace of that,
that's the sum of BA, II,
where I goes from one to N.
Well we've got a formula for
the IJ entry of a product,
well, it's called the IK, where K is I.
It's some BIJ times AJI, if
you sum over J, you get BA, II.
But now this is a number
and this is a number.
It comes from matrix,
but BIJ, is a number,
and AJI is a number.
So you could write them
in the other order.
And now you see if you sum first over I,
this is, if you sum over I,
you get AB, the JJ entry of AB.
And so you sum all that up,
and you get the trace of AB.
So, the trace of BA is the
same as the trace of AB.
AB and BA are different matrices,
but their traces are the same.
And that means that if,
if you look at the trace of PDP inverse,
well you can think of that
as P times DP inverse,
you put the, or, if you
prefer, PD times P inverse,
so you put the P inverse
on the other side.
P inverse times P times D
is just D and we're done.
It works.
Now, the next thing we're
gonna use is determinants.
Now, the determinant
of a two by two matrix
is given by AD minus BC.
And determinants of bigger
matrices are defined recursively.
If you have a three by three
matrix, you take this entry
times this two by two determinant,
minus this entry
times this two by two determinant,
plus this entry times this
two by two determinant.
And, there's a formula for
a four by four determinant
that you get out of three by threes,
five by five determinant you
can build out of four by fours,
and in general, you keep
working your way up.
Now it's a nasty recursive formula.
Actually, for the determinant
of an N by N matrix,
there are N factorial terms.
But even so, the determinant
has some nice properties.
If you have a diagonal matrix,
then the determinant of a diagonal matrix
is the product of the diagonal entries.
The determinant of the inverse of a matrix
is the inverse of the determinant.
And the determinant of
a product of matrices
is the product of the determinants.
And of course, det A times
det B is the same thing as
det B times det A, which
is the same thing as
determinant of BA.
So just like with traces,
the determinant of AB
is the same as the determinant of BA.
So we can use the same argument
that we did with traces
and say if A is PDP inverse, then,
the determinant of A is
the determinant of D.
In fact, it's written out here
by a slightly different argument.
Since the determinant of a product
is the product of the determinants,
you just get the determinant of P
times the determinant of D
times the determinant of P inverse,
which is the determinant of P inverse,
so this term cancels this term,
and you get the determinant of D.
So the determinant is the
product of the eigenvalues.
So, now let's go back to our
matrix one, two, two, four.
Determinant is one times
four minus two times two
which is zero.
So, whatever the two eigenvalues are,
their product has to be zero.
Well that means that one
of them has gotta be zero.
And since the trace was five,
the other one has to be five.
So we'll call lambda two,
zero and lambda one, five.
Doesn't matter what order you put them in,
the eigenvalues are zero and five,
or five and zero, same thing.
Okay.
So more examples.
Our favorite matrix, two, one, one, two.
The trace is two plus two, that's four.
The determinant is two times
two minus one times one,
that's three.
So whatever the eigenvalues are,
they have to add up to four,
and they have to multiply out to three.
And the only way to do that
is if one eigenvalue is three
and the other is one.
Here's another one.
We take this matrix.
The trace is three plus
negative three, that's zero.
So whatever the eigenvalues are,
the second eigenvalue has
to be minus the first.
But the determinant is negative 25,
so can you think of two
numbers that add up to zero
and whose product is 25?
They have to be five and minus five.
If you look at this matrix,
its trace is zero and its
determinant is negative four.
So the eigenvalues have
to be two and minus two.
Now, we've, so far we've been doing just
two by two matrices,
because we've only got
two pieces of information,
the trace and the determinant.
If you wanna have, find the eigenvalues
of a three by three matrix,
well you need three pieces of information.
We'll get to that in the next video.
