in the last two videos we had a great reminder of what a system of equations is and we started to work with row operations and matrices now we want to talk about row reduction in echelon form so I want to show you what some of those forms are so there are two forms that you need to be familiar with one is a chillon form the other is reduced row echelon form which will often see as rref or sometimes you'll just see that as re F which is reduced echelon form if special on form is kind of like the triangle form that we talked about in our last video and I was talking about Gaussian and Gauss Jordan elimination in echelon form all nonzero rows and up to this point we haven't had any rows that were all zeros but sometimes you do so all nonzero rows are above all zero rows each leading entry of a row is in a column to the right of the leading entry of the row above it and again that's why it was triangle form because as we were writing this let's say I had this would be a zero all zero row that would obviously be near the bottom or at the bottom if you had more than one all zero row they would all both be on the bottom or all so for instance I could have something like two seven six three two zero because we talked about needing that zero one four nine three and then I might have even three zeros and a seven and a six this would be an echelon form and again it looks kind of like triangle form that we talked about before and again all entries in a column below a leading entry are zero so here I've got a leading entry of two and all zeros below it here I have a leading entry of one and all zeros below it and here I have a leading entry of seven and Xero's below it and all of those rows as we can see cascade down to the right that is called a chillon form if we want reduced row-echelon form then each leading entry in a nonzero row is a 1 and so in our last video I kind of did that naturally as I turned them into ones just because they were easier and each leading one is the only nonzero entry so essentially what we're saying is I've got a 1 here and that's the only value on the coefficient side of the matrix so obviously I can have something else on the right side which is the solution I might have a couple of zeros and then three not three it has to be a one one zero four and then remember this would be illegal because they're not cascading down to the right so I would have to had swapped their roots rows I can have a one here and then I still can have an all zero row so that's an example of reduced row echelon form it has all of the same things that a chillon form has but all leading entries are one and all non ones are zeros Tibbits what are they what do we need them for well a pivot you're going to hear quite often and it's just terminology that tells us that we're looking at that leading coefficient in the row so previously when we talked about a chillon form or reduced row echelon form a pivot position corresponds to where the one would be in reduced row echelon form or essentially what's the leading value so here the leading coefficient is 1 and here notice we've got zeros before hands so the leading coefficient is 2 those are pivot positions in pink the pivot column is just the column that contains the pivot position and then a pivot is a nonzero number in the pivot position used to create zeros in your row operations so what we're going to do now is we're going to use these pivots and use the essentially the same steps we were looking at in the last video but we're going to solidify what those steps should be which is of course the row reduction algorithm so the algorithm essentially gives you steps to follow in order to find the solution in the easiest fastest way possible so the first thing you should do of course is to write it as a Augmented matrix which I didn't add that as a step because honestly I shouldn't have to so let's write that quickly and my algorithm says begin at the left most non 0 column so that's code for start right here that's a pivot column select a nonzero entry as the pivot an interchange if necessary to move that entry into the pivot position which is Row one so we really want that first left-hand top row to be a pivot and the only time that's not going to be a pivot is when there is no value in the first column which really would never happen because if there wasn't a value in the first column we just wouldn't have the first column it would start at the second column so I don't have to do step one because I already have a one exactly where I want the one however let's say this guy was my first row then I would have to do a swap in order to get a one into that first position step two in our algorithm is to use row operations to create zeros and entries below the pivot so here's my pivot I want to now create zeros here and here now as we can see I'm pretty fortunate I already have a zero in Row three to get a zero in Row two I would need to add negative 2 to positive 2 so that's exactly what I'm going to do I'm going to take negative 2 times Row one add it to Row 2 and that's going to be my new Row 2 now again we're doing a lot of mental math here but if you need to you can feel free to go ahead and write the negative 2 0 6 negative 16 to help you in your calculations because I'm going to be adding that to Row 2 for my new Row 2 so Row 1 is going to remain the same and Row 3 is going to remain the same and Row 2 is going to be 0 - 6 + 9 and then negative 16 + 7 so that is step two is again to get zeros where we want them and as we can see we did get zeros where we wanted them row step 3 repeat this process for the remaining rows ignoring rows you've already applied the algorithm to and that means what the process was get this to be a 1 and then get zeros below it so that means my next step is to get that 2 to be 1 so let's do that how am I going to make that a 1 I'm going to take half of it half of Row 2 will be in my new Row 2 which means Row 1 remains the same and Row 3 remains the same and Row 2 is 1/2 and again decimals or fractions doesn't matter to me as long as the decimals are exact and then how am I going to get a 0 below it I'm going to have to add them together so I'm going to get a 0 here next and to do that I'm going to take negative Row 2 plus Row 3 to be oops to be my new Row 3 which means Row 1 remains the same Row 3 remains the same and Row 2 is going to up just kidding yikes Row 2 remains the same and then Row 3 is negative Row 2 plus Row 3 so negative 0 plus 0 negative 1 plus 1 that gives me the 0 I wanted negative 7.5 plus five and negative negative 4.5 so positive 4.5 plus negative 2 is 2.5 now what well now I need to get a 1 again because I'm repeating the process over and over and I'm going to keep doing that until I get all ones which I don't have yet so how am I going to get all ones I'm going to take and again this is why it is better to write these as fractions so that was negative 2 point 5 which is negative 5 halves and this was positive 2 point 5 which is positive 5 halves so how am I going to turn that into a 1 I'm going to multiply by negative 2/5 Row 3 to be my new Row 3 so Row 1 remains the same Row 2 remains the same 15 halves and negative 9 halves and then Row 3 is essentially multiplying by the reciprocal so the negative reciprocal which gives me 1 here and negative 1 here and again we've repeated the process for everything so we've talked before about how you can stop here and if I stop here that is going to give me a back substitution situation but I want to have reduced row-echelon form so I want all of these guys to be zeros as well so remember reduced row echelon form has ones here and zeros everywhere else or we could have an all zero row step four is essentially to ensure that each pivot is a one so the way that I just naturally do this is I always turn them into a 1 so I could have not used that as part of my process in steps 1 through 3 I could have just ensured that I have a value we're in a pivot position and not necessarily that that value was 1 so I automatically just get that value to be 1 so I really don't have to do step 4 because I wrap step 4 into the first 3 steps and for our final step again we already have ones exactly where we want them here and we have all of our zeros here our final step is to turn zeros excuse me to turn these values into zeros so everything above the diagonal of ones so to do that we're going to start working upwards and to the left which means I'm starting with the rightmost pivot which is the bottom one and I'm going to work upwards and then to the left so I'm going to start here with 15 halves how do I turn 15 halves into zero I'd have to add negative 15 halves so that's what I'm going to take times Row 3 to get my new Row 2 so I'm adding negative 15 halves times Row 3 to be my new Row 2 which means Row 1 is the same and Row 3 we don't want to touch because we have it exactly where we want it if I take negative 15 1/2 times 0 plus 0 and then of course 0 plus 1 negative 15 halves plus 15 halves gives me 0 which is of course the whole point and then negative 15 halves times negative 1 is positive 15 halves plus negative 9 halves me six halves or three now from here I would work upwards and to the left and so again that means this guy now has to be a zero and I don't have to worry about this one because he's already there so my last step is to turn negative 3 into 0 how do I turn negative 3 into 0 I add positive 3 so I'm going to take 3 times Row 3 plus Row 1 to be my new Row oops where to become from I do not know to be my new Row 1 which means Row two is perfect just as it is we're not going to touch it Row 3 is perfect just as it is we're not going to touch it Row 1 is 3 times Row 3 plus Row 1 which gives me 1 here 0 here 0 here and then 3 times negative 1 is negative 3 plus 8 gives me 5 so that tells me that my solution remember what this means is I have 1 X 1 is equal to 5 this one tells me that 1 X 2 is equal to 3 this one tells me that 1 X 3 is equal to negative 1 so my solution is 5 comma 3 comma negative 1 now in the last video when we didn't go through the algorithm but essentially we followed these steps we never really checked our answer but keep in mind if you do solve a system this should work in all of these equations and notice that I've just rewritten them down here so I should be able to replace X 1 with 5 and X 3 with negative 1 and that should equal 8 so 5 this is +3 does 5 plus 3 equals 8 yes whoops 8 equals 8 check check so it works for the first one does it work for the second one that's telling me 2 times 5 plus 2 times 3 plus nine times negative one does it equal seven so that's ten plus six plus negative nine does it equal seven ten plus six is sixteen sixteen plus negative 9 is seven so I have seven equals seven and it works and of course then I would also check the last one which says x2 which is 3 plus five times negative 1 does it equal negative 2 3 plus negative 5 does that equal negative 2 negative 2 equals negative 2 and so again I'm just that much more confident that my solution is correct