 Welcome back everyone to our lecture series based upon the book linear algebra done openly. As usual, I'll be your professor today. Dr. Andrew missile nine. It's good to have you. My hellos come from Cedar City, Utah. And we're starting a new chapter today. We're going to be in chapter five, which is all about a magical topic known as the determinant of a matrix. The determinant is a multi linear function used to describe some aspects of matrices and it turns out it's used a lot. I've kind of deliberately postponed its discussion of determinants until near the end of the book chapter five. I kind of emphasize that although the determinant is important, sometimes there's an over emphasis on how necessary it is for a lot of a lot of linear algebra problems. And so we actually postponed until chapter five since we haven't needed it for really anything so far. On the other hand, I do want to mention that we have used the determinant in some places throughout this course here. So if you have the matrix, a two by two matrix a whose coordinates, whose, whose, whose numbers are ABCD, right, we had a formula for the inverse of the matrix. The inverse of a was equal to one over this number AD minus BC. And then you swapped a location of the diagonal entries and you negated the off diagonal coordinates, B and C there. And so this, this right here, this matrix is an example of something we'll talk about a little more in this, in this chapter, commonly referred to as the adjoint or adji kit of the matrix a. But our topic at hand right now is the following this number AD minus BC. This number, as we mentioned before, is the determinant of this matrix a. And so it turned out that the formula for the inverse of a matrix two by two matrix depends on this number which we call the determinant. And the matrix was invertible, if and only if the determinant was non zero. And so it was non singular, if and only if this determinant was equal, it was not equal to zero. And in this case the determinant was equal to this linear combination of the coefficients AD minus BC. And so what we want to see in this semester is in this chapter I meant to say is a generalization of this formula among some other applications of the determinant. What I want to do in today's lecture is introduce the notion of the determinant and start doing some basic calculations of determinants. All right. And so before we can define the determinant because the determinant itself is going to be defined recursively based upon what we call minor matrices. It begs that we define what a minor matrix is in the first place. Now determinants are only going to be defined for in by in matrices that is only for square matrices. And so given a square matrix a we're going to define the IJ minor matrix, a IJ, which is itself is a in minus one by in minus one matrix. So it has one less row. And one less column compared to the original matrix. And that's because the minor is formed by removing the ith row and the jth column of a. Now remember when it comes to matrices we always reference the row first. So we have this IJ position, we get the ith row first, and then we talk about the jth column. So when we talk about the IJ minor, we're talking about the ith row is going to be removed and the jth column. Let's see an example of this. So take a three by three matrix a you see in front of you five seven zero zero three zero and nine negative one negative six. And let's calculate a couple of minors let's first look at the one one minor. So what the one one minor would mean is that we're going to remove the first row and the first column. And so we just look at this matrix right here. The negative three, I'm sorry positive three zero negative one negative six. And so we record that two by two matrix right here, three zero negative one negative six. And that's then the associated minor. All right. Next, if we want to do the one two minor one two minor says we take away the first row and the second column always do rows and then columns. And so the one two minor would look like zero zero. Let me fix that zero nine and negative six. Okay. The next one is the two two minor. The two two minors form by removing the second row, second column. And so if we see what we have there we have the 509 and negative six zero zero sometimes look like six is nine and negative six. The two three minor. We end up with, well we first take away the second row third column, like so that gives us five, seven, nine and negative one. And then finally let's do the three three minor. This is achieved by taking away the third row, third column, which then leaves us with the matrix. Five, seven and zero three. Pretty easy stuff right here. These minors we just take away a row and a column and take away all the entries in those in those locations. Now, given a three by three matrix you're going to have nine minors, which really every every rowing column combination you take away is in direct correspondence with every position in the matrix. So three by three matrices have nine entries three times three so there's going to be nine minors. If we did a five by five matrix, there will be 25 different minors we could talk about five times five there. So I'm not going to list all of them I think this example is probably sufficient. So with this definition of minors out of the way. Let's talk about what we mean by the determinant. Given a matrix a and let's say the entries of a are going to be the numbers a ij. And again this is an in by in matrix is important there. The determinant of the matrix which will often denote this as DET of a. Sometimes it's just called you'll do not you'll just write the matrix a with like absolute values around it that would give us the determinant. Sometimes that might mean something else so the DET notations a little bit more preferable but you do see people denote the determinant that way. Also, you'll see people denote the determinant by you draw the matrix the way you did before but instead of these like these square brackets we had on the matrix, you'll put these vertical lines with no curling or bending to them whatsoever. So an example of this, we might take the determinant of the matrix 123456789789. And so you'll see that with the straight lines. This means we calculate the determinant of the matrix. It's not the matrix itself. Now, when we compute a determinant we're going to we're going to compute it recursively that is we use sub cases in order to define the determinant of any given matrix. So as a base case we're going to use one by one matrices. Now if you have a one by one matrix it's really just a number. That's all there is there's just one number right there. And so we're going to define the determinant just to be that number itself. And so for one by one matrices there's nothing to it so if you take a determinant of R you just get R. And this is again this is one of the reasons why the this notation can be a little bit confusing at times because we're not taking the absolute value of the number we're taking the determinant of the number. Now the good news is we rarely ever going to take the determinant of a one by one matrix so it's not usually too much of a concern for us two by two is often to be the base case we work with. In terms of completeness of definitions of one by one matrix is a is a matrix and it's determined is just considered just to be the single number. Now for larger matrices. So if you have more than more than one by one. We define the determinant of the matrix as this linear combinations of the determinants of the minor of each minors here so this a one one a one two a one and these were minors that we have defined previously. Compute the determinant of the minor all the minors along the first row. So this would be the one one minor you take away the first row first column, then you have the one two minor, you'll take away the first row second column, then you have the one three minor, the one four minor, all the way down to the one and minor. So you remove the first row in column. So going along the first row, you then take away always the first row and then you're going to take away the corresponding columns as you move down. And as you move down the sum, there's going to be these coefficients there's a one one, a one two, the next will be a one three a one four all the way down to a one in. And so these coefficients are the numbers in that first row, the first row first column first row second column first row third column first row fourth column, all the way down to the first row in column. So the the coefficient that sits in front of the determinant of the minor will be the entry that's in the row column combination that you're removing. Then also it's important to emphasize that this is an alternating somebody goes plus minus plus minus plus minus all the way down. And so this last number is a power of negative one, because it's plus or minus depending on how you go but it's there's always this alternating some plus minus plus minus plus minus. And so this right here this sigma notation is just a closed form of this expansion right here. It's a it's a combination it's an alternating sum of entries in the first row times the determinant of the corresponding minors. Let's see an example of that actually, before we do that, I want to actually convince you that this definition agrees with the two by two determinants we've done before. So if you have a two by two matrix whose entries are ABCD the determinant by the formula we did before. So we're going to have the first row first column. So this will give you the number a that's the number in the one one position. Then we're going to take the determinant of the minor of the one one minor which the one one minor as you can see would just be the one by one matrix D. So let's just attract from that the one two position, which the one two position is B, we remove the first row, second column that will then give you the minor of the minor will be just the one by one matrix C. We're not taking absolute values. So this will then give us well since the determinant of a one by one matrix is just the number itself, you get a D minus BC, which is what I claimed was the two by two determinants before. And so actually, most people can remember this two by two formula right here. And so it's because of this that will rarely ever use a one by one case whatsoever. So just to one by one or two by two determinants, you often remember the rule that you're going to take the product of this diagonal a A times D, and then you're going to take subtract from that the product of this diagonal C times B. And so this AD minus BC formula we use for two by two determinants. And so I'm going to use this in the future as we compute two by two determinants. So alright, here's the example I was actually expecting here, let's do a three by three determinant, take this matrix five seven zero zero three zero nine one negative six. If we expand this along the first row. So expand along the first row. So we're going to do the one one position so we get the number five because it's in the one one position. Then we calculate the determinant of the of the one one minor so we take away the first row and first column. That leaves behind three zero negative one negative six. We'll come back to that one in a second. We then subtract from that. We're going to do now the one two position, which is seven. Then we times it by the determinant of the associated minor. We take away the first row second column that leaves behind zero zero nine and negative six. And then finally we're going to add together the entry that comes from the third position that is the one three position. We get a zero right there. And then we times that by the associated one three minor, which will give us zero three nine and negative one. And so that formula we had seen previously that's recursive formula would expand for a three by three matrix in the following manner. So for each of these two by two determinants we have calculated and we're going to use that formula from the previous slide. So we get five times, we're going to get three times negative six minus zero times negative one. So that's the first two by two minor determinant. Then we get negative seven times, we're going to get zero times negative six minus zero times nine. And then the last one we're going to get zero times well, who cares honestly, because whenever, whenever you multiply something by zero, the product's going to be zero so it actually doesn't matter what this minor determinant turns out to be the product's going to be zero so I'm going to save us some computational effort and just keep the zero there at the end. All right. If we continue with this calculation, we get three times negative six which is negative 18. Then you get minus zero times negative one that's just zero. And so we can subtract zero if we want to but really I'm just going to just leave it as negative 18 right there. Then we get negative seven times well zero times negative six is zero. So we get zero there and zero times nine is also zero so if you subtract they still get zero. And then we had to plus zero from before. Because of the zeros, you get another product of zeros and then that zero just goes away right there. We just have to do five times negative 18, which gives us negative 90, which is the determinant of this matrix. In a little bit we'll try to give some significance of what this number is measuring. But for now I just wanted to give us the calculation in mind here. I did want to point out to you that this calculation actually worked out really nicely because of all the zeros we saw because we had a entry in the first row that was zero I didn't have to bother computing one of the minor determinants because of the factor of zero. And also because this second minor right here had a row of zeros that led to the minor determinant being zero as well so it kind of canceled out and then even over on the first one there wasn't there wasn't any cancellation of everything. But zeros in the presence of a matrix make for much simpler determinant calculations. So we really like zeros and we're going to kind of see in a little bit how we can how we can benefit from zeros inside of a matrix.