 Okay, welcome to this fifth topic, which is eigenvalues and eigenvectors. We'll introduce the problem and we'll see how to find eigenvalues. Finding eigenvectors is for the next video. So suppose that we are given a square matrix, just some matrix. But we are told that m multiplied by v is equal to lambda multiplied by v for some scalar, just some number, lambda, and for some column matrix, v. And a column matrix of course the same as a vector, I will just say vector from now on. Okay, so this scalar lambda could be positive, negative, or zero. Meanwhile, this vector v could be anything except the trivial boring case of just zeros. It's something other than that. Our challenge then is that we're going to be given a square matrix m and we have to look for any scalar, lambda, and vector v that satisfies the equation. And such a scalar is called an eigenvalue and such a vector is called an eigenvector. So in that language, m multiplied by some eigenvector gives us back that eigenvector just multiplied by a scalar, the eigenvalue. Okay, so first off, let's notice that if we are given a candidate a possible eigenvector v to try, perhaps for a multiple choice, then it's easy to test. We'll just go ahead and try it. So here's a square matrix 2 by 2, 2 for 1 minus 1. And suppose we write down v is equal to 1 minus 1. And this is suggested as a possible eigenvector. Well then, we would just test it out to see if it matches our equation. We'd try multiplying m by v. So here we go, 2, 4, 1 minus 1, and v is 1 minus 1 as a column. And so we do rho times column, that's 2, and minus 4 is minus 2. And again, rho and column, that's going to be 1 plus 1 is 2. And we notice we can take out minus 2 as a factor, and then it will be the vector left is 1 minus 1, but that is just v. So minus 2 is indeed a scalar that multiplies v. And we've succeeded in proving that v is our eigenvector, and our eigenvalue that goes with it is minus 2. Okay, so that's great if we're given eigenvectors to check out. But what if we're not given any eigenvectors or eigenvalues? Then we must find any possible eigenvalues for ourselves, there could be more than one. And for each, we must find the corresponding eigenvector v. And in this first video, we're just going to be finding those eigenvalues. Okay, so here's a little bit of quick manipulation and a side. We know our equation is mv is equal to lambda v. I can certainly just bring it all to the left-hand side and write mv minus lambda v is equal to 0 as long as I don't have to write that as vector 0. But now let's do something interesting. Let's insert the identity matrix, which won't change the equation, but it will be important for the next step. mv minus lambda times the identity times v is equal to vector 0. The identity doesn't change the equation, but now I can factor out both those two matrices, the m and the minus lambda times the identity. That's a matrix, I can factor those out and it allows me to write that line. Now, that is a form of the equation. It turns out this can only be solved for any interesting v, any v other than just 0s. If the following equation is true, which we can easily prove, but we're not going to prove in this video, m minus lambda times the identity, the determinant of that is equal to 0. So we're going to have plenty of time to think about that, but let me just put a green box around it because that is the fundamental equation we're going to use. This will allow us to find all the eigenvalues that satisfy our basic eigenvalue equation. So let's do an example. It's the best thing. Let's do m as a 2, 4, this was the one we had before, 2, 4, minus 1, little square matrix. And so let's write down what this lambda times the identity is. For a 2 by 2, it's going to be lambda, 0, 0, lambda, very simple. And so this matrix, that's the difference of the two of them, 2 minus lambda, 4, 1, minus 1, minus lambda, just the difference of those two things as a determinant is equal to 0. That's all. So there we have it. We've just subtracted lambda off the down the diagonal, but now we need to solve this. So we just write out the determinant, 2 minus lambda, multiplied by minus 1 minus lambda, down the diagonal, minus 4, the off diagonal, is equal to 0. All right, so we expand this out. Minus 2 minus 2 lambda, plus lambda, plus lambda squared, minus 4 equals 0. Let's come over here for a bit more space, tidy that up a bit. What have we got? Lambda squared minus lambda is equal to 0. Solve this. Actually, it's quite easy to factor. That's going to be equal to 0. So that's true if either lambda is equal to 3 or it's equal to minus 2. And those are our two eigenvalues. We found them using that equation in the square box. Let's crack on and do one with a 3 by 3 matrix M. Here we go. Matrix M is equal to let's have minus 2, 1, 3, 1 minus 1, 0, and minus 1, 1, 2. I've worked that one out. I've checked that before and it will work for us nicely. Now, let's remember, of course, the rule from the previous screen. And we just need to apply that. So let's go ahead and write it as a right-hand determinant out. We need to have minus 2 minus lambda and then just 1 and minus 1 minus lambda and 3, 0, 2 minus lambda. I'm just subtracting lambdas down the diagonal, making it a determinant, setting it equal to 0. Now, I'm going to work along this row because it's got a 0 in it. So that makes me like it a bit more as a determinant. The first number is going to be minus 1. Why? Because it's a 1. And let me just quickly write out our little lookup table of pluses and minuses for doing determinants. So it was a 1 and then it picked up a minus sign. And then we have the mini determinant that's made out of those four terms. So that's 1, 3, 1 and 2 minus lambda. All right. And then the next term is going to be plus and then the term itself is minus 1 minus lambda. And the mini determinant that we get when we exclude that row and that column is just made out of the corner terms. That's going to be minus 2 minus lambda and 3 and 1 and 2 minus lambda. That's it because the zero term gives us nothing. So it was only those two mini determinants. Let's write them out. Minus 1, 2 times lambda, 1 is 3. Let's expand that one out. And then this one has the term in front minus of 1 plus lambda. And then we have to expand out the determinant minus 2 minus lambda times 2 minus lambda down the lead diagonal. Minus minus 3 is plus 3. There we are. Is equal to zero. And then we just need to tidy that up. We need to clean it up a bit. That's going to be minus of minus lambda minus 1. For the first term, let's turn that into pluses multiply through by the minus 1. And here we have minus. Let's make that lambda plus 1 right that way around and then tidy up inside here. We expand it out minus 4 plus 2 lambda minus 2 lambda plus lambda squared and this 3 is equal to zero. We need to keep on working to tidy that a bit more. This term here is in fact going to be just, I see the lambdas cancel out lambda squared minus 1. That's very nice. That's come down very, very neatly. So now we can really tidy that up and we can take out a common factor of lambda plus 1. And the first term was just that. So there's one for that. And the second term we've just found is lambda squared minus 1. Pause the video and check you agree that that's a tidied up version of the equation. Now the way that can be zero is either the first term is zero which requires lambda is equal to minus 1. So there's one eigenvalue for us. That's one option. Values has been found. Or the second term here has to be zero. So let's do a bit more work with that. What we're saying is to neaten that up, we're saying that 2 minus lambda squared is equal to zero. In other words, lambda squared is equal to 2. And so lambda is going to be plus or minus square root of 2. That's two more eigenvalues, 3 in all, that we found for this 3 by 3 matrix. And in the next video, we'll see how to take each of these values and derive the corresponding vector.