If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Determinant when row is added

## Video transcript

let's keep messing with under determinants to see if we can get more useful results and they might not be obviously useful right now but maybe we will use them later when we are exploring other parts of linear algebra so let's say I have some matrix let's call it matrix X matrix X is equal to I'll just start with the 3 by 3 case because I think the 2 by 2 case is a bit trivial actually why don't I just start with the 2 by 2 case let's say matrix X is a B and then it has X 1 X 2 I could have called these C and D but you'll see why I call them X 1 and X 2 in a second and let's say I have another matrix let's say matrix Y is identical to matrix AK except for this row so matrix Y is a B y 1 and y 2 and let's say we have a third matrix Z let's say we have a third matrix C that's identical to the first two matrices on the first two on the first row so a B but on the second row it's actually the sum of the two rows of x and y so it's going to be the center is going to be x1 plus y1 and this entry right here is y sorry is x2 plus y2 just like that I want to be very clear Z is not X plus y all of the terms of Z are not the sum of all of the terms of XY I'm only focusing on one particular row and this is just a general theme that you'll see over and over again and we saw it in the last video and I guess you'll see it here is that that determinant so we're finding the determinants of matrices aren't linear on matrix operations but they are linear on operations that you do just to one row so in this case everything else is equal except for this row and Z has the same first row is these guys but its second row is the sum of the second row of these guys so let's explore how these the determinants of these guys relate so the determinant let me do it in X's color the determinant of X I'll write it like that is equal to a X 2 minus B X 1 see at multiple times the determinant of Y is equal to a y2 minus B y1 and the determinant of Z the determinant of Z is equal to a times x2 plus y2 minus B times x1 plus y1 which is equal to a X 2 plus a y2 just distribute the a minus B x1 minus b y1 and if we just rearrange things this is equal to a let me write it this way this is equal to a X 2 minus B x1 so that's that term and that term we switch colors so that's those two guys and then plus plus ay Y 2 minus B y1 now what is this right here that is the determinant of X that is the determinant of X and this right here is the determinant of Y so there you have it if we have matrices that are completely identical except for one row I'm in this case it's a 2 by 2 matrix so it looks like half of the matrix and this and Z's that row that we're referring to that's different Z's is the sum of the other two guys rows then Z's the Z's determinant is the sum of the other two determinants so this is a very special case I want to keep reading it's only works in the case where this row and only this row is the sum of this row and this row and the matrices are identical everywhere else let me show you the 3 by 3 case and I think it'll make it a little bit more general and then we'll go to n by n the N by n is actually on some level the easiest to do but it's kind of abstract so I like to save that for the end so let's redefine let's redefine all those guys in the into the 3 by 3 case so let's say that X is equal to a B C let's just do let's make the third row the row we're going to use to determine our determinant a b c d e f actually let me do the middle row because i don't want to make you think it always has to be the last row so it's the state's x 1 X 2 X 3 and then you have a d e f and what's the determinant of X going to be the determinant of x is going to be equal to let's say we're going along this row right here that's the row in question it's going to be equal to we remember your checkerboard pattern so it's going to be remember plus minus plus minus plus you remember all the rest how it goes so it's going to start with a minus x1 minus x1 x times the sub matrix to get rid of that column that row B CEF b.c.e F then you have plus x2 plus X 2 times the sub matrix get rid of that column that row ACDF a C D F and then finally minus x3 you get rid of its row and column you have a be de a B de now let me define another matrix Y that is identical to matrix X except for that row so it's a B C then down here d e f but that middle rows difference y1 y2 and y3 what's the determinant of Y going to be determinant of Y well it's going to be identical to the determinant of X because all the sub matrices are going to be the same when you cross out this row and each of the columns but the coefficients are going to be different sort of an x one you have a y one so it's going to be equal to minus y1 times B see determinant BC e f plus y2 times the determinant of a C D F minus y3 times the determinant of a be de I think you see where this is going now I'm going to create another matrix I'm going to create another matrix Z I'm going to create another matrix Z just like that that is equal to it's equal it's identical to these two guys on the first and third rows a b c d e f just like that but this row just happens to be the sum of this row and this row and when we figured out this determinant we went along that row you can see that right there so this row right here is going to be x1 plus y1 that's his first term x2 plus y2 and then you have x3 plus y3 now what's the determinant of Z going to be well we can go down this row right there so it's going to be minus x1 plus y1 times its sub-matrix get rid of that row that column you get B CEF you get B C D F I think you definitely see where this is going Plus this coefficient plus x2 plus y2 times its sub-matrix get rid of that row that column a C D F a C D F and then you have minus this guy right here x3 plus y3 times its sub-matrix get rid of that column and row abde a b d e now what do you have right here this is the determinant of Z this is let me do it in a this right here is the determinant of Z this thing right here I think you can see immediately if you were to add this to this you would get this right here right because you would have this coefficient and this coefficient on that if you added them up you would get minus x1 plus y1 this guy and this guy add up to this guy and then if I were to do this guy and this guy add up to that guy and let me do another one and finally that term Plus that term add up to that term so you immediately see that the determinant or hopefully you immediately see that the determinant of X the determinant of X plus the determinant of Y plus the determinant of Y is equal to the determinant of Z is equal to the determinant the determinant of Z so we did it for the 2 by 2 case we just did it for the 3 by 3 case might as well do it for the N by n case so we know that it it works but the argument is identical to this 3 by 3 case and that's good to keep in your mind 3x3 is easy to visualize n-by-n is sometimes a little bit abstract so let me define let me redefine my matrices again I'm just going to do the same thing over again so I'm going to have a matrix X but it's an N it's an X it's an N by n matrix now let's say so let me write it this way let's say it is a 1 1 a 1 2 all the way to a 1n and there's some row here let's say that it's let's say that there's some row here on row I let's call this row I right here and here it is has the terms x1 x2 all the way to xn but then everything else is just the regular A's so then you have a let me make this as a 2 1 all the way to 2 a 2 N and then if you went all the way down here you would have you would have a + 1 and you'd go all the way to a and n so essentially you could imagine our standard matrix where everything is defined a but I replaced row I with certain numbers that are maybe a little different and I think you'll see where I'm going now let me define my other matrix let me define matrix Y let me define matrix Y to be essentially the same thing this is a 1 1 it's the same a 1 1 this is a 1 2 all the way to a 1 n this is a 2 1 we could go all the way to a 2 N and then unroll I the same row this this is n by n this is the same N by n this was 10 by 10 this is 10 by 10 if this is row 7 then this is row 7 it has different terms it's identical to matrix X except for row I enroll I it is y 1 y 2 all the way to Y n and if you keep going down of course you have a + 1 all the way to a n n fair enough now let's say we have a third matrix let's have a third matrix let me draw it right here so you have Z Z is equal to I think you could imagine where this is going Z is identical Z is identical to these two guys except for Rho I so let me write so Z looks like this you have a 1 1 a 1 2 A 1 2 all the way to a 1n and then you go down and then row I happens to be the sum of the row I of matrix X and mote matrix Y so it is X plus X 1 plus y 1 X 2 plus y 2 all the way to xn plus yn and then you keep going down everything else is identical a + 1 all the way to a + n so all of these matrices are identical except for row X has a different role I then wrote then matrix Y does and Rosie is identical everywhere except it's row I is the sum of this row I and that row wise it's a very particular case but we can figure out their determinants so what are the determinants the determinant of X the determinant of matrix X I'm hopefully you're maybe a bit comfortable with writing Sigma notation we did this in the last matrix we can go down this row we can go down this row right there and for each of these guys we can say we can say that this so the determinant is going to be equal to the sum the sum let's say we start from J is equal to 1 J is going to be the column so we're going to go by it we take the sum of each of these terms from J is equal to 1 to N to N and then we remember our checkerboard pattern so we don't know if this is a positive or negative but we can figure it out by taking negative 1 to the I plus J remember this is the I throw that we're talking about x times X J XJ is the coefficient X sub J times the sub matrix the sub matrix for X sub J so if you get rid of this guy's row in this guy's column well what is it going to be we could say that that's the same thing as the sub matrix if we call this guy let me write it this way if we got rid of this guy's row in this guy's column if we had you know just our traditional matrix where this wasn't replay if we just had an AI AI one here AI two this would be its sub-matrix would be the same thing because we're crossing out this row in this column so would be you know all of these guys and all of these guys down here so it would be the sub matrix this is a n minus 1 by n minus 1 matrix it'd be the sub matrix for a IJ and then that's for the first term I'm sorry the determinant don't want to lose the determinant there times the determinant of the sub-matrix a IJ and so that's for the first term and then you're going to add it to the second term and then you're just going to keep doing that and that's what this Sigma notation is that's the determinate of X now what's the determinant of Y the determinant of Y is equal to is equal to the sum do the same thing J is equal to 1 to N of negative 1 to the I plus J each of them we're going to take we're going to belong this row right here the eighth row so we're going to have Y sub J right we're gonna start with y sub 1 then plus y sub 2 times the determinant of its sub-matrix which is the same as the determinant of this sub matrix when you get rid of that row in that column for each of these guys that everything else on the matrix is the same so a IJ the matrix of a IJ now what is the determinant of Z I'm pretty sure you know exactly where this is going the determinant this should be a capital y right there the determinant of Z is equal to the sum from J is equal to 1 to N of negative 1 to the I plus J we're going along this row but now the coefficients are X I sorry X J that's our what we're indexing along XJ plus YJ and then times its sub-matrix which is the same as these sub matrices so a I J which you might immediately see is the sum of these two things if I for every for every J I just summed these two things up you're having two coefficients you could have this coefficient and that coefficient on your on e on your a i J term and then when you add them up you can factor this guy out and you will get this right here you will get this right here so you get the determinant of X plus the determinate of Y is equal to the determinant of Z so hopefully that shows you the general case but I want to make it very clear this is just for a very particular scenario where three matrices are identical except for on one row and one of the matrices on that special row just happens to be the sum of the other two matrices for that special row and everything else is identical that's the only time where the determinant of Z not the only time but that's the only time we can make the general statement where the determinant of Z is equal to the determinant of X plus the determinant of Y it's not the case let me write what is not the case so not the case not the case that if that if let's say Z is equal to X plus y it is not the case that the determinant of Z is necessarily equal to the determinant of X plus the determinant determinant of Y you cannot assume this determinant operations are not linear on matrix addition they're linear only on particular rows getting at it anyway hopefully if not found that vaguely useful