From the series: Differential Equations and Linear Algebra

*
Gilbert Strang, Massachusetts Institute of Technology (MIT)
*

*y’ = Ay* are stable (solutions approach zero) when the trace of *A* is negative and the determinant is positive.

This is a good time to do two by two matrices, their eigenvalues, and their stability. Two by two eigenvalues are the easiest to do, easiest to understand. Good to separate out the two by two case from the later n by n eigenvalue problem.

And of course, let me remember the basic dogma of eigenvalues and eigenvectors. We're looking for a vector, x, and a number, lambda, the eigenvalue, so that Ax is lambda x. In other words, when I multiply by A, that special vector x does not change direction.

It just changes length by a factor lambda, which could be positive. It could be zero. Could be negative. Could be complex number. It's a number, though. So that's the key equation.

Let me go toward its solution. So I want to move that onto the left hand side. So I just write the same equation this way. And now I see that this matrix times the vector gives me 0.

Now, when is that possible? That matrix can't be invertible. If it was invertible, the only solution would be x equals 0. No good. So this matrix must be singular.

It's determined it must be 0. And now we have an equation for the eigenvalue lambda. So lambda is how much we shift the matrix to make the determinant 0. We shift by lambda times the identity to subtract that from the diagonal.

So can I begin with very easy two by two matrix, the kind that we met first, called a companion matrix. So we met this matrix when we had a second order equation. So I started with the equation y double prime plus By prime plus Cy equals, say, 0.

So I started with one second order equation. And then I introduced y prime as a second unknown. So now I have a vector unknown, y and y prime. And then, when I wrote the equation down-- I won't repeat that-- it led us to a two by two matrix.

Two equations for two unknowns, y and y prime. So there is a two by two matrix that we're interested in. But we really are going to be interested in all two by twos. So let me take that to be my matrix A, my companion matrix.

So I just want to go through the steps of finding its eigenvalues. What are the eigenvalues of that matrix? We just take the matrix, subtract lambda from the diagonal, and take the determinant. And when I take the determinant of a two by two matrix, it's just that times that, which is minus lambda times minus lambda is lambda squared.

This gives me a B lambda. And the other part of the determinant is this product, minus C. But it comes with a minus sign, so it's plus C. So there's my equation for the eigenvalues of a companion matrix. And of course you see that's exactly the same equation that we had for the exponent s.

So lambda for the matrix case is the same as s, s1 and s2 for the single second order equation. So this equation has solutions e to the st when the matrix has the eigenvalues lambda equal s. Those same s1 and s2.

But now I move on to a general two by two matrix. What are its eigenvalues? What does that equation looks like for its two eigenvalues? So this will be a special case of this.

Here, I have a general matrix, a, b, c, d. I've subtracted lambda from the diagonal. I'm taking the determinant. That'll give me the two eigenvalues. Let's do it.

Minus lambda times minus lambda is lambda squared. Then I have a minus lambda d and a minus lambda a. So I have an a plus a d lambda. And then I have the part that doesn't involve lambda. The part that doesn't involve lambda is just the determinant of a, b, c, d. It's just the ad and the minus bc.

So there's an ad and a minus bc, and all that is 0. It's a quadratic equation, second degree. A two by two matrix has two eigenvalues, the two roots of that equation. I just want to understand more and more and more about the connection of the roots, lambda 1 lambda 2, to the matrix a, b, c, d.

If I know the two by two matrix, this tells me the eigenvalues. So this will, being a quadratic equation, have two roots. So if I factor this, this will factor into lambda minus lambda 1 times lambda minus lambda 2. And of course, if the numbers are nice, then I can see what lambda 1 and lambda 2 are.

In that case, I find the eigenvalues. If the numbers are not nice, then lambda 1 and lambda 2 come from the quadratic formula, the minus b plus or minus square root of b squared minus 4ac. The quadratic formula will solve this equation, will tell me these two numbers.

And if I multiply it out this way, I see lambda squared. I see minus lambda times lambda 1 and lambda 2. And then I see plus lambda 1 times lambda 2 equals 0. Here, I've written the equation for the two lambdas. Here, I've written the equation when I know the two lambdas.

Why did I do this? I want to match this with this and see that this number, whatever it is, is the same as that number. They show up there, the coefficient of minus lambda. So that's the first step, that lambda 1 plus lambda 2 is the same as a plus d.

Just matching those two equations. This is just like a general fact about a quadratic equation. The sum of the roots is the minus coefficient of lambda. And then the constant term is the constant term. So lambda 1 times lambda 2 is ad minus bc.

These are facts about a two by two matrix, a, b, c, d. The sum of the eigenvalues. So this is the sum of the eigenvalues-- so I'll put s-u-m to indicate that I'm looking at the sum-- is that a plus d. A plus d are the numbers on the diagonal. So that's a little special.

When I add the diagonal numbers, I get something called the trace of the matrix. I'm introducing a word, trace. Trace is the add up down the diagonal. And that matches a plus d.

And this one is the product of the eigenvalues lambda 1 times lambda 2. So that's the product. And that's equal to the determinant of a. I'm just making all the neat connections that are special for a two by two.

So that if I write down some matrices, we could look at them immediately. Let me write down a matrix. Suppose I write down that matrix. Oh, let me make them 0, 1-- well, 0, 4-- ah, let me improve this a little.

2, 4, 4, 9. 2, 4, 4, 2 would be even easier. Sorry. I look at that matrix. I see immediately the two eigenvalues of that matrix add to 4. 2 plus 2 is 4. I took the trace.

The two eigenvalues of that matrix multiply to the determinant, which is 2 times 2 is 4 minus 16 minus 12. So the sum here for that matrix would be 4. The determinant of that matrix would be 4 minus 16 is minus 12.

And maybe I can come up with the two numbers that have add to 4 and multiply to minus 12. I think, actually, that they are six and minus 2. I think that the eigenvalues here are 6 and minus 2 because those add up to 4, the trace, and they multiply 6 times minus 2 is minus 12. That's the determinant.

Two by two matrices, you have a good chance at seeing exactly what happens. Now, my interest today for this video is to use all this, use the eigenvalues, to decide stability. Stability means that the differential equation has solutions that go to 0.

And we remember the solutions are e to the st, which is the same as e to the lambda t. The s and the lambda both come from that same equation in the case of a second order equation reduced to a companion matrix. So I'm interested in when are the eigenvalues negative.

When are the eigenvalues negative? Or if they're complex numbers, when are their real parts negative. So can we remember trace, the sum, product, the determinant. And answer the stability questions.

So I'm ready for stability. So stability means either lambda 1 negative and lambda 2 negative. This is in the real case. Or in the complex case, lambda equals some real part plus and minus some imaginary part. Then we want the real part to be negative.

Real part of a lambda, which is a, should be 0. So that's our requirement. If the eigenvalues are complex, we get a pair of them and the real part should be 0 so that e to the-- the point about this negative a is that e to the at will go to 0. The point about these negative lambdas is that e to the lambda t will go to 0.

This is stability. So my question is, what's the test on the matrix that decides this about the eigenvalues? Can we look at the matrix-- maybe we don't have to find those eigenvalues. Maybe we can use the fact.

Again, the fact is that lambda 1 plus lambda 2 is the trace and lambda 1 times lambda 2 is the determinant. And we can read those numbers off from the matrix. Then there's a quadratic equation.

But if we only want to know information like are the eigenvalues negative? Are their real parts negative? We can get that information from these numbers without going to finding the eigenvalues from that quadratic equation. Wouldn't be that hard to do, but we don't have to do it.

So suppose we have two negative eigenvalues. Then certainly, this would mean the trace would be negative. Because the trace is the sum of the eigenvalues. If those are both negative, trace is negative. So we can check about the trace just right away.

What about the determinant? If that's negative and that's negative, then multiplying those will give a positive number. So the determinant should be positive. So trace less than 0. Determinant greater than 0. That is the stability test.

That's the stability test. Stable. The two by two matrix A, B, C, D, if its trace is negative and its determinant is positive, is stable. That's the test.

And actually, it works also if lambda comes out complex because lambda 1 plus lambda 2-- lambda 1 is a plus i omega. Lambda 2 is a minus omega. The sum is just 2a. And we want that to be negative.

So again, trace negative. Trace negative even if the roots are real or if they're complex. That still tells us that the sum of the roots is negative and the determinant also works.

If a plus i omega times a minus i omega-- in this case, lambda 1 times lambda 2-- if I multiply those numbers, I get a squared plus omega squared. With a plus. So that would be positive. And we're good.

So my conclusion is this is the test for stability. And I can apply it to a few matrices. I wrote down a few matrices. Can I just look at that test-- can you look at that test-- and just apply it to see.

So here's an example. Say minus 2, minus 1, 3, and 4. Is that any good? The trace is minus 3. That's good. The determinant is 2 minus 12 minus 10. That's bad. That's bad.

So that would be unstable. That has a negative determinant. Unstable. So I'll put an x through that. Unstable.

Let me take a stable one. Stable one, I'm going to want like minus 5, and 1, let's say. That's OK. The trace is negative. Minus 4. And now I want to make the determinant positive.

So maybe I better put like 6 and minus 7. Just picking numbers. So now the determinant is minus 5 plus 42. A big positive number. And the determinant test is passed. So that is OK. That one would be stable.

If this was my matrix A, then the solutions to dy dt equal Ay, y prime equal Ay is my differential equation. The two solutions which would track the eigenvectors would have negative lambdas. Negative lambdas because the trace is negative and the determinant is positive. Passes the stability test and the solutions would go to minus infinity.

That's two by twos. Thank you.

Select a Web Site

Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .

Select web siteYou can also select a web site from the following list:

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.

- América Latina (Español)
- Canada (English)
- United States (English)

- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)

- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)