In this video we're going to
continue our investigation
of what it means to take the
exponential of a matrix.
We're gonna see that by
diagonalizing the matrix
we'll understand the exponential
of the matrix very well.
Okay so let's recap
what we learned last time.
We learned that if you have
a real number, you can define the
exponential e^at to be a
function where the f'(t) is af(t)
and f(0) is 1.
If 'a' is a real number then
e^at is a real number.
If a is a complex number,
maybe you want to call it
z instead of a then f(t)
is the complex valued function
whose derivative is af(t) 
whose value at 0 is 1.
And you could also use
a power series whether
'a' is real or complex you can
define e^at to be the sum of
a^n t^n / n factorial
Okay. Now what if 'a' 
is a matrix?
Well the same kinds of
definitions work.
So if 'a' is a square matrix,
then we'll consider a function -
I'm going to call it F(t) just because
we're using capital letters for matrices.
So it's a matrix valued function
whose derivative is A*F(t)
Now if your A is a matrix and
F(t) is a matrix but you can
multiply two matrices
together to get a matrix.
We want F(0) now we don't want
it to be the number 1 anymore.
We want it to be
the identity.
And we could have done it
with a power series
and you can check that 
these are equivalent
because just like before
if you take the derivative
of this power series
term by term,
you get A * itself and
if you plug in t=0
you get the identity.
So this power series
satisfies the differential
equation so you like one
definition you like the
other definition,
doesn't matter which one.
And what do I mean by A^n?
I don't mean taking the nth power
of each matrix entry. 
I mean taking the matrix
times the matrix times
the matrix times the matrix
n times and A^0 means the identity.
Okay. Now for computing
these exponentials,
diagonalizing the matrix
helps a lot.
Because A is PDP inverse well then
A^2 is PDP inverse * PDP inverse.
But the P's in the middle cancel
you get P  D^2  P inverse.
And likewise if you take A^n
you're going to get P D^n P^-1
So whenever you take the
nth power of a matrix,
you see this is diagonal and
so you've got a matrix
times diagonal times
the inverse of a matrix
so that means that the eigenvalues
of A^n are the columns of P
and those are just the eigen --
sorry, eigenvectos of A^n
are the columns of P and
those are just the eigenvectors of A
and the eigenvalues of A^n
are the entries of D^n
and those are just the
nth powers of the
eigenvalues of A.
So the eigenvectors stay the same,
the eigenvalues you take powers
and if you want to think,
put another way,
D is this diagonal matrix,
D^n, just take the nth powers
of all the eigenvalues and
if you have the A is PDP inverse
A^n is PD^nP inverse
Eigenvectors are the same,
eigenvalues are not the same.
Okay. So now we can figure out what
e^At is using our power series.
We want this sum but we know
that a^n is just PD^nP inverse.
So we can pull the P and
the P inverse out of this
whole expression and get the
sum of D^n t^n / n factorial
and a P inverse on the right
and that means well D^n is just
lambda to the n and so
you add up all the terms
and you get a diagonal matrix
whose entries are these sums.
But these sums aren't any old function.
We saw that whether lambda is real
or complex that these sums give you
e^lambda(t).
So what you get is P times the
diagonal matrix whose entries
are the exponentials of
the original eigenvalues.
So e^at has exactly the same
eigenvectors as A because
they're the columns of P
and it's eigenvalues are
either the lambda_1t
either the lambda_2t
either the lambda_3t
either the lambda_mt.
And remember the lambda
may be complex in which case
e^lambda(t) you have to understand that
as e^ real part (t) that's how big it is
and then the imaginary part
tells you how fast its phase
goes around and around and around.
Okay. Now if you don't like
power series you could also
get it from the differential equation.
You see I claimed that this was e^at
was P times these eigenvalues
times P inverse.
Let's check to see if it satisfies
the differential equation.
We take derivative and you just
take a derivative term by term.
P doesn't depend on T so it comes
along for the ride and so does P inverse.
What you have in the middle is
lambda_1, e^lambda_1t
bang bang bang bang,
lambda_m e^lambda(mt)
That's just the derivative of
e^lambda(t) is lambda e^lambda(t)
and then if you have something
whose diagonal entries are
lambda e^lambda(t)
you can write that as a
product of two terms.
One whose diagonal entries
are lambda and one whose diagonal
entries are e^lambda(t)
and I could put in a P inverse
P here and that doesn't change anything.
And then we noticed that this
is A and this is our function f(t)
so we've just shown that the
derivative of f is a(f) and it's
not hard to see that if you take
f(0) you're taking e^0 lambda
for each one so you get
the identity.
So P times the identity
times P inverse
is the identity.
So if you prefer the differential
equation approach,
that works too.
Okay.
And that's it for 
the exponential.
Now if you have other functions of A,
you can define the sine of a matrix
or the cosine of a matrix
or the log of a matrix
or any analytic function.
If you've got any function
that can be expressed as an
infinite power series,
then you can define that
function of a matrix to
be just the same power series.
It's just instead of taking powers
of x you're taking powers
of the matrix and the same
rules about
diagonalization work.
Now here's some examples.
The sine of a matrix,
the natural log of the
identity plus the matrix.
I'm just taking the power
series for sin(x) or
the power series of 1+x
and I'm replacing x with a.
And as long as the eigenvalues
sit within the radius of
convergence of this power series,
the matrix series will converge.
And diagonalization is handy
if A is PDP inverse,
A^n is PD^nP inverse and
g(A) we add these all up
and we discover that we just
change the eigenvalues from
lambda to g(lambda) and the
eigenvectors stay the same.
Okay?
Now what happens if the matrix is
not diagonalizable?
If a matrix is not diagonalizable,
then the definition of g(a) 
is still good.
We still say that g(A) is
given by the power series.
This definition makes sense
whether A is diagonalizable or not.
But if A is not diagonalizable,
evaluating g(A) is sometimes trickier.
Okay? Enough said.
