Diagonalize 3x3 matrix

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
alright thanks for watching and today we would like to show you how to diagonalize a 3x3 matrix just to give you more examples and especially I want to show you how to find the eigenvalues because you usually are faced with cubic polynomials which is hard to solve so that set the the technique is the same as for a 2x2 matrix and if you curious I have done a video on the 2 by 2 case so let's calculate the determinant of lambda I minus a so let's first find the eigenvalues and by the way some people like a minus lambda I which is nice because you have you keep a and you just subtract lambdas from the diagonals I like lambda I minus a because then you have an equation of the form your lambda minus something times lambda minus something so you make less sine mistakes so basically take care of the sign mistakes first and then you don't have to worry about them so and to do that again you do minus a so like 1 minus 4 0 2 minus 3 2 and minus 2 4 minus 1 and on the diagonals you just put lambda so lambda plus 1 lambda and lambda and you might be tempted to do row reduction very bad idea instead let's just use a cofactor expansion so no zeros are you good friends so let's do that here and so then you get lambda plus 1 times determinant of lambda minus 3 lambda minus 1/4 and 2 with minus minus so plus 4 times the determinant of 2 minus 2 2 lambda minus 1 and plus 0 but we don't really care because 0 is just 0 and then you expand that out so plus one lambda minus 3 lambda minus 1 minus 8 and then plus 4 2 times lambda minus 1 minus 4 and then while you just expanded out again so lambda plus 1 and then lambda squared minus 4 lambda plus 3 minus 5 and then sir minus 8 plus 4 times so 2 lambda minus 2 minus 4 and then you simplify that and we see maybe here so lambda plus 1 times lambda square minus 4 lambda minus 5 and then plus 4 times 2 lambda minus 6 No so I already made a mistake so 2 times lambda minus 1 plus 4 okay so 4 times lambda 2 lambda plus 2 okay now I know I that most commenters will say hey but it's so much easier to factor lambda plus 1 here and lambda plus 1 here yes in this case is this true but I want to show you a case that works in general because in general you don't have those nice simplifications okay so in general what you would do is you would expand everything out so you would get lambda cubed minus 4 lambda squared minus 5 lambda plus lambda squared minus 4 lambda minus 5 plus 8 lambda and it simplifies to lambda cube minus 3 lambda squared and I think minus lambda and plus 3 notice this is really and the idea is we want to find the zeros of this and also here I guess you can also have a simplification lambda minus 3 also here as well again I understand in this example it might be easy but I really want to show you a technique that's a bit more general so blame the example for this okay now in general how would you find the solutions to this in general it is a pain okay but there is a theorem called the rational roots theorem which gives you sort of nice guesses for your solutions and in fact let me talk about that so maybe second step so our characteristic equation P lambda is lambda cubed minus 3 lambda squared minus lambda plus 3 and notice this first factor is 1 and what works here is that all the factors are integers but you know in general you can do that and we want to solve this equals 0 now there is this wonderful theorem which I don't know how to prove it's called the rational roots theorem theorem and that works really for ok it works it doesn't work it works for any polynomial with integer coefficients provided that that polynomial has some a fractional root so a rational root it could happen I think that it could not have a rational roots under some cases but usually in all the problems we give you it's probably a rational root so this actually kind of works now what does a rational root theorem say if this polynomial has a root lambda of the form a over B so if it has a rational root so if its root is a fraction where a and B are integers then it turns out and B are kind of nice so they're not 50,000 a guesses for a and B namely what we would have is that a must divide this constant so this term here and be must divide the leading term the device here the leading term one and I always get confused about the order but if you get confused about the order think about the equation lambda squared minus four equals zero then well the roots are plus or minus two and you basically see a the numerator has to divide minus 4 and the denominator has to divide one if it's B that divides minus four and a that divides one then it's weird you would have roots of the form one half or minus one half so that's not good so indeed that is the correct thing and look they're not fifty thousand choices for a and B you basically have that a is plus or minus 3 because 3 is a prime number if you had four it would be plus or minus 1 plus or minus 2 plus or minus 4 and for B it's even easier P is just plus or minus 1 and so for your guesses you just have to take all the possible combinations of fractions of plus so minus 3 and plus or minus 1 and in this case it gives you four guesses ok so it would give you a lambda so what possible fractions are there with sorry I forgot to say well of course it's plus or minus three but also plus or minus one that's very important also one divides three and minus one divided state so what possible guesses are there well there's a guess with a is 1 and B is 1 so 1 and then the guess with a is 1 B is minus 1 so 9 is 1 and the same thing so a is 3 and B is 1 we get 3 and if is 3 and D is minus 1 we get minus 3 and hopefully you should be convinced that those are really all the possible combinations they're not non other and basically you'll always be like plus or minus some fraction of their 2 so now those who give us our four guesses and all we have to do is pray and hope that one of our guesses works in general again in the prophecy usually give you yes one of the guesses will work but it's possible that you're so unlucky that none of the guesses works but that would just mean that the roots are crazy so it wouldn't be doable for dosa regular linear algebra prom all right so what you have to do so guess so plug in your guesses or try out lambda equals 1 and let's see if P of 1 is 1 so P of 1 is 1 cubed which is 1 minus 3 times 1 squared which is minus 3 minus 1 plus 3 let's see thumb dumb so dumb dumb dumb dumb and that's 0 bingo so in fact lambda equals 1 words suppose this doesn't work no problem you would go to the next root and see what happens and so on and so forth and if none of them works either the problem is too hard or you made a mistake either here you made a mistake in this finding a and B ok now the equals 1 works and I know some people will say well you can do it in lab that equals minus 1 and lambda 3 and lambda minus 3 if you get 3 roots you are done true here but again I want to show you general case so suppose lambda equals one what do you do you would take this polynomial and then use long division so I notice where we're still not at the eigenvector so still at the eigenvalues oh my god okay so let's do long division and let me show you amazing American long division so lambda cubed minus 3 lambda squared minus lambda plus 3 this we wanted divided by lambda minus 1 so we want to eliminate this lambda cubed so let's multiply this by lambda squared so lambda cube - I think lambda square if you subtract that from that you get minus 2 lambda squared minus lambda plus 3 now we want to get rid of this minus 2 lambda squared so that's your minus 2 lambda which gives you minus 2 lambda squared plus 2 lambda and then we get minus lambda plus 3 so minus 3 lambda plus 3 because we're subtracting this from this and then let's multiply this by minus 3 and we get minus 3 lambda plus 3 which gives you 0 so indeed another bingo here and that works and by the way why do I see American long division I don't know if you know the joke but I used to know it if I still know but there is a French way of doing this or you do lambda cubed minus 3 lambda squared minus lambda plus 3 and you divided by lambda minus 1 the problem is if you do it this way if your French way you go down like that and at some point unless you very efficiently you just get stuck here and you continue to work here but here look at all this freedom that you have so we have this whole whiteboard space to do this that's what I think it's also my Mary Kay long division and I heard that in Russia I'm not sure if it's true or not they do it this way they do one way here in one way here I don't know how that works Karl it's true okay so what have we found we found that actually our original polynomial lambda cubed minus 3 lambda squared minus lambda plus 3 is actually just equal to lambda minus 1 times lambda squared minus 2 lambda minus 3 and this one you can factor out so I know in America they're fat fat fantastic factoring this out but I'm not so just think of it as lambda plus 1 comes lambda minus 3 if you want use a quadratic formula and you want to set this equal to zero so indeed you get that all your I get values are 1 minus 1 and 3 which again you could have just guessed by using this rational roots theorem or by factoring this out earlier but in this case it could happen that the roots are irrational so this method would help us find those roots good so those are the eigenvalues and now we want to do the eigenvectors but i will just do it briefly ain't nobody got time for that so let's find the eigen spaces so I'm just going to do it for one eigenvalue so let's do it for lambda equals 1 and I would like to remind you that you know lambda I minus egg was just a matrix lambda plus 1 and minus 4 0 here to lambda minus 3 2 minus 2 4 lambda minus 1 so now was to your matrix the matrix whose determinant you took to find the eigenvalues now all you need to do is plug in 1 for your eigenvalues so a null space of 1 I minus a this case is just a null space of so 2 2 - 2 - 4 - 2 4 0 to 1 sorry 0 to 0 because again to get the eigen vectors for each eigen value you find a corresponding null space and to do that you just row reduce your matrix so simplify this first of all so notice for example you can divide this by 2 you can divide this by -2 and you can divide this by 2 so this is the null space of 1 1 - 1 + 2 1 - 2 and 0 1 0 and then you row reduce so for example you multiply the first row by minus 2 and add it to the second row so it's a null space of 1 1 minus 1 0 minus 1 and then minus 2 so 2 and then 0 very good and then 0 1 0 and then don't know how you wanna do this but you can you know add 1 times the second row to the third row so add them up so null space of 1 1 minus 1 0 minus 1 0 0 0 0 and by the way for this I get spacing at some point it should get a rose a rose but it was not quite true and then remember so even though this is in row echelon form for the null-space it's always best to get the reduced row echelon form so make the pivots one so null space of 1 1 - 1 0 1 0 0 0 0 and just make this term 0 and then you get that this the null space of 1 0 minus 1 0 1 0 0 0 0 and then you would just have to solve for this remember what is the null space is the set of solution of ax equals to 0 0 0 so if you do this matrix times X Y Z equals 0 0 0 then you get X minus Z equals 0 and y equals 0 let me continue over there and then what you get is simply you know x equals e and y equals 0 and then you want to figure out X which is X Y Z and well X is Z so Z Y is 0 and we get Z and we get Z 1 0 1 so the null space oh you know the eigen space corresponding to 1 so 1 I minus a is just the span of 1 0 1 and just a couple remarks and one thing that I made this music at least 50 times when I took a linear algebra which sucks because they were just like 70 problems so I mean it is almost every time you should never ever ever ever find that the null space is zero if the null space is zero it means you made an algebra mistake either in the row reduction or in finding the eigenvalues because the definition of an eigenvalue is a number such that this null space is not 0 okay and I don't quite remember the other remark but yeah and also I guess maybe that was it the nosepiece is always a span of some vectors and the point is this thing is what's called the basis for the eigenspace so 1 0 1 this set is a basis for the eigenspace for lambda equals 1 so if you want to think of it intuitively it's an eigenvector corresponding to lambda equals 1 and that was the first eigenvector now you have to do it for the other two but again I'm not gonna do it right now we have more exciting videos to make so lambda equals minus 1 then you just get the span of 0 1 1 and lambda equals 2 3 we just get the span of 1 minus 1 1 all right and lastly so a question like this wouldn't be fine the eigenvectors a question would be really find an invertible matrix P and a diagonal matrix D such a a is PDP inverse and to do that D it's simply your matrix of eigenvalues which here is 1 0 0 0 minus 1 0 0 0 3 and P is the matrix of corresponding eigen vectors which here is 1 0 1 and then 0 1 1 and 1 minus 1 1 so in some sense the order is important in the sense that you know for every eigenvalue you have to give a corresponding eigenvector but in the other sense the order is not important because they always switch the eigenvalues provided that you also switch the eigenvectors and if you curious why this is true there's another video i've done on diagonalization and legend of zelda which is really cool and which you should watch alright we're finally done with this and if you like that if you want to see more math please make sure to subscribe to my channel thank you very much
Info
Channel: Dr Peyam
Views: 80,478
Rating: 4.7129717 out of 5
Keywords: linear algebra, math, peyam, dr peyam, matrix, eigenvalue, eigenvalues, eigenvector, eigenvectors, diagonalization, diagonalizability, diagonalize matrix, rational roots theorem, factor out cubic, finding eigenvalues, finding eigenvectors, cubic polynomial, guess, long division, division, proper value, diagonalize 3x3, 3x3 matrix
Id: EblrLncv7a0
Channel Id: undefined
Length: 23min 1sec (1381 seconds)
Published: Sun Mar 31 2019
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.