So, in this example, we're going to look at how to compute the eigenvalues and eigenvectors
of a matrix. Eigenvalues and eigenvectors pop up a lot, especially in single processing
applications. In this little video, we're just going to work on the mechanics of how
you compute these for a matrix. So we're going to work with the matrix A.
The matrix A is 4, 6, 10, 3, 10, 13, minus 2, minus 6, minus eight. So this is the matrix
we're going to be working with. And we're going to first compute the eigenvalues of
the matrix A. And we denote the eigenvalues as lambda sub i. That's the notation that's
commonly used for eigenvalues is to note each one as a lambda value.
Since we're working with a 3 by 3 matrix, we will have eigenvalues lambda 1, lambda
2, and lambda 3. And we know that lambda i's, all these eigenvalues that we want to compute,
are the roots of what we call the characteristic equation of the matrix, which is the determinant
of A minus lambda I equals 0. So if we can compute the determinant of this
quantity, set it equal to 0, and find these roots, then we will have found the eigenvalues
of the matrix. In this equation right here that I've just boxed in, this is the equation
that you can use for any n by n matrix. This is the general equation that you need to solve.
So we need to compute this specifically for the example we're working, the determinant
of A minus lambda I. So here's our matrix A. Here is lambda times the identity matrix
I. And then you see we're using the lines to indicate the determinant. That's common
notation, so spelling out det, you put vertical lines around the matrix, and that means take
the determinant. So after we take 4, 6, 10, our matrix A, and
subtract off the identity matrix times i, we have this, which simplifies to 4 minus
lambda 6, 10, 3, and then 10 minus lambda in the second diagonal element there, and
then minus 2, minus 6, and minus 8 minus lambda, because we're subtracting off lambda from
minus 8. So we need to compute the determinant of this matrix.
So let's just re-copy that down right here. So to compute the determinant, we do the co-factor
expansion. So I'm going to have the quantity 4 minus lambda times this 2 by 2 determinant,
which comes from the lower 2 by 2 entries of the original matrix, minus 6 times this
other 2 by 2 matrix, and then plus 10 times this other 2 by 2 determinant, which comes
from the lower left hand 2 by 2 matrix of the original matrix.
So this is just standard co-factor expansion. And we've now simplified this 3 by 3 determinant
into doing three 2 by 2 determinants. So we can go ahead and write these out and expand
them, because we know the rules for doing 2 by 2 determinants. It's going to be 10 minus
lambda times quantity minus 8 minus lambda minus the other cross terms multiplied 13
times negative 6. So that's one term. And then we'll do the exact same expansion for
the second determinant. We'll have 3 times quantity minus 8 minus lambda, minus 13 times
negative 2 and then plus 10 times 3 times the negative 6 minus the other cross terms.
So really what we have here are three different terms that I'm going to label 1, 2, 3. And
we need to add all these together. But we're going to attack them one piece at a time to
simplify the algebra. So let's go ahead and work on the first term. Here is the first
term. It's 4 minus lambda, and if I start multiplying these things out, 10 times negative
8 is negative 80, 10 times negative lambda is minus 10 lambda. Then the other cross terms
are negative 8 times negative lambda, which gives you 8 lambda, and then a negative lambda
times a negative lambda gives you a lambda squared, and so on.
So if I do all those, and then 13 times 6 is 78, I get this, which I can simplify a
little bit. Negative 80 plus 78 gives me negative 2. And then I have a negative 10 lambda and
an 8 lambda sitting there, so that's minus 2 lambda. Then, lambda squared stays by itself.
I can't simplify that at all. And I'll go ahead and multiply and distribute all of this.
So I'm just going to distribute each of these things. 4 times a negative 2 is negative 8,
4 times a negative 2 lambda is negative 8 lambda, 4 times lambda squared is 4 lambda
squared. And then, similarly distribute the minus lambda
across everything. So we have six terms, and we can go ahead and combine all those. And
we get minus lambda cubed plus 6 lambda squared minus 6 lambda minus 8. So this is an expression
for term 1, which is just one of the three terms that we need.
We'll do similar work on the other ones. These are a little bit simpler. They don't have
quite as many terms. So minus 6, then expand to that. 26 minus 24 is 2, so we end up with
2 minus 3 lambda. If I go ahead and distribute the minus 6, I get negative 12 plus 18 lambda.
So here's a simplified expression for term 2.
And then, finally, term 3, same type of distribution of the multiplication and just algebraic simplification
gives us a simplified expression of 20 minus 20 lambda. So what we have done here is we've
computed each part of this determinate expression. I now know that the determinant of A minus
lambda I is term 1 plus term 2 plus term 3. And I have nice simplified expressions for
each of these. This is term 1, this is term 2, and this is term 3.
So now, I just have some more algebra to do. And if I combine like terms, I end up with
minus lambda cubed plus 6 lambda squared minus 8 lambda-- notice the only lambda terms I
have are 18 lambda and minus 20 lambda and this minus 6 lambda. So if you add all that
up, that turns into minus 8 lambda. And then the only constant terms are minus 8 minus
12, which is minus 20. But then there's a plus 20, so that gives you 0. So that's why
it's plus 0. So we've done what we needed to do. We've
computed this characteristic equation. And then what we do is we set it equal to 0. And
this is now a third order polynomial in lambda that I need to solve for the roots, because
this will give me the eigenvalues. So really, what we have here is the equation lambda cubed
minus 6 lambda squared plus 8 lambda is 0. And I can factor that. I can factor out a
lambda to give me lambda times quantity lambda squared minus 6 lambda plus 8.
And now, I can go ahead and see one of the eigenvalues pretty easily. I can see that
for the value of lambda equals 0, I have 0 equals 0, so lambda 1 equal to 0 is one of
my eigenvalues. And then, the other two eigenvalues I come from solving this quadratic equation,
second order polynomial, which I can do with the quadratic equation minus b plus or minus
the root of b squared minus 4ac over 2a. If I just plug in the specifics for our problem
here, b is a negative 6. So a negative negative 6 is a positive 6. b squared is 36, minus
4 times 1 times 8, over 2 times 1. So now I'm just doing some simple algebra. 4 times
1 times 8 is 32, so inside the root, I have 36 minus 32, which is 4. So this is really
a 6 plus or minus 2 over 2. So when you do minus, you have 6 minus 2 is 4. 4 over 2 is
2. So one of the roots is lambda 2 equal to 2.
Then the other term will be when we add 2. 6 plus 2 is 8. 8 over 2 is 4. So the other
eigenvalue is lambda 3 equal to 4. So, we've now solved for the three eigenvalues. Lambda
1 is 0, lambda 2 is 2, and lambda 3 is 4. Let's go ahead and compute the eigenvectors
associated with each of these eigenvalues. The eigenvector as we denote, V sub i. Since
we're working with a 3 by 3 matrix, we will have V1, V2, and V3. And remember, to compute
the eigenvectors, each eigenvector is just the null space of A minus lambda I times the
identity matrix. So we're going to be evaluating this for each eigenvalue for little i equals
1, 2, and 3. So let's go ahead and compute V1. For V1,
the corresponding eigenvalue is lambda 1 equals to 0. So I actually need to solve the equation
A minus lambda 1 times the identity, which is equal to A minus 0 times the identity,
because my eigenvalue was 0, which is just equal to A. So I need to find the null space
of A. And this will tell me what V1 is. So, to find the null space of A, I write down
the matrix A, and I augment it with 0's, and now I'm just going to do row manipulations
to solve this system of linear equations. So the first thing I'll do is I'll let E3,
equation 3, equal 2 times E3 plus equation 1. So if you do that, this simplifies to this
system of linear equations now. I've modified equation 3. Equations 1 and 2 have stayed
the same, but I have reduced it a little bit to this one.
And then let's go ahead and do another manipulation. Let's let equation 1 equal 1/4 of equation
1. So everything in that first equation is going to get divided by 4. The equations 2
and 3 will stay the same. And then let's do another manipulation. Let's let E2 equal E2
minus 3 E1. So here, equation 1 will stay the same, equation 2 is going to change to
this because it's now equal to E2 minus 3 E1, and then E3 will remain unchanged because
I haven't done any manipulations on equation 3.
And finally, let's let E2 equal 2/11ths of E2. So we're just going to multiply it by
a scalar. And we'll do the same thing for E3. We'll take E3 and negate it and divide
by 6. So equation 1 will remain unchanged, E2 is going to turn into 0, 1, 1 because I
multiplied everything by 2/11ths so 2/11ths cancel with 11/2. And similarly, for E3, I'm
going to to divide everything by a negative 6, so the negative 6's turn into positive
1's when I do the revision. And then finally, let's let E3 equals E3 minus E2. So now the
first two equations will remain unchanged, but now I'm going to get a row of 0's here
for my last equation. So I have simplified my system of linear equations
as much as possible by doing row operations. And now looking at this, I can go ahead and
write down the solution. z is obviously equal to any value that we'd like. It's a free variable
because the last row is all 0's. By looking at the second equation, we see that y needs
to equal a negative z. And then looking at the first equation, we see that x plus 3/2
y plus 5/2 z has equal 0. If I solve for x, that means that x has to equal a negative
3/2 y minus 5/2 z just by moving to the other side.
And now, if we plug in the relationship for how y and 0 are related, we can simplify this.
We know that y has to equal a negative z, so if I replace y with negative z, my minus
3/2 y turns into 3/2 z, and now I just have z's. 3/2 z minus 5/2 z is equal to a negative
z. So I've now solved this system of linear equations. z can be any number, y has to be
a negative of that number, and x also has to be a negative of that number.
So, since z is a free variable, I'm just going to pick a specific value for it. I'm going
to let z equal 1. And now I can construct my eigenvector. The eigenvector V1 is going
to have a 1 for the z-coordinate. x has to equal negative 1 because x must equal negative
z. And similarly, y must equal a negative 1 because y also has to equal a negative z.
So this is my eigenvector V1. We can now do similar things for V2. I need
to compute A minus lambda 2I. Lambda 2 is equal to 2. So I have A minus 2I. I plug this
in to my equation. We'll move through this one a little bit faster. It's just algebra.
You can slow it down if you need to to check the steps. But we're just evaluating this
matrix. So we now have the matrix A minus 2I. And what do I need to do to find the eigenvector
V2? Again, I just have to find the null space of this vector.
So we set up our system of linear equations to be equal to 0's. And then, I will do row
operations until I manipulate it to where I can solve this system of linear equations.
So I'm going to let E3 equal to E1 plus E3. I'm going to add those two together. So equation
1 remains unchanged. Equation 2 remains unchanged. E3 is equal to the sum of E1 and E3, so it
turns into 0's. The next manipulation I'll do is I'll let
E1 equal 1/2 E1. So I'm going to divide everything by 2. Equation 2 remains unchanged, and equation
3 remains unchanged. And now I can go ahead and subtract. Let E2 equal E2 minus 3 E1.
So E1 will remain unchanged, but E2 turns into this, and E3 remains unchanged.
And now I can go ahead and look at this, and write down my solution. Again, since I have
all 0's in my third row, z can be anything. From the second equation, we have that minus
y minus 2z has to equal 0, so solving for y, I get y must equal a negative 2z. And then
from the first equation, we have x plus 3y plus 5z has to equal 0. So solving for x,
we get minus 3y, but y is equal to a negative 2z. So I get x is equal to a negative 3 times
a negative 2z minus 5z, which simplifies to z.
So we now have a nice solution. z can be any number. y has to equal a negative 2 times
that number, and x has to equal that number z. So now let's pick a number for z. I'm free
to choose anything that I want. I'll let z equal 1. And now, I can construct V2. If z
is 1, then the third coordinate of V2 has to be equal to 1. The second coordinate y
has to be equal to negative 2 times that, so I get a negative 2. And the first coordinate
has to be equal to z, so I get 1. So here's my third eigenvector.
If we wanted to, we could even check. We could take A times this, and what you'll get out
if you do the computations is you get 2, a negative 4, 2, which is equal to 2 times my
starting vector. So this is just the definition of the eigenvector. When I put my eigenvector
into my matrix A, I get out that eigenvector scaled by the value of the eigenvalue. So
we now have V2. And finally, let's compute V3. So the same
approach. I have to compute A minus lambda 3 times the identity matrix, which is equal
to this matrix. And now I have to find the null space of this matrix, and that will give
me V3. So I set up my system of linear equations to solve for the null space. I start doing
my manipulations to solve this system of linear equations.
The next operation I'll do is E2 is E2 minus 3 E1. E1 remains unchanged. E2 changes to
this. E3 remains unchanged. I'll let E3 equals E3 plus 2 E2. So E1 remains unchanged. E2
remains unchanged. E3, we get all 0's. And now we're back in a similar situation. z can
be any number. From the second equation, I have minus 3y minus 5z equals 0. So I solve
for y to get y in terms of z. And from the first equation, I can solve for x in terms
of z, which simplifies to minus z. So again, I'm free to choose any value for
z. The general solution is z is any number, y is a negative 5/3 z, and x is a negative
z. So I could just let z equal 1, just like I have been. But I'm going to try to make
my answer just look a little nicer. I'm going to choose z equals 3. So when I construct
V3, z has to equal 3. y will be a negative 5 because y is equal to minus 5/3 z. The 3rd
and the z equals 3 cancels, so you get minus 5. And then since x has to equal a negative
z, the first coordinate has to be a negative 3.
And again, if I wanted to, I could check. I could check the A times this vector. If
you do the math, it comes out to minus 12, minus 20, 12, which is equal to 4 times my
starting vector. So this is just the definition of the eigenvector. What I put in for A to
operate on is what comes out scaled by the eigenvalue.
And that concludes our little example of how to compute eigenvalues and eigenvectors of
a matrix. Eigenvalues are always roots of that characteristic equation, and eigenvalues
are always solutions of the null space of the equation A minus lambda I.