 In this video we're going to solve the system of linear equations involving three equations, three unknowns, which you can see here on the screen. The first equation is x minus y plus z equals 8. The second is 2x plus 3y minus z is equal to negative 2. And then thirdly, we get 3x minus 2y minus 9z is equal to 9. And I want to solve this system of linear equations using the technique of Gauch-Jordan elimination. Now with regard to this elimination algorithm, the first step we're going to do is we're going to rewrite our linear system as a augmented matrix where each variable becomes a column in our matrix and each equation becomes a row. So the first equation becomes the row 1 minus 1 plus 1 augment 8. The second equation becomes 2, 3, negative 1, negative 2. The third equation becomes 3, negative 2, negative 9 and positive 9. So then we look for the leftmost non-zero column, which is going to be the first column typically. And I'm going to pivot position at the very top right there. For Gauch-Jordan elimination, it's really nice if you have a 1 in that pivot position, which we already do by convenience. If we didn't, we could perhaps scale or interchange or do some things like that. But I have a 1 in the pivot position. That's super nice and ideal. What I need to next do is get rid of the numbers that are below the pivot position. I want those to be zeros. And I can use row replacement to do that. We're going to replace row 2 with row 2 minus 2 times row 1. So 1 times negative 2 is negative 2. Negative 1 times negative 2 is positive 2. We're going to get a negative 2 right here and negative 2 times 8 is negative 16. To get rid of the 3 here, we're going to replace row 3 with row 3 minus 3 times row 1. So we're going to get a minus 3 here, a plus 3, a minus 3. And then negative 3 times 8 is negative 24, like so. So then we're going to copy down our matrix, but we can now apply these changes that we've just done here. So the first row isn't going to change whatsoever. Again, no change is happening there. So we're going to get 1, negative 1, positive 1 and 8. The second row is because of the row replacements we did are going to be the following. Looking at the second row, 2 minus 2 is 0, 3 plus 2 is 5. Negative 1 minus 2 is negative 3, negative 2 minus 16 is going to be a negative 18. Then for the third row, we're going to get 3 minus 3, which is 0. Negative 2 plus 3, which is 1. And then negative 9 minus 3, which is negative 12. And then 9 minus 24 gives me a negative 15 right there. So as I row reduce the matrix, we get the following. That now takes care of the first column. I'm now going to move my pivot position to the 2, 2 spot and then repeat this process. All right, now as I look at this matrix here, you can't use the first column or first row anymore for the purposes of row reduction. That's why the pivot position's here. Now, for Gauss-Jordan elimination, we want a 1 inside of that pivot position. One option is to use scaling for which we could scale the first row, the second row, excuse me, by one fifth, that is we could divide by five. The problem is that would give us a bunch of fractions that we don't want. A much more simple approach is notice there's a 1 below the 5. What you could do instead is you could interchange rows two and three. And that would then put a 1 in the pivot position and you'd have no fractions. That's a nice goal here because like I said this before, students here can struggle, honestly, anyone, not just students. But we're more likely to make some arithmetic mistakes as our numbers get more complicated. So if you can keep things simple, avoid fractions, that'll do us a huge favor there. So just by interchanging the rows, you can sometimes put a 1 in your pivot position like we just did there. So now we have a 1 there. So now with the 1, you can start zeroing out everything that's above or below the 1. Like we want to get rid of this negative one right here. We can do that by taking row 1 and replacing row 1 with row 1 plus row 2. So you're gonna get a plus 1 here, a minus 12 there, and a minus 15 there. We want to get rid of this 5. So we're gonna replace row 3 with row 3 minus 5 times row 2. So we're gonna get a minus 5 right here. Then 12 times 5 is 60, so you're gonna get a positive 60 right there. And then 5 times 15 there. Let's see, that's gonna be 75, positive 75. So we're gonna get that there as well. And so then recording the matrix down below, we didn't do anything to the, well actually we did do something in the first row here. Not in the first column though, that's because you're adding a zero to the one right there. Zero times one is a zero, so you add, so you don't have to worry about the pivot columns you've already row reduced anymore. But then using the rest of row one, negative one plus one is zero. One minus 12 is a negative 11, and then eight minus 15 gives us a negative seven. We didn't do anything to row two, so we just copy it down. Zero, one, negative 12, negative 15, and then for the last row, we're gonna get zero, five minus five is zero. Then you're gonna get 60 minus three, which is 57. That kind of feels like an awkward number to have here, but fortune shines upon us. Because 75 minus 18 is likewise 57. It's almost as if someone had intended it to work out so simply, hmm, maybe. Anyways, we've now row reduced columns one and two. So our pivot position moves to the third, the three position, 57. We need to have a one there, and there's no other rows to interchange with, because we've now run out of rows. So the only way to get a one there is to scale. And this is why I say fortune shines upon us. Because if we divide by 57, row three, that's the only way to get a one in the pivot position. But fortunately, as both numbers are actually 57, when we divide by 57, we don't get any fractions, which yay, the peasants rejoice at that moment. And life goes on with harmony with the universe. We're happy with this right now. So the third row is gonna look like 001 and one. I'll indicate our pivot positions again. We're interested in the three, three position, but we've already row reduced the first and second columns here. Now that a one in the pivot position, that's where our dreams come true. We can get rid of the numbers above the pivot positions fairly simple. Simply I should say, we can get rid of the negative 11 here by replacing row one with row one plus 11 times row three. So we're gonna get 11 right here and also 11 right there. To get rid of the negative 12, we're gonna replace row two with row two plus 12 times row three. So we get a 12 right here and a 12 right here as well. And so then, as we simplify this matrix one more time, we're gonna get a one, zero, negative 11 plus 11 is zero. That's a pretty nice one. 11 minus seven, though, gives us a four. That's the number we're really interested in. In the second row, we get zero, one, zero. Cuz again, negative 12 plus 12 is zero. Then we're gonna get negative 15 plus 12, which is negative three. And then last, so we get zero, zero, one, one. Indicating our pivot positions. Notice we now have obtained pivots in all three columns. Everything that's in a pivot position is a one. Everything outside of it is zero. This is a clear indication that our coefficient matrix is in row reduced echelon form, which for us means that we're done with this problem. So now we have to interpret our solution right here. The final solution to this problem is that x, y, and z need to be the points four, negative three, and one. That is the correct solution is to have x equal to negative, positive four. Y equals negative three and z equals one. That'll be the only solution to this system of linear equations. And sure enough, if we go back to the original problem, remember this one, four, negative three, one. We can go back to the problem and check here. If I take four, negative three, which actually makes this a positive three, and one, that sure enough adds up to eight. So that's the solution. For the next one, two times four is eight, three times negative three is negative nine. And then you're gonna get a negative one, which that of course adds up to be a negative two. Eight minus nine minus one is negative two there. And then lastly, four times three is 12. Negative two times negative three is a positive six. And then negative nine times one is just a negative nine there. 12 plus six is 18 minus nine is nine. We see that this solution in fact checks off with each of the three equations. This is a solution to the linear system. And as we showed from this calculation, this is the only solution there is. This is the independent consistent case. And we're gonna solve this using Gauss Jordan elimination.