Hey, everyone. Welcome back. So in this problem, we're going to take this system of equations that we have given to us right here, and we're going to solve it using row operations. And the key thing here is, remember, when we use row operations, we're trying to get a matrix in row echelon form. And remember what that looks like. Row echelon form means that we have a matrix with all ones in the diagonal, and we have all zeros under the diagonal. And remember that these numbers over here that are sort of above and to the right of the diagonal, they can be anything. There's no restriction on them.
So we're going to have to take this system of equations and turn it into a matrix first so that we can start doing that. Let's get started here. The first thing is we're going to convert this into a matrix. And, really, we've done this before. We just have to pull out the coefficients. So this is going to be 1, 3, 4, and 2. This will be 2, 5, 7, 9, and then 4, 8, 10, and then this is going to be 14. Alright? So if you look here, I've already actually gotten one of the numbers that I need. I've gotten one of the ones in the diagonal, so it's a little bit of a head start, which is good.
Now what we have to do is we have to focus on these numbers. I want these to be ones, and then I want these numbers, the 2, 4, and the eights. I want those things to become zeros. And how do I do that? I'm going to have to use all the row operations that we've learned in order to get that system of equations or that matrix in row echelon form. Let's go ahead and get started here.
Now you might think that you should focus on any number. Like, for example, you could focus on this 5 or the 10. But remember that second tip that we discussed in the video. Obviously, you always want to work down sort of from top to bottom in your equations, but you also every time you get a one, you want to make sure that you get all these numbers to be 0 underneath the diagonal, or underneath that one before you start focusing on the next one. What happens is if you try to make this one, then you're going to affect this cell over here, this number. And then later on, you're going to have to sort of get this to be 0, and then you're going to have to sort of mess up the one that you've already gotten. So it's always better to get this thing to be 0 or these numbers to be 0. Let's go ahead and do that.
Alright? So how do I get this number to be 0? Well, I can't swap because nothing was going to get me a 0 in that place, and I can't multiply this thing. I have to multiply this whole entire equation by 0. So The only thing I have to do is the only thing I can do is I can add. So I'm going to have to add something to row 2 in order to make it 0. So how do I do that? Well, the only number that's going to make this 0 is if I add it to negative 2. So I'm going to have to add so row 2 to some multiple of some equation in order to get a new row 2, and that's going to give me a 0.
Now one of the reasons it's nice to get ones in these, equations is because then you could just multiply them by a number, to get something to cancel out with this number over here. So for example. So I've got this 2. I need it to cancel out by becoming by adding it to negative 2. So what I can do is I can take this whole entire row, and I can multiply it by negative 2. So I'm going to do negative 2 times row 1 and then add it to row 2, and that's going to become my new row 2. Let's work it out real quickly and just see how this works.
So this row 2 that I have is just equal to 2, 5, 7, and 9. Right? That's what that row is. What about negative two times row 1? Take all the numbers that you see over here and multiply them by negative 2. What do you get? I'm going to get negative 2, and I'm going to get negative 6, and I'll get negative 8, and then negative 4. Alright. So you multiply all those numbers. Now what happens is when you add these 2 rows, what you'll see is that the 2 and negative 2 will cancel, leaving you with just 0. The negative 6 and 5 becomes negative 1. Negative 8 and 7 becomes negative 1, and the negative 4 and 9 becomes 5. So this over here is actually what your new row 2 is.
Alright? So now let's go ahead and rewrite this matrix. And remember, the only thing that gets affected here is just this row 2. So let's rewrite this. So this is going to be it's going to be 1 3 4 2. And then remember, the 3rd row is going to be unaffected, so 4, 8, 10, and 14. But now the 2nd row gets rewritten. So 0, negative 1, negative 1, 5. Alright? Now if you look here, we've actually made some progress. I've got a one here, and then I've got a 0 over here. So it's making some progress. And if you actually look, this number is really close to being the one really close to being the one that we need along the diagonal, but it's negative. But we'll focus on that later. Remember, what we also want to do is we want to keep on working down the equations and getting all the numbers underneath the ones to be zeros.
So now let's take a look at this third equation. You actually see that we're going to do something very similar. I'm going to have to get this to be 0, so I can't swap it. Otherwise, or I could swap it, but then I'm going to have to deal with the row that I just messed up, and so that's not going to be a good idea. I can't multiply this, so I'm going to have to add it to something. I'm going to have to add something to row 3 in order to get these numbers to cancel. So I'm going to add row 3 to something. Now just like I multiplied the first equation by negative 2 to cancel out the 2 that was here, I can do the exact same thing. I can instead multiply row 1 by negative 4. So then I'll get a negative 4 that cancels out with a positive 4. Alright?
So over here, what I'm going to get is negative 4 times row 1. So let's do this over here. Row 3 was equal to I had 4, 8, 10, and 14. If I take negative 4 multiplied by row 1, what do I get? I get negative 4, and then I'm going to do everything in this. I'm going to take every number here, multiply by negative 4. So it becomes negative 12, this becomes negative 16, and this becomes, negative 8. Alright. So if you add these two things, you're going to get this new row 3, which is going to equal well, the 4 negative 4 will cancel, which is exactly what we would expect. The negative 12 and 8 becomes negative 4. The negative 16 and 10 becomes negative 6, and this becomes positive 6. Alright? So this is what your new row 3 is now.
So again, let's rewrite this matrix, and we're going to see that we've made a little bit more progress. We've got 1, 3, 4, and 2. We've got 0, negative 1, negative 1, and 5. And now we've got 0, negative 4, negative 6, and positive 6. So we basically just rewrite these new matrices once we've calculated that. Alright? Okay. So now we've got 1 and we've got a 0 and a 0. So, again, making some progress. You just take it one step at a time.
So now let's go ahead. And now that we've gotten all these numbers underneath the first one to be 0, now we can start to focus on the next one. So let's look at the second equation over here, and we'll see that this number here has to become 1. So let's go through the steps. Can we swap anything? Well, we don't want to swap because then we're going to mess up the first two rows. Right? So can we multiply something by can we multiply this equation by something to get me 1 in this position?
And we actually can. So we can actually multiply over here. So I'm going to multiply. What do I have to multiply this whole equation by to get a one in this position? Well, I have a negative one, so I could just multiply by negative one. So this is just going to be I'm going to take row 2, and I'm going to multiply negative one times row 2, and that will become my new row 2. Alright? So this is pretty straightforward. Let's just go ahead and do this real quick.
So again, this is going to be 1, 3, 4, 2, 0, negative 4, negative 6, and 6. Those 2 rows get unaffected. But now what happens is if I multiply everything in this row by negative one, then everything just flips signs. So I get 0, 1, 1, and negative 5. So now let's look here. I've got a one here and a one here, and I've got 0 here and 0 here. So I'm very, very close. Alright. So now what do I do? Well, every time I get a one, I want to get all the numbers underneath it to be 0.
So, again, can't swap, can't multiply, but now we can add. Alright. So we're going to add something to this 3rd row. So we're going to add something over here in order to get this negative 4 to cancel out. So I'm going to add row 3 to some multiple of something in order to get that negative 4 to cancel. Alright? So what do I multiply by or, sorry, what do I add, what do I add to this equation? Can I add it to some multiple of row 1? Well, what happens is if I try to, then if I multiply by or if I multiply this row by 1, then I'm going to get negative 4 +3, and that's not going to cancel out to 0. If I try to multiply this thing by 2, then then that's going to be 6, but that's going to be too much. So I can't, I can't do row 1.
Instead, what I can do is I can use the one that I just got above. Just cancel out this negative 4. So what I can do is I can multiply this row 2 by 4, and then this would become my new row 3. Okay? So let's work that out. So row 3 is remember, this is just, 0, negative 4, negative 6, and 6. And now if I do 4 times row 2, what is that matrix, or what is that row? Well, 4 times 0 is still 0. 4 times 1 is 4. 4 times 1 is 4, and then 4 times negative 5 is negative 20. Alright?
So if you add those two things, that should become your new row 3. And what does this become? Well, the zeros don't actually do anything. They still say 0, which is great. And then the 4 and negative 4 will cancel out to 0. That's also good. The 4 negative 6 become negative 2, and then this over here becomes negative 14. Alright? So that's negative 14. Okay.
So now this becomes my new row 3, and I'm just going to rewrite this matrix. So again, these problems are very, very tedious. We'll just go through 1 at a time, sort of just chip away at the numbers, and we'll go ahead and solve it. Alright. So this becomes 1, 3, 4, and 2. Notice how this first equation actually hasn't even changed at all. Now this becomes 0, 1, 1, and negative 5 over here. And now what we got here here is 0, negative 2, and then negative 14.
So now if you look here, I've got 1, 1, and then I've got 0. I've got all the zeros taken care of. And the last thing I can do here is I can just focus on getting this last one. And if you look at it, this is going to be pretty straightforward because all I have to do is just get this negative 2 to become positive 1. How do I do that? I'm not going to add. I could just multiply. Alright? So I could just multiply this whole entire equation. So we're going to multiply again, And what we're going to do here is we're going to multiply this whole entire equation by negative one half. The one half will make it 1, but then we have to multiply by negative to cancel out the negative sign.
So there's going to be negative one half times row 3. That will become my new row 3. And then this will finally be I've got 1, 3, 4, and 2, 0, 1, 1, and negative 5, and then I've got 0, 1, and 7. Alright? Now that we've gotten these numbers, I've got my equation or my matrix in row echelon form. I've got ones along the diagonal, and then I've got zeros under the diagonal. And remember, these over here can be any number. Now what's the last step is now we actually have to convert it back into a system of equations.
All right. So we're basically almost done, homestretch. We just turn this back into a system of equations, and this just becomes x plus 3y plus 4z, and that equals 2. Now in the second equation, we have y plus z equals negative 5. Basically, just pulling the coefficients back into just or these numbers back into coefficients of an equation. And then this final one over here, this last equation, remember, these just are x and y and z coefficients. This just becomes z equals 7.
So how do I figure this out? How do I solve this? Well, you basically just sort of work your way back up the chain and then sort of plug stuff into the equation before it. So I'm going to call this equation 1, equation 2, and equation 3. If you plug the equation 3, the z equals 7 back into equation 2, what do you get? You get y + and then remember z is equal to 7 now, so y + 7 is equal to negative 5. If you go ahead and solve for this, what you're going to see is that y is equal to negative 12.
So that's the that's one of the numbers that you have, or that's one of the sort of the answers to this problem, z equals 7. When you plug it back into equation 2, you get the second number, which is y equals negative 12. And then when you take both of these numbers and plug it back into equation number 1, you'll get your 3rd number. So equation 1 becomes this. So this is going to become, x plus 3. Now we don't plug in y because we know y is equal to negative 12. And we don't plug in z because we know that z is equal to 7, and this is equal to 2. Alright?
So if you solve for this, what you're going to see is that you end up getting, that x minus 36 + 28 is equal to 2. And if you actually solve for this, what you're going to see is that x is equal to 10, and that is the answer. So in other words, the solution to the system of equations is x equals 10, y equals negative 12, and z equals 7. I know this is super tedious, but this is how you use these row operations to solve a matrix in row echelon form. Thanks for watching. Hopefully, this made sense.