So Close and Yet So Far: What you can do if you know ALMOST every Eigenvalue.
November 30, 2010
Linear Algebra is strange. On the surface, we have a ton of tricks that we can apply to things to make calculations nicer (diagonalizing matrices, finding orthonormal bases,…) but deeper down a lot of things connect to one-another in really unexpected ways — to me, anyway!
Here’s the problem. We have an matrix called , and we have eigenvalues. We have ALMOST every eigenvalue, but we’re just missing one. What can we do about this?
There’s a few possible ways. For example, the less creative way is:
Multiply the values together for each eigenvalue and find the characteristic polynomial for the matrix — now divide.
But this way requires us to take a messy determinant, and that’s kind of annoying. What can we learn from taking just the regular determinant? That is, instead of computing , why don’t we just compute ? Ultimately, this is not much easier (in particular, on my computer, the difference in calculating this is less than a few seconds for a 100×100 matrix) but we already have a ton of information at our disposal: namely, the other eigenvalues. Let’s recall two important things:
The trace of a matrix is the sum of the eigenvalues.
The determinant of a matrix is the product of the eigenvalues.
You should be able to prove these with little effort — and, if not, they’re in every linear algebra text book. Recall that the trace is the sum of the diagonal elements.
So, what can we do with these? Let’s note the following.
If we have that are eigenvalues for , then we have that our final eigenvalue is equal to
Yes. That’s it. You just add up the trace, and you subtract. This is significantly faster than trying to take the determinant again, but, recall, we need a lot of information about this beforehand — we actually needed all buy one eigenvalue initially.
In fact, in addition to this trick, if we have two eigenvalues missing, we can use the determinant and the trace together to solve for the last eigenvalue in almost the same way. We’ll do an example of this below.
Let’s say we have the following matrix, , which is equal to
We’re gonna solve this two different ways. First, suppose some jerk comes up from behind you in a coffee place, sees the matrix, and tells you, “Oh, yeah, one of the eigenvalues is .” You begrudgingly thank him, but you wonder how to find the other one. Well, it’s easy.
which is the solution.
Let’s do this one a different way now. Suppose no one talks to you at the coffee shop because you’re kind of awkward, so you don’t know either of the eigenvalues. Yes, you could do that characteristic polynomial thing, but because we only need to know two eigenvalues we can use the following trick:
We can make this into a nice quadratic now by noting that
and so replacing this into the first equation, we get
which we rewrite as
note that we’ve multiplied by to make things look nice. Using the quadratic formula, you’ll find the eigenvalues that we found above.
Note that this is not necessarily any easier than finding the characteristic polynomial — just another way to do the same problem!
Alright, that last one wasn’t too hard, even using the characteristic polynomial. So, let’s try this one on for size:
We can do it the normal way, which (in this case) is quite easy since this is upper triangular. Alternatively, if we know one of the eigenvalues is (which we can find simply from the definition of eigenvalue; it kind of “pops out at you” in this case. Matrices with eigenvalues of 1 often have this property where it’s relatively obvious just by multiplying an arbitrary vector by to see what you get.) we can use our alternate method.
The determinant here is just 1, and the trace here is 3. Hence,
Well, what does this tell us? Rearranging the first equation, we get
and plugging this in give us
giving us the quadratic equation
which is just
which, as any high school student knows, is
implying our other two eigenvalues are also 1. This particular example was easy, but in the case where the eigenvalues are more complicated (or even complex!) this method comes in handy. Note, in fact, in this case, it would have been much easier to calculate the characteristic polynomial — this is not always the case, especially if the matrix is not upper triangular.
One more example. This time, it’s not gonna be upper triangular. Let’s let be the following matrix:
Let’s be exceedingly clever here: just multiplying by an arbitrary vector, we find that is an eigenvalue. (I usually multiply it out, and then see if either $\lambda = 1, -1$ work first, or if there’s any other obvious values from the equations we obtain.)
Now what? Well, it would be annoying to do the characteristic polynomial. So, let’s do the trace.
and so we need
or, in other words
Computing the determinant is kind of annoying here, but let’s expand by minors on the last row (you can do it anyway you want, though):
Well, that wasn’t so bad. Now, we have
and this is just
Using a fancy calculator, or by the quadratic formula, we get that the roots of this are
which are the eigenvalues and as required! See, that wasn’t so bad?
To be completely honest, I only use this method when I have a 3×3 matrix and I’m having a hard time factoring the cubic. I just keep trying numbers until I get something nice, and usually this is -1 or 1, and I then either divide out to get a quadratic, or if the determinant is easy to take (lots of zeros on some row) I’ll just quickly compute that and the trace. It amounts to exactly the same thing, really, it’s just if you’d rather use synthetic division or compute a determinant. Different strokes.
(Edit: I have been noticing, lately, that I also use this method to check to see if I’ve got the eigenvalues correct. On a midterm exam for linear algebra, for example, we needed to find the eigenvalues for some matrix, and I accidentally factored a quadratic wrong — am embarrassing mistake! — by putting instead of . Since I knew the first two eigenvalues had to be (I’d found the eigenspaces for these) I realized that since the trace was equal to 3, I must have the last eigenvalue equal to 2. Sure enough, I found my sign error, but if I didn’t know this trace trick it may not have been so easy to realize that I was just making a sign error instead of an error in some more irritating and substantial way.)