okay this is the second lecture on determinants there were only three with determinance that's a fascinating small topic inside linear algebra you used to be determinants were the big thing in linear algebra was the little thing but they th those changed that situation change now determinance is one specific part a very neat little part and my goal today is to find a formula for the determinant it'll be a messy formula so that's why you didn't see it right away but if I'm given this n byn Matrix then I use those entries to create this number the determinant so there's a formula for it in fact there's another formula a second formula using something called co-actors so you you have to know what co-actors are and then I'll apply those formulas for some some matrices that have a lot of zeros away from the three diagonals okay so I'm shooting now for a formula for the determinant you remember we started with these three properties three three simple properties but out of that we got all these amazing facts like the determinant of ab equals determinant of a times determinant of B but the three facts were oh how about I just take 2 by tws let can I I know because everybody here knows the determinant of a 2X two Matrix but let's get it out of these three formulas okay so here's my my two 2 x two Matrix I'm looking for a formula for this determinant a b c d okay so property one I know what to do with the identity right property two allows me to exchange rows and I know what to do then so I know that that determinant is one property2 allows me to exchange rows and know that this determinant is minus one and now I want to use property three to get everybody to get everybody and how will I do that okay so remember that if I keep the second row the same I'm allowed to use linearity in the first row and I'll just use it in a simple way I'll write this Vector AB as a z plus 0 B so that's one step using property three linearity in the first row when the second row is the same okay but now you can guess what I'm going to do next I'll because I'd like to if I can make the matrices diagonal then I'm clearly there so I'll take this one now I'll keep the first row fixed and split the second row so that'll be an a Z and I'll split that into a c0 and keeping that first row the same a zero D I used for this part linearity and now I'll whoops not plus because I've got more coming this one I'll do the same I'll keep this first row the same and I'll split CD into c0 and z d okay now I've got four easy determinants and two of them are extremely well all four are extremely easy two of them are so easy as to turn into zero right which two of these determinants are C are zero right away the first guy is zero why is he zero why is that determinant nothing forget him well it has a column of zeros and by the well so one way to think is well it's a singular Matrix oh for for like 48 different reasons that determinant is zero it's a singular Matrix it has a column of zeros it's it's dead and this one is about as dead too column of zeros okay so that's leaving us with this one now what do I how do I know it's determinant following the rules well I guess one of the properties that we actually got to was the determinant of that triang of of that diagonal matrix then so I I finally getting to that determinant is the ad and this determinant is what what's this one minus because I would use property two to do a flip to make it CB then property three to factor out the b property C to factor out the c pro property again to factor out the C and that minus and of course finally I got the answer that we knew we would get but you see the method you see the method because it's method I'm looking for here not just a 2X two answer but the method of doing now I can do 3x3 and 4x4s and any size so if you you can see the method of taking each row at a time so let's what what would happen with 3x3 can we mentally do it rather than I write everything on the board for 3x3 so what would we do if I had 3x3 I would keep rows two and three the same and I would split the first row into how many pieces three pieces I'd have an A z0 and A Z b0 and a 0 0 C or something for the first row so I would in instead of going from one piece to two pieces to four pieces I would go from one piece to three pieces [Music] to what would it be each of those three would would it be nine or 27 oh yeah I've actually got more steps right I'd go to nine but then I'd have another row to straighten out 27 yes oh God okay let me say this again then if I if it was 3 by3 I would separating out one row into three pieces would give me three separating out the second row into three pieces then I'd be up to nine separating out the third row into its three pieces I'd be up to 27 three cubed pieces but a lot of them would be zero so now where when would they not be zero tell me the pieces that would not be zero now now I will write the nonzero ones okay so I have this Matrix I I I I think I have to use these start using these double symbols here because otherwise I could never do n by end okay okay so I split this up like crazy a bunch of pieces are zero whenever I have a column of zeros I know I've got zeros when do I not have zero when do I have what is it that's Like These Guys these are the survivors two survivors there so my question for 3x3 is going to be what are the survivors how many survivors are there what are they and when do I get a Survivor well I would get a surviv for example One Survivor will be that one time that one time that one with all zeros everywhere else that would be one Survivor a11 0 0 0 a22 0 0 0 a33 that's like the a d Survivor tell me another Survivor what other thing oh now here you see the clue now can should I just say the whole clue that I'm having the survivors have one entry from each row and each column one entry from each row and column because if some colum is missing then I get a singular Matrix and it that that's one of these guys see you see what happened with what like this guy column one never got used in z B 0 D so it's determinant was zero and I forget it so I'm going to forget those and just put so tell me one more that would be a Survivor well the a11 well here's another one A1 one z0 now okay that's used up row row one is used column one is already used so it better be zero what else could I have where could I pick the guy which column shall I use in row two use column three because here if I use column here I use column one in row one this was like the column numbers were one two three right in order now the column numbers are going to be one three column three and column two so the row numbers are 1 2 3 of course the column numbers are some okay some permutation of 1 2 3 and here they come in the order 132 it it's just like having a permutation Matrix with instead of the ones with numbers and and actually it's very close to having a permutation Matrix because I what I do eventually is I factor out these numbers and then I have got so that what is that determinant equ I factor those numbers out and I've got a11 * a22 * a33 and what does this determinant equal yeah now tell me that is we we're really getting to the heart of these formulas now what what is that determinant by the laws of by by our three properties I can Factor these out I can factor out the a11 the a23 and the a32 they're in separate rows I can do each row separately and then I just have to decide is that plus sign or is that a minus sign and the answer is it's a minus why minus because there is one row exchange to get it back to the identity so that's a minus now am I through no because there are other ways I what I'm really through with what I've done what I've what I've completed is only the part where the a11 is there but now I've got Parts where it's a12 and now if it's a12 that row is used that column is used you see the idea I could use this row and column now that column is used that column is used and this guy has to be here a33 and what's that what's that determinant that's an a12 * an a21 * an a33 and does it have a plus or a minus a minus is right it has a minus because it's one flip away from an from the regular the right order the diagonal order and now what's the other guy with a with a a12 up there I could have used this row I could have put this guy here and this guy here right you see the whole deal now that's an a12 a23 a31 and does that go with a plus or a minus yeah now that takes a minute of thinking doesn't it because one row exchange doesn't get it in line so what what is the answer for this plus or minus plus because it takes two exchanges I could exchange rows one and three and then two and three two exchanges makes this thing A Plus okay and then finally we have we're going to have two more 0 0 a13 a21 0 0 0 A320 and one more guy 00 a13 0 a22 0 a 31 0 0 and let's put down what we get from those an a13 an a21 and an a32 and I think that one is a plus and this guy is a minus because one exchange would put it would order it and that's a minus all right that has taken one whole board just to do the 3X3 but do you agree that we now have a formula for the determinant which came from the three properties and is must be it and I'm going to keep that formula that's a famous that 3x3 formula is one that if if the camera will follow me back to the beginning here I I get the ones with a plus sign are the ones that go down like down this way and the ones with the minus signs are sort of the ones that go this way I won't make that precise for two reasons one it would flutter up the board and second reason it wouldn't be right for 4x4s for 4x4 let me just say right away 4x4 Matrix the DI the the cross diagonal the wrong diagonal happens to come out with a plus sign why is that if I have a 4x4 Matrix with ones coming on the counter diagonal that determinant is plus why why Plus for that guy because if I exchange rows one and four and then I exchange rows two and three I've got the identity and I did two exchanges so this down to this like you know down toward Miami and down toward La stuff is uh like 3x3 only okay but I do want to get now I don't want to go through this for 4x4 I do want to get now the general formula so this is what I refer to in the book as the big formula so now this is the big formula for the determinant I'm I'm asking you to make a jump from 2x two and 3x3 to n byn okay so this will be the big formula that the determinant of a is the sum of a whole lot of terms and what are those terms and and is it a plus or a minus sign and I have to tell you which which it is because this came in in the 3X3 case I had how many terms six and half were plus and half or minus how many terms are you figuring for 4x4 if I get two terms in the 2x two case three ter six terms in the 3X3 case what's that pattern how many terms in the 4x4 case 24 four factorial why why four factorial this would be a sum of N factorial terms 24 120 720 whatever is after that okay half plus and half minus and where do those n factorial terms come from this is the moment to listen to this lecture where do those n factorial terms come from they come because the first the guy in the first row can be chosen n ways and after he's chosen that's used up that that column so the one in the second row can be chosen n minus one ways and after she's chosen that SEC second column has been used and then the one in the third row can be chosen n minus two ways and after it's chosen notice how I'm getting these personal pronouns but I've run out uh and I'm not willing to stop with three by three so I'm just going to write the formula down so the one in the first row comes from some column Alpha I don't know what Alpha is and the one in the SEC I multiply that by somebody in the second row that comes from some different column and I multiply that by somebody in the third row who comes from some yet different column and then in the N row uh I don't know what I don't know how to draw maybe Omega for last and the whole point is then that that those column numbers are different that Alpha Beta gamma Omega that set of column numbers is some permutation permutation of 1 to n it the N column numbers are each used once and that gives us n factorial terms and when I choose a term that means I'm choosing somebody from every row and column and then I just mult like the way I had this from row and column one row and column two row and column three so that what was the alpha beta stuff in that for that term here Alpha was One beta was two gamma was three the permutation was was the trivial permutation 1 two 3 everybody in the right order you see that formula it's you see why I didn't want to start with that the first day Friday I'd rather we understood the properties because out of this formula presumably I could figure out all these properties how how would I know that the determinant of the identity Matrix was one for example out of this formula why is if a is the identity Matrix how does this formula give me a plus one you you see it right cuz CU almost all the terms are zeros which term isn't zero if if a is the identity Matrix almost all the terms are zero because almost all the A's are zero it's only the only time I'll get something is if it's a11 * a22 * a33 only only the only the permutation that's in the right order will will give me something it'll come with a plus sign and the determin of the identity is one so so we could go back from this formula and prove everything we could even try to prove that the determinant of a b was the determin of a times the determin of B but like next week we would still be working on it because it's not uh uh clear from if I took AB my God you know the entries of a be would be all these pieces well probably it's probably historically it's been done but it won't be repeated in 1806 okay it it would be possible probably to see um why the determin of a equals the determin of a transpose that was another like Miracle property at the end that would that would that's an easier one which we could find okay is that all right for the big formula I I could take then a typical let me do an example which I I'll just create I I'll take a 4x4 Matrix I'll put some I'll put some ones in and some zeros in okay let me I don't know how many to put in to tell the truth I I've never done this before I don't know the determin of that Matrix so like mathematics is being done for the first time in in front of your eyes uh what's the determinant well a lot of there are 24 terms because it's 4x4 many of them will be zero because I've got all those zeros there maybe the whole determinant is zero I mean is that a singular Matrix that that possibility definitely exists I could I could uh so one way to do it would be elimination actually that would probably be a fairly reasonable way to I could use elimination so I could use go back to those properties that and use elimination get down eliminate it down do I have a row of zeros at the end of elimination the answer is zero I was thinking shall I try this big formula okay okay let's try the big formula how tell me one way I can go down the Matrix taking a one taking a one from every row and column and make it to the end so so I get something that isn't zero well one way to do it I could take that times that times that times that that would be one and and and I just said that comes in with what sign plus that comes with a plus sign because because that permutation I've just written the permutation about 4321 and one exchange and a second exchange two exchanges puts it in the correct order keep walking away don't don't okay we're executing a determinant formula here uh as long as it's not periodic of course if he comes back I me no all right all right okay so that would give me a plus one all right are there any others well of course we see another one here this times this times this times this strikes us right away so that's the order three the order let me make make a little different Mark here 3 24 and is that a plus or a minus 3214 is that is that permutation A Plus or a minus permutation it's a minus how do you see that what exchange shall I do to get it in the right order if I exchange the one and the three I'm in the right orders took one exchange to do it so that would be a plus that would be a minus one and now I don't know if there are any more here let's see what I could let me try again starting with this uh now I've got to pick somebody from oh yeah see you see what's happening if I if I if I start there okay column three is used so then when I go to next row that I can't use that I must use that now columns two and three are used when I come to this row I must use that and then I must use that so if I start there this is the only one I get and similarly if I start there that's the only one I get so what's the determinant what's the determinant zero the determinant is zero for that case because we we were able to check the 24 terms 22 of them were zero one of them them was plus one one of them was minus one add up the 24 terms zero is the answer okay well I didn't know it would be zero because I wasn't like thinking ahead I was a little scared actually as that uh that uh Apparition went by so and I don't know if the camera caught that so whether the rest of the world will realize that I was in danger or not we don't know but anyway right I guess he just wanted to be sure that we got the right answer which is determinate zero and then that makes me think okay the Matrix must be the Matrix must be singular and then if the Matrix is singular maybe there's another way to see that it's singular like find something in its null space or find a combination of the rows that give zero and like what what what combination of those rows does give zero suppose I add rows one and rows three if I add rows one and rows three what I get I get a row of all ones then if I add rows two and rows four I get a row of all ones so Row one minus row two plus Row 3 minus row four is probably the zero row it's a singular Matrix and I could find something in its null space the same way that would be a commin of columns that give zero okay there's an example all right so that's uh well that shows two things that shows how we get the 24 terms and it shows the great advantage of having a lot of zeros in there okay so we'll use this big formula but I want to pick I want to go onward now to co-actors onward to co-actors co-actors is a way of breaking up this big formula that connects this n byn this is an N byn determinant that we've just have a formula for the big formula so co-actors is a way to connect this n byn determinant to uh determinants one smaller one smaller and the way we want to do it is actually going to show up in this since the 3X3 is the one that we wrote out in full let's let me do this 3 by so I'm talking about co-actors and I'm going to start again with 3 by3 and I'm going to take the the exact formula and I'm just going to write it as a11 this is the this is the determinant I'm writing I'm just going to say a11 * what a11 * what and it's a11 * a22 a33 minus a23 a32 then I've got the a one two stuff times something and I've got the a13 stuff times something do you see what I'm doing I'm taking our big formula and I'm saying okay choose column that of the first row choose column one and take all the possibilities and those extra factors will be what we'll call the co-actor co meaning going with a11 so this in parenthesis are these are in the co-actors are in paren a11 time something and I figured out what that something was by just looking back if I can walk back here to the to the a11 the one that comes down the diagonal minus the one that comes that way that's those are the two only two that used a11 so there they are one with a plus and one with a minus and now I can write in the I could look back and see what used a12 and I can see what used a13 and those would be the co-actors of a12 and a a13 before I do that what's this number what is this co-actor what is it there that's multiplying a11 tell me what a22 a33 minus a23 a32 is for this what do you recognize that do you recognize let's see I could I'll put it here there's the a11 that's used column one then there's the other factors involve these other columns this row is used this column is used so this the only things left to use are these and this formula uses them and what's what's the co-actor tell me what it is because you see it and then then I I'll I'll be happy you see what the idea of co-actors it's a determinant of this smaller guy a11 multiplies the determinant of this smaller guy that gives me all the a11 part of the big formula you see that this the determinant of this smaller guy is a22 a33 minus a23 a32 in other words once I've used column one and Row one what's left is all the ways to use the other n minus one columns and n- one rows one of each all the other and that's the determinant of the smaller guy of size n minus one so that's the whole idea of co-actors and we just have to remember that with determinants we've got pluses and minus signs to keep straight can we keep this next one straight ah let's do the next one okay the next one will be when I use a12 I'll have left so I can't use that column anymore but I can use A2 2 1 and a23 and I can use a31 and a33 so this one gave me A1 time that determinant this will give me a12 time this determinant a21 a33 minus a23 a31 so that's all the stuff involving a12 but have I got the sign right is the determinant of that correctly given by that or is there a minus sign there is a minus sign I can follow one of these if I do that times that times that that was one that's showing up here but it should have showed it should have been a minus so I'm going to build that minus sign into the co-actor so so the co-actor so I'm put I put that minus sign in here so because the co-actor is going to be strictly the thing that multiplies the the factor the factor is a12 the co-actor is this is the parenthesis stop in parentheses so it's got the minus sign built in and if I did if I went on to the third guy there would be this and this this and this and it would take it determinant it would come out plus the determinant so now I'm ready to say what co-actors are so this would be a plus an a13 * its co-actor and over here we had plus a11 times its determinant but and there we had the a12 times its co-actor but the so the point is the co-actor is either plus or minus the determinant so let me write that Underneath Him what what is the what are co-actors the co-actor of any number a i j let's say this is this is all the terms in the in the big formula that involve AI J We're especially interested in a1j the first row that's what I've been talking about but any row would be all right all right so the the what terms involve AI J so it's it is it's the determinant of the N minus one Matrix without with row I column J erased so it's the it's a mat of size n minus one with of course because I can't use this row or this column again so I have the Matrix all there but now it's multiplied by A Plus or a minus this is the co-actor and I'm going to call that c i j Capital I'll use Capital C just to just to emphasize that these are important and emphasize that they're they're they're different from the A's okay so now is it a plus or is it a minus because we see that in this case for a11 it was a plus for a12 I this is i j it was a minus for this i j it was a plus so any any guess on the rule for plus or minus when we see those examples I Jal 1 one or 13 was a plus it sounds very like I + J odd or even that that doesn't surprise us and that's the right answer so it's a plus if I + J is even and it's a minus if I + J is OD so if I go along Row one and look at the co factors I just take those determinants those one smaller determinants and they come in order plus minus plusus plus minus but if I go along row two and and and take those co-actors those subd determinants they would start with a minus because the 2 one entry 2+ one is odd so the so like there's a pattern plus minus plus minus plus if it was 5x 5 but then if I was doing a co-actor then this sign would be minus plusus plusus plus minus plus a sort of checkerboard okay okay those are the signs that that are given by this rule i+ J even or odd and those are built into the co-actors the thing is called a minor without the before you've built in the sign but I don't care about those build in that sign and call it the co-actor okay so what's the co-actor formula what's the co-factor formula then let me come back to this board and say what's the co-actor formula determinant of a is let's go along the first row it's a11 times its co-actor and then the second guy is a12 * its co-actor and you just keep going to the end of the row a1n * its co-actor so that's co-actor form along Row one and if I went along row I I would those ones would be I's that's worth putting a box around that's the co-actor formula do you see that actually this would give me another way I could have started the whole topic of determinants and some some people might do it this choose to do it this way because the co-actor formula would allow me to build up an N byn determinant out of n minus one size determinants build those out of n minus 2 and so on I could boil all the way down to one by ones so what's the co-actor formula for 2 by two matrices yeah tell me that what's the co-actor for so here's the here's the world's smallest example practically of a of a of a co-actor formula okay let's let's go along Row one I take this first guy times its co-actor what's the co-actor of the one one entry D because you strike out the one one row and column and you're left with d then I take this guy B times its co-actor what's the co-actor of B is it C or it's minus C because I strike out this guy I take that determinant and then I follow the I + J Rule and I get a a minus I get an odd So it's b * minus C okay it of course it worked and the 3X3 works so that's the co-actor formula and that is uh uh it's it's a good formula to know and now I'm I'm I I'm I'm feeling like wow I'm giving you a lot of algebra to swallow here last lecture gave you 10 properties now I'm giving you and by the way those 10 properties led us to a formula for the determinant which was very important and I haven't repeated it till now what was that the the determinant is the product of the pivots so the pivot formula is is very important the pivots have all this complicated mess already built in as you did elimination to get the pivots you built in all this horrible stuff quite efficiently then the big formula with the N factorial terms that's got all the horrible stuff spread out and the co-actor formula is like in between it's got easy stuff times horrible stuff basically but it's it shows you uh how to get determinants from smaller determinants and that's the application that I now want to make so may I do one more example so I remember the general idea but I'm going to use this co-actor formula for a matrix so here's going to be my example it's I I promised in the in the course in the lecture uh outline at the very beginning to do an example and let me do I'm going to pick triagonal Matrix of ones I could I'm drawing here the 4x4 so this will be The Matrix I could call that A4 but my real idea is to do n byn to do them all so a I could everybody understands what A1 and A2 are yeah maybe we should just do A1 and A2 and A3 just for so this is A4 what what's the determinant of A1 what the determinant of A1 so so what's the Matrix A1 in this formula it's just got that so the determinant is one what's the determinant of A2 so it's just got this 2 by two and its determinant is zero and then the 3X3 can we see its determinant can you take the determinant of that 3x3 well that's not quite so obvious at least not to me being 3x3 I I don't know so here's here's a good example how would you do that 3x3 determinant we've got like n factorial different ways well three factorial so we've got six ways okay uh I mean one way to do it actually the way I would probably do it being 3x3 I would use the complete the big formula I would say I've got a one from that I've got a zero from that I've got a zero from that a zero from that and this direction is a minus one that direction is a minus one I believe the answer is minus one would you do it another way here's another way to do it look subtract Row three from I'm I'm just looking at this 3x3 everybody's looking at the 33 subtract Row three from row two determinant doesn't change so those become zeros okay now use the co-actor formula how's that how could how if this was now zeros and I'm looking at this 3x3 use the co-actor formula why not use the co-actor formula along that row because then I take that number times its co-actor so I take this number let me put a box around it times its co-actor which is the determinant of that and that which is what that 2x two Matrix has determinant one so what's the co-actor what's the co-actor of this guy here looking just at this 3x3 the co-actor of that one is this determinant which is 1 * negative so that's why the answer came out minus one okay so I did the 3X3 I don't know if we want to try the 4x4 yeah that's I guess that was the point of my example of course so I have to try it sorry I'm in a good mood today so you you have to stand for all the bad jokes okay okay so what was The Matrix uh okay now I'm ready for 4x4 who wants this who wants to guess the the I I I don't know frankly is 4x4 what's what's the determinant I plan to use co-actors okay let's use co-actors the determinant of A4 is okay let's use co-actors of the first row those are easier so I multiply this number which is the convenient one times this determinant so it's it's 1 * the this 3x3 determinant now what is do you recognize that matrix it's A3 so it's 1 times the determinant of A3 coming along this row is a one time this determinant and it goes with a plus right and then we have this one and what is its co-actor now I'm looking at now I'm looking at this 3x3 this 3x3 so I'm looking at the 3X3 that I haven't xed out what is that oh now it did A Plus or is it plus this determinant this 3x3 determinant or minus it it's minus it right because this is I'm starting in a one two position and that's a minus so I want minus this determinant but these guys are xed out okay so I got a 3X3 three well let's use co-actors again use co-actors of the column CU actually we could use co-actors of columns just as well as rows because because the transpose rule so I'll take this one which is now sitting in the plus position times its determinant oh oh hell what an oh yeah I shouldn't have said hell because it's all right okay one time the determin what is that Matrix now that I'm taking the this smaller one of oh but there's a minus right the minus came from from the fact that this was in the one two position and that's odd so this is a minus one times and what's and then this one is the upper left and it's the one one position in its Matrix so plus and what's this Matrix here do you recognize that that Matrix is yes please say it A2 and we that's our formula for any case a of any size n is equal to the determinant of a n minus one that's what came from taking the one in the upper corner the first co-actor minus the determinant of a n minus 2 what we discovered there is true for all in I didn't even mention it but I stopped taking co-actors when I got this one why did I stop why didn't I take the co-actor of this guy because he's going to get multiplied by zero and no no use wasting time or this one too the co-actor her co-actor will be whatever that determinant is but it'll be multiplied by zero so I won't bother okay there is the formula and that now tells us I could figure out what A4 is now oh yeah finally I can get A4 because it's A3 which is minus1 minus A2 which is zero so it's minus one you see we're getting kind of numbers that you might not have guessed so our sequence right now is 1 0 -1 - one what's the next one in the sequence A5 A5 is this minus this so it is zero what's A6 A6 is this minus this which is one what's A7 I'm I'm going to be stopped by either the time runs out or the board runs out here okay A7 is this minus this which is one I'll stop here because time is out but let me tell you what we've got what what these determinants have this series 1 0 - one - one 0 1 and then it starts repeating it's pretty fantastic these determinants have period six so the determinant of a61 would be the determinant of A1 which would be one okay I hope you likeed that example a non-trivial example of a triagonal determin thanks see you on Wednesday