CHAPTER 04.06: GAUSSIAN ELIMINATION: Determinant of a Matrix Using Forward Elimination Method: Example   In this segment, we're going to find the determinant of a matrix, and we're going to look at an example.  So we're going to find the determinant of an example matrix, and the method which we're going to use to find the determinant of this example matrix is using the Gaussian elimination part of . . . which is the forward elimination part on the matrix, and use that to be able to find the determinant.   So what I'm going to do is I'm going to take an example like this one.  So let's suppose somebody says, hey, go ahead and find the determinant of this matrix, 25, 5, 1, 64, 8, 1, 144, 12, 1, and what we want to do is we want to follow the steps of forward elimination as given for the Naive Gaussian method, and see that how can we find the determinant of this matrix.  So basically what we are trying to do is once we convert . . . once we apply the forward elimination steps on this particular matrix, what's going to happen is that you're going to end up with an upper triangular matrix.  You're going to end up with an upper triangular matrix like this one, and once you end up with an upper triangular matrix like this one, then the determinant of this matrix will be same as the determinant of this matrix.  But we already know that the determinant of an upper triangular matrix is simply the multiple of the diagonal elements, so it makes it very easy to find out what the determinant of this original matrix is.    So let's go ahead and conduct these forward elimination steps on this particular matrix here, and then we can see that, hey, what the determinant of this matrix is.  So how do we go about doing that? So there will be two steps of forward elimination here.  In the first step of forward elimination, what's going to happen is that I'm going to make this element to be 0 and I'm going to make this element to be 0, because eventually I want to end up with 0 and 0 and 0 right here.  So I'm going to do it one at a time, so I'm going to take the first row, so what I'm going to do is take the first row and make . . . use this element to make this to be 0 and this to be 0.  So what I have to do is I'll have to divide this first row by 25 and multiply it by 64, and then subtract it so as to make this to be 0.  So what I'm going to do is I'm going to take 64 divided by 25, that turns out to be equal to 2.56, because I'll have to divide by 25 and multiply by 64, which means same as multiplying by 2.56.  So I'm going to take this 25, 5, and 1, which is my first row, I'm going to multiply it by 2.56, and what do I get by doing that? I get 64, 12.8, and 2.56.  And you can very well see that all I'm doing is taking a multiple of the first row, and I get this, and I'm going to subtract it from my second row right here, and what that's going to do is 64 is going to cancel with 64 here, is going to give me a 0, and that's what I want to eventually do, I want to get a 0 right there so that I can convert this into an upper triangular matrix.  So let's go ahead and write this down right here.  So I have 64, 8, and 1, which is my row two, this is my row two, and what I just got by multiplying first row by 2.56 is 64, 12.8, and 2.56, and I'm going to subtract the two.  So then we get 0, -4.8, and -1.56, this is what's going to happen to the second row after I subtract it.  So this is going to be my new row two. Now let's go ahead and see what we have to do for row three. In row three, I'll have to divide . . . divide by 25 and multiply by 144, because I have 144 in my third row, first column, so I have to divide by 25, multiply by 144, and that turns out to be 5.76.  So I'm going to again take the first row, which is 25, 5, 1, this is the first row of my original A matrix, I'm going to multiply it by 5.76, and the reason why I'm multiplying by 5.76 is because I want to get 144 here, so I'll get 144, 28.8, 5.76. And now what I'm going to do is I'm going to subtract this multiple of row one from row three.  So my row three is 144, 12, and 1, that's my row three, and I'm going to subtract this one from there, which is 144, 28.8, 5.76, and when I subtract it, I get 0, -16.8, -4.76. So that's my new row three. That's my new row three. So this has been, again, obtained by simply taking a multiple of one row and subtracting it from another row.  So what that means is the determinant has not changed. So the determinant of my original matrix, which was 25, 5, 1, 64, 8, 1, 144, 12, 1, will be same as the determinant of the changed matrix, which is 25, 5, 1, then I'll have a 0 here, then I'll have -4.8 here, -1.56 here, and a 0 again here, -16.8 here, and -4.76.    Now, I have not yet achieved the upper triangular matrix which I want to convert this coefficient matrix to, because I have to do the second step of forward elimination, because if you have three . . . three rows and three columns, you have to conduct 3 minus 1 steps of forward elimination.  So if somebody gives you ten . . . a 10-by-10 matrix to find the determinant of by using the forward elimination steps, you'll have to conduct nine steps, that's how it's going to work.  So in the second step of forward elimination, what I'm going to do is I want to make this to be 0.  So in order to make this 0, I'll use my second row in my second step . . . second row, second column in my second step to make this to be 0.  So I'll have to divide this second row by -4.8 and multiply it by -16.8, which means same as multiplying by -16.8 divided by -4.8, which turns out to be 3.5. So I'm going to take my second row right here, which is this one, which is 0, -4.8, and -1.56, and I'm going to multiply it by 3.5.  And when I multiply by 3.5, I get 0, -16.8, -5.46, that's what I get there.  Now I can take this particular row here, which is the multiple of the second row, and subtract it from my third row . . . third row of my . . . this matrix here.  So I'll take 0, -16.8, -4.76, this is my row three, and then I'm going to subtract this 0, -16.8, -5.46, and I'll end up with 0, 0, and 0.7.  So that will become my new row three now.  So that will become my new row three. So since that becomes my new row three, I will now be able to say that, hey, the determinant of the original matrix, which was 25 . . . of 25, 5, 1, 64, 8, 1, 144, 12, 1, is same as the determinant of what happened at the end of the first step of forward elimination, it was 25, 5, 1, 0, -4.8, -1.56, 0, -16.8, -4.76, and then it'll be equal to . . . it'll be equal to the determinant of the matrix which I get at the end of the second step of forward elimination, which will be the last step, because I have only three rows, three column, so 0, -4.8, and -1.56, 0, 0, 0.7.   So since the three determinants are the same, but I know how to calculate the determinant of an upper triangular matrix, because it is simply the multiple of the diagonal elements, that will be simply 25 times -4.8 times 0. . . . this is supposed to be, yeah, 0.7, and that gives you -84.  So that's what I get as the determinant of the . . . of the matrix there. And that's the end of this segment.