Introduction to Matrices - Video Tutorials & Practice Problems

On a tight schedule?

Get a 10 bullets summary of the topic

1

concept

Introduction to Matrices

Video duration:

4m

Play a video:

Hey, everyone. Welcome back. So we've spent a lot of time talking about systems of equations in the last few videos, we're going to shift gears a little bit and we're gonna start talking about a new idea called a matrix or the plural version is matrices. Now, matrices can seem kind of scary at first because you'll see these big blobs of brackets with numbers inside them and all that stuff. But I'm actually gonna break it down for you and I'm gonna show you that a matrix is really just a way to organize information or numbers into a grid like pattern with rows and columns. All right. So let's go ahead and get to it. I'm gonna break it down for you. All right. So we got this matrix here and the way we sort of define a matrix or we label the uh the sort of parts of a matrix is by rows and columns. There are two rows in this matrix. We have one and two, those go horizontally and we also have three columns in this matrix, right? So three columns. Uh So this is just 12 and three. All right now. So you might see this matrix referred to as a two by three matrix, two rows, three columns. All right now, really all this matrix is, is just a way to sort of arrange numbers. And you'll actually see that the numbers are the exact same as they are in the system of equations. Over here. In this system of equations, we had two equations and those things just became our two rows of our matrix. We also have three numbers in the columns, two for the coefficients and then one for the constants over here, those three numbers really just became our three columns over here. So really, it's just a way to sort of like represent this information that's in the system just in a different way. All right. And when you do this, when you have a system of equations represented as a matrix, it's called an augmented matrix. That's just a sort of a fancy word that you'll see in your textbooks. And here in your classes, that's all that really means. All right. So all we're really doing here is we're just sort of copying over the coefficients into this matrix and we're sort of leaving out the variables. So we have negative seven and two that becomes negative seven and two and we have negative three and one half, that's negative three and one half. And then this negative four and 13 just becomes negative four and 13. So we're just sort of copying over all the numbers, but we're just sort of leaving out the coefficients because in a matrix, it's kind of understood that these columns mean X and Y coefficients. Now, what you'll also see is you'll see this little black bar that's inside of these matrices and this just means an E sign, that's kind of what that means. So you'll see here that the really a matrix is just a more compact way to represent all of the information that was in the system of equations. All right. That's really all there is to it. Later on, we'll learn different ways to manipulate matrices and even do some operations with them. But for now, all we need to do is basically just turn a system into a matrix. Let's go ahead and take a look at an example problem here. So we're gonna take this two X plus three Y. Uh So we take the system of equations and represent this as a matrix. So we've got two X plus negative three Y equals or like plus Z equals negative four. And then we got six X plus three, Y equals 13 and then Y minus Z equals eight. All right. So it's really important that you actually lay out when you have a system of equations so that you have the coefficients and the variables that are on top of each other. X's with Xs, Ys, with Ys and Zs with Zs. Um And so that's one of the things you may have to do before turning something into a matrix, right? But remember really, all we're gonna do is we're just sort of going, going to sort of extract out the coefficients. So I'm gonna have three columns here because I have three variables. Uh I actually, I'm gonna have four columns because I have three variables plus one constant on either side. So this is gonna be like the constants over here. All right. So if you look at this first equation, what happens is I have a two in the X negative three in the Y and then one in the Z. So it's just gonna be two, negative three and then one, the constant that goes on the other side is gonna be negative four. All right. So that's for that first equation. Let's take a look at the second one. The second one has six in the X three in the Y. So six X three Y. But what about the Z components here? We had one Z over here. What happens if we just see nothing? Well, really, if you ever just see a blank space, it actually just means that there is like zero Z there, there's like a zero there. So you don't just leave the matrix empty, you actually will just put a zero there. All right. So this would be 13 and then finally, we're gonna have is Y minus Z is eight. So here, now what happens is that we have no X components, there's no X coefficient. So we just label that as zero, then we have here as one and then minus Z means negative one. And over here we have eight. So this is how you take this system of equations here and represent this as a matrix. So this would be the augmented matrix for this system of equations. All right, that's it for this one folks. Thanks for watching. I'll see you in the next one.

2

Problem

Problem

Write the equations in standard form, then represent the system using an augmented matrix.

$3x+5y-9=0$

$8x=-4y+3$

A

B

C

D

3

Problem

Problem

Write the system of equations represented by the augmented matrix shown.

A

$x+2y+3z=5;5y+4z=1;4x+7y=12$

B

$x+2y+3x=5;5x+4y=1;4x+7y=12$

C

$x+2y+3x=5;5y+4z=1;4y+7z=12$

D

$x+2y+3x=-5;5y+4z=-1;4x+7y=-12$

4

concept

Performing Row Operations on Matrices

Video duration:

8m

Play a video:

Welcome back everyone. So back when we studied systems of equations, we saw lots of different ways to manipulate those equations. So for example, we saw that we could swap the positions of two equations, we could also multiply equations by some number. Like when we did the elimination method, we could also add equations together once we had those coefficients to be equal and opposite. Well, remember that a matrix is really just a representation of a system of equations. It's just two ways of writing the same information. So just as we did operations to these types of equations, we can also do operations on the rows of a matrix because remember an equation is really just a row on a matrix. So we call these things row operations. What I'm gonna show you in this video is that there's really just three of them that you need to know. I'm gonna break it down for you showing you a bunch of examples. All right. And there's also some new notation we'll learn as well. Let's just start with the first one which is swapping two rows. This is by far the easiest operation and it sounds exactly like what it sounds like, right? We're just gonna be swapping the position of two rows just like we swapped the position of two equations. So here, all that happens is that we had negative 12 and nine on the top row and now just goes to the bottom. So this is negative 12 and nine and then the 26 and 12 that was on the bottom. Now it just goes to the top 26 and 12. Now you'll see some notation for this written in your textbooks with some little Rs and Big Rs. Really all this stuff says is little R means the old row and big R means the new row once you're done doing that operation and the subscripts just tell you which number which row they're talking about. So for example, this is little R one over here and that little R one becomes big R two and vice versa, this little R two becomes big R one. So that's really all that's going on there. It's just showing you old versus new. And the uh the, the number of the row that it is. All right. So that's the first one. Let's take a look at the second operation which is multiplying one row by any nonzero number. All right. So when we deal with system of equations in the elimination method, we could multiply an equation by some number. So for example, we multiply this by two and what happens is we change all the coefficients. This would be negative two X and those would be four Y and this would be 18. Well, we can do the exact same thing to the rows or the numbers in the rows of a matrix. So really all this is, is we're gonna take this little R two over here. And then the notation for this is we're gonna take little R two multiplied by two And that becomes now big R two, we're just gonna rewrite this uh this new row. All right. So what happens is we're gonna take all these numbers multiply them by two. This may ends up being negative 24 and 18. Notice how all these numbers are the same because remember this matrix is just representing the system of equations. All right. All right. So this, these numbers here are all the same. All right. So um let's move on to now the last one which is just adding some multiple of one row to another. All right. So when we did this for systems of equations and we finally got their coefficients to be equal and opposite, we could add the equation straight down and cancel out or get rid of one of the variables. What we were left with is we were left something with like 10, Y equals 30. Now, so uh now what we can do here is with a matrix, um we can do the same exact thing now. When we did the first system, we always kind of just like, sort of delete or not even rewrite that first equation because we're only just worried about that one equation here with the matrix. You can't just sort of delete a row. So you just rewrite it, right. So, the 26 and 12, you just rewrite the 26 and 12. All right. But now what you're gonna do here is you're gonna take this little R two, you're gonna take this little R two and I'm just gonna add it to all the L the numbers in little R one. And I'm just gonna add these things straight down and that now be just becomes my big R two. So this just becomes 0 10 and 30 you're gonna get exactly the same sort of numbers that you get on left and right. It's just another way to represent this system of equations. Now, unfortunately, this step here of adding uh some kind of a nonzero multiple of one row to another is actually, unfortunately, the most common step. So it's good to get some good practice with this. I also want to mention one other thing here. The last two steps that we talked about our operations, the multiplying and adding, they only affect one row. It's the row that they're, you're currently doing an operation. The only time you're actually doing two rows or you're affecting two rows is when you're swapping them. So what you'll see here is that we rewrote, for example, the 26 and 12 we changed, we never, it never changed the entire time. I mean, that's because the only row that was changing was row two. All right. So anyway, those are the three operations. Let's go ahead and get some more practice here using uh this, this uh this sort of more, a little bit more complicated matrix. So here we've got two negative 6410. We've got this big matrix over here. Let's take a look at the first one. The first one says we're gonna take row two and we're gonna swap it with row three. So remember this is just the notation for swapping. Uh So all we're gonna do here is this is gonna be my R two. This is gonna be uh sorry, this is gonna be, that's gonna be R two and now it's just gonna trade places with the third row. All right. So just gonna rewrite this matrix over here. Remember the, the first row is gonna remain completely unaffected. So this is two negative six or 10, just rewrite it. Now what happens is the three eights negative seven and zero will actually go to the bottom 38, negative seven and zero. And now what happens is the, this row over here will go to the top. So this is gonna be negative 159 and three. All right. So that is how you swap two rows, right? So now we're gonna see here that this is R three. And that's, that was R two before let's take a look at the second one. So the second one says we're gonna take R one, we're gonna multiply it by a half and then that's gonna become the new R one. So this is really just multiplying something by a nonzero number. I actually want to point that out real quick here. Um You could only multiply by a nonzero number. You can't just multiply everything by zero because it basically just be like sort of almost deleting the equation. So you just can't do that. All right. So let's take a look here. We're gonna take this row one and then that's gonna become the new R one. So what we can see here is that remember the rows, the 2nd and 3rd rows will remain completely unaffected. So those won't change at all. This would be 38, negative seven and zero and this will be negative 159 and three. So um that's would this be for, for B and then what happens is for this row on the top, we're gonna take all these numbers and we're gonna multiply them by half. So two becomes one, the negative six would become negative three or become two and then the 10 would become five. So this is what this new equation or matrix would look like. All right. So that is multiplication. The last thing we'll do is we'll do the addition. So we have that R two. We're gonna add it to a multiple of R three and that's gonna become my big R two. All right, let's take a look at this. So remember what's gonna happen. Here is the row two is gonna get rewritten, which means that we can just rewrite the 1st and 3rd rows. So in other words, we can just do the two by the, we're not, we're not carrying over the changes that we made in A and B. This is gonna be two negative 64 and 10 and this is gonna be uh negative 159 and three. So what's going on with this middle row over here? Well, remember what this, this whole process is by adding one row to another. You're gonna take all of these numbers here in row two and you're gonna add them to three times all the numbers that are in row three. All right. So I should mention this is here R three. So basically, I'm gonna take all these numbers here and multiply them by three and then add them to all these numbers over here. All right. So this is how this is gonna work out. We're gonna come up with four numbers, right? So this is the first one is gonna be three plus three times negative one. That's this pair over here. Second number is gonna be eight plus three times five, just this row or this column. And the third number is gonna be negative seven plus three times nine, which is gonna be this pair. And then finally, you have zero plus three times three. Hopefully you guys get the pattern right. So basically, we're just gonna go ahead and calculate all of these and remember this is just to do this operation over here. So this works out to three plus negative three, which turns out to just be zero. So this is gonna be zero. This is gonna be eight plus three times five which is 15, that's gonna be 23. So it's the second number. The third one is gonna be negative seven plus three times nine, which is 27 that works out to positive 20 that's positive 20. And the last number is gonna be th zero plus three times three which is just nine. All right. So that's how to do these kinds of operations uh where you are adding one row to another. Hopefully, that made sense. Thanks for watching and I'll see you in the next one.

5

Problem

Problem

Perform the indicated Row Operation.

SWAP $R_1\leftrightarrow R_2$

A

B

C

D

6

Problem

Problem

Perform the indicated Row Operation.

ADD$R_1+2\cdot R_3\rightarrow R_1$

A

B

C

D

7

concept

Solving Systems of Equations - Matrices (Row-Echelon Form)

Video duration:

7m

Play a video:

Everyone. Welcome back. So in the last few minutes, we've learned the row operations that you can do to the rows of a matrix like swapping multiplying and adding. And I mentioned that we would eventually use this to solve the system of equations. Well, that's exactly what we're gonna do in this video. We're gonna solve a system of equations by getting a matrix in a very particular form that we'll discuss in just a second. The whole idea is that I'm gonna take a system of equations, turn it into a matrix and then use row operations to get a very particular pattern of numbers of ones and zeros. And then once I get that I can turn it back into a system of equations and then solve it that way. Let's go ahead and take a look here. The first time you look that you see this, it might be kind of intimidating, but I'm gonna break it down for you and we'll work out this example, step by step. Let's get started here. So we, the whole idea is that we're gonna use these row operations to get a matrix with ones along the diagonal. So notice how I have this sort of diagonal here from top left to bottom, right. And then I have zeros underneath the diagonal. That's really what you're trying to get ones along the diagonal and zeros underneath. Now remember what happens is that these coefficients really just stand for the, these numbers here stand for the coefficients of a variable uh in a system of equations. So the reason you want to get to this in this form, which is by the way called row echelon form is because once you turn it back into a system of equations, and really what happens is that you're just gonna get equations that you can substitute and then solve for X and Y using that method. So really just turns into a regular system of equations problem which we've seen how to solve before I wanna mention by the way that these numbers can actually be anything, there's no restrictions on them so that they don't have to be ones and zeros or anything like that. All right. So what I'm gonna do is I'm actually gonna break this, this example down. We're gonna work this out together and I'm gonna show you step by step how we get to this row echelon form. All right, let's take a look. So I've got my system of equations over here, negative X equals two Y equals four X plus seven Y equals 14. In fact, it's actually exactly the same system of equations. I had over here. So I'm really just gonna start for, by turning it into a matrix and copying this over. So I'm all, all I'm gonna do is just repeat the coefficients. This is 12 and four. This is one. I'm sorry, this is negative 12 and 417 and 14. So I've got my uh my uh my augmented matrix over here. All right, I remember the whole goal is I want to get ones along the diagonal and zeros everywhere else here. I've got a negative one and seven along the diagonal. So I'm gonna need you to get a one in this position. And that actually brings me to the first tip here. I'm gonna give you some tips for solving these types of problems. And the first one is just to go row by row and work your way top to bottom. All right. So just work one at one at a time to focus on one number and just generally try to go from top to bottom like this. So let's try to get a one in this position over here. How would we do that? Well, to do that, we're gonna have to look at our row operations. I can either swap multiply or add, let's consider each one of them. Can I swap two numbers over here to get a one in this position? Well, actually you can, because notice how this is a negative one and positive one. So if you swap these two rows, then you'll get a one there. So that's the first thing you can do. Um You won't always have to do that just in this case, we can swap because we've seen that there's a one in this position. So we're gonna swap row one and that will just become my new row two. So really all that happens is that these rows just switch places. So this is 17 and 14 now negative 12 and four. And now all of a sudden, we can see that we have a one in this position. That's one of our numbers. All right. So now we just have to focus on these two numbers. This has to become a zero and this has to become a one. We're gonna use row operations to do it. So you might be thinking that we, we, we just stick with trying to get the ones along the diagonals. So might be thinking, well, it just doesn't matter. Um I can just focus on this one but actually what I'm gonna show you here is that trying to get this one isn't gonna be the right move because what happens is if you try to get this position here to be a one by multiplying this equation by, let's say one half, then this will become a one, but this will become negative one half and you're gonna end up with a weird negative fraction here. Then later on to try to get rid of it, you're gonna have to mess up the one that you've already gotten. So instead what happens is that kind of brings me up to my second tip. Whenever you get a one along the diagonal, you would actually want to get everything underneath it to be zero before you move on and try to get to the next one. What do I mean by this? Now that we've gotten this first one, I'm gonna focus on getting this number to be zero before I focus on getting this to be a one. And we're gonna see why that works in just a second. So how do I get this one to be a zero? Well, can we swap? Well, swapping is gonna be pretty silly because we're just gonna undo all the progress we've already done here. So that's not gonna work. So, what about multiplying? Well, the only way we could get a zero out of this is if I multiply the entire row by zero, but I can't do that because I have to multiply rows by nonzero numbers. So multiplying isn't gonna work either. The only way to get a zero in these types of problems is you're gonna have to add, by the way, this is always going to happen. So to get zeros, you're gonna have to always add something. All right. So here, what we're gonna do is we're gonna take row two, we're gonna have to add it to something to get a zero in this position. What do I have to add to this to get it to, to cancel out to zero? I just have to add one and that's exactly what I have in the first row. So remember I can multiply or I can add a multiple of row. But in this case, all I have to do is just add row two and row one together with no multiple. Otherwise just one times row one. And that's gonna be my new row two. All right. So now what happens here is, remember that row operation will only affect row two. So row one will rank completely the same 17 and 14 doesn't change. Now, what happens here is, I'm gonna add these coefficients down one and negative one becomes 07 and two becomes nine and then 14 and four becomes a team. Now, if you see what happens here, I've got a one in this position and I've got a one underneath it. So that's good. I've gotten two of my numbers. I really only have one thing to do left and that's why I have to turn this thing into a one. All right. So how does that work? Well, whenever you're trying to turn numbers into ones, you're not gonna add, you're gonna actually multiply because now what I can do in this problem is I can multiply this whole entire equation here by whatever I need to get to this for this to be a one. And I really just have to multiply this entire equation here by 19. So what I'm gonna do is I'm gonna multiply uh 1/9 times R two. Now, the reason this is helpful is because notice how multiplying this equation won't actually affect the zero because 1/9 times zero is still zero. So this is why multiplying to get ones is gonna be easier. So here what happens is this is gonna be 17 and 14 and this is gonna be zero. So I've got zero over here, this becomes a one. And then if I multiply 18 by 1/9 that actually will become a two. So now if you look at this, I've got ones along the diagonal and I've got a zero underneath the diagonal. So this is now in row echelon form. So that's what this means here. And now that we're done, we can turn this back into a system of equations and solve what we're gonna see here is we have X plus seven Y equals 14, which is actually one of our original equations. And then we have zero plus Y, this is just one, Y equals two. So one of our variables is already solved for, we have Y equals two. And now all you can do is just plug this back into this equation, this two using substitution and then you'll get the X value And if you actually do that, what you're gonna see here is that X plus seven times two equals 14. And what you're gonna see here is that X is equal to zero because these things will actually end up canceling out. So this is also sometimes called back substitution in your problems. That's really what this means is that you'll use row operations to get a matrix and then you can just sort of backwards substitute to get your answers. All right. But that's really all there is to it. We use the row operations work one at a time to get row long form, then turn it back into a system of equations which we've seen how to solve. That's really all there is to it folks. Now, one thing I wanna mention here by the way is that this method of solving systems is sometimes called Gaussian elimination. So if you ever see that, that's what that means. Thanks for watching. And uh let's get to some practice.

8

example

Example 1

Video duration:

13m

Play a video:

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 gonna 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. First thing is we're gonna convert this into a matrix and really, we've done this before, we just have to pull out the coefficient. So this is gonna be 134 and two, this will be 2579 and then 4810 and then this is gonna be 14. All right. 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, 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 24 and the eight, I want those things to become zeros. And how do I do that? I'm gonna 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 I should focus on any number. Like for example, you could focus on this five 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 wanna make, make sure that you get all these numbers to be zero underneath the diagonal uh 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 gonna affect this cell over here, this number. And then later on, you're gonna have to sort of get this to be zero and then you're gonna have to sort of mess up the one that you've already gotten. So it's always better to get this thing to be zero or these numbers to be zero. Let's go ahead and do that. All right. So how do I get this number to be zero? Well, I can't swap because nothing was gonna get me, get me a zero in that place. And I can't multiply this thing and have to multiply this whole entire equation by zero. So the only thing I have to do is the only thing I can do is I can add. So I'm gonna have to add something to row two in order to make it zero. So how do I do that? Well, the only number that's gonna make this zero is if I multi or if I add it to negative two. So I'm gonna have to add so row two to some multiple of some equation in order to get a new row two. And that's gonna give me a zero. Now, one of the reasons it's really nice to get ones in these uh equations is because then you could just multiply them by a number uh to get something to cancel out with this number over here. So exa for example, so I've got this two, I needed to cancel out by becoming by adding it to negative two. So what I can do is I can take this whole entire row and I can multiply it by negative two. So I want to do negative two times row one. And then add it to row two. That's gonna become my new row two. Let's work it out real quickly and just see how this works. So this row two that I have is just equal to 257 and nine, right? That's what that row is. What about negative two times row one? Take all the numbers that you see over here and multiply them by negative two. What do you get? I'm gonna get negative two and I'm gonna get negative six and I'll get negative eights and then negative four. All right. So you multiply all those numbers. Now what happens is when you add these two rows, which you'll see is that the two and negative two will cancel leaving you just zero, the negative six and five becomes a negative one, negative eight and seven becomes a negative one and the negative four and nine becomes five. So this over here is actually what your new row two is. All right. So now let's go ahead and rewrite this matrix and remember the only thing that gets affected here is just this row two. So let's rewrite this. So this is gonna be, it's gonna be 1342 and then remember the third row is gonna be unaffected. So 48, 10 and 14, but now the second row gets rewritten. So 01, negative one, negative one and five. All right. Now if you look here, we've actually made some progress I've got a yellow or sorry, I've got a one here and then I've got a zero 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 wanna 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 and you actually see that we're gonna do something very similar. I'm gonna have to get this to be zero. So I can't swap it otherwise or I could swap it. But then I'm gonna have to deal with the road that I just messed up. And so that's not gonna be a good idea. I can't multiply this. So I'm gonna have to add it to something. I'm gonna have to add something to row three in order to get these numbers to cancel. So I'm gonna add row three to something now, just like I multiplied uh the first equation by negative two to cancel out the two that was here. I can do the exact same thing. I can instead multiply row one by negative four. So then I'll get a negative four that cancels out with a positive four. All right. So over here, what I'm gonna get is negative uh four times row one. So let's do this over here. Row three was equal to, I had 48, 10 and 14. If I take negative four, multiplied by row one, what do I get? I get negative four and then I'm gonna do everything in this. I'm gonna take every number here multiplied by negative four. So it becomes negative 12, this becomes negative 16 and this becomes a negative eight. All right. So if you add these two things, you're gonna get this new row three, which is gonna equal, well, the four negative four will cancel, which is exactly what we would expect. The negative 12 and eight becomes negative four, the negative 16 and 10 becomes negative six and this becomes positive six. All right. So this is what your new row three is now. So again, let's rewrite this matrix and we're gonna see that we've made a little bit more progress. We've got 134 and two, got zero, negative one, negative one and five. And now we've got zero, negative four, negative six and positive six. So we basically just sort of rewrite these uh new matrices once we've calculated that. All right. OK. So now we've got one and we've got a zero and a zero. 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 the one, all these, these numbers underneath the first one to be zero. 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 one. So let's go through the steps. Can we swap anything? Well, we don't wanna swap because then we're gonna mess up the first two rows, right? So can we uh can we multiply something by, by, can we multiply this equation by something to get me one in this position? And we actually can't, so we can actually multiply over here. So I'm gonna multiply what do I have to multiply this by or 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 gonna be I'm gonna take row two and I'm gonna multiply negative one times row two and that will become my new row two. All right. So this is pretty straightforward. Let's just go ahead and do this real quick. So again, this is gonna be 13420, negative four, negative six and six, those two rows get unaffected. But now what happens is if I multiply everything in this row by negative one, then everything just flips sign. So I get 011 and negative five. So now let's look here, I've got a, a one here and one here and I've got zero here and zero here. So I'm very, very close. All right. So now what do I do? Well, every time I get a one, I'm gonna wanna get all the numbers underneath it to be zero. So again, can't swap, can't multiply but now we can add. All right. So we're gonna add something to this third row. So we're gonna add something over here in order to get this negative four to cancel out. So I'm gonna add row three to some multiple of something in order to get that negative four to cancel. All right. So what do I multiply by or? Sorry, what do I add? Uh What do I add to this equation? Can I add it to some multiple of row one? But what happens is if I try to, then if I multiply by, if I multiply this row by one, then I'm gonna get negative four plus three and that's not gonna cancel up to zero. If I try to multiply this thing by two, then that's gonna be six, but that's gonna be too much. So I can't um I can't do row one instead of what I can do is I can use the one that I just got above, just cancel out this negative four. So what I can do is I can multiply this row two by four and then this would become my new row three. OK? So let's work that out. So row three is remember this is just uh zero, negative four, negative six and six. And now if I do four times row two, what is that matrix or what is that row? Well, four times zero is still 04 times one is 44 times one is four and then four times negative five is negative 20. All right. So if you add those two things that should become your new R three and what does this become? Well, the zeros don't actually do anything. They still say zero, which is great. And then the four and negative four will cancel out to zero. That's also good. The four negative two becomes uh four, negative six become negative two. And then this over here becomes negative 14. All right. So that's negative 14. OK? So now this becomes my new R three and I'm just gonna sort of rewrite this matrix. So again, these problems are very, very tedious but we'll just go through one at a time, sort of just chip away at the numbers and we'll go ahead and solve it. All right. So this becomes 1/4 134 and two. Notice how this first equation actually hasn't even changed at all. Now this becomes 011 and negative five over here. And now what we got here here is 00, negative two and then negative 14. So now if you look here, I've got 11 and then I've got 000. 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 gonna be pretty straightforward because all I have to do is just get this negative two to become positive one. How do I do that? I'm not gonna add, I could just multiply, all right. So I could just multiply this whole entire equation. So we're gonna multiply it again. And what we're gonna do here is we're gonna multiply this whole entire equation by negative one half, the one half will make it a one. But then we have to multiply by negative to cancel at the negative sign. So this is gonna be negative one half times R three that will become my new R three. And then this will finally be I've got 134 and 2011 and negative five. And then I've got 001 and then this becomes a seven. All right. Now that we've gotten these numbers, I've gotten 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 home stretch. We just turn this back into a system of equations and this just becomes X plus three, Y plus four Z and that equals two. Now, in the second equation, we have Y plus Z equals negative five. Basically just pulling the equ the coefficients back into just or these numbers back into coefficients of an equation. And now this final one over here, this last equation, remember these just are X and Y and Z coefficients, this just becomes Z equals seven. 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 gonna call this equation one, equation two and equation three. If you plug the equation three, the Z equals seven back into equation two, what do you get? You get Y plus and then remember Z is equal to seven now, so Y plus seven is equal to negative five. If you go ahead and solve for this, what you're gonna see is that Y is equal to negative 12. All right. So that's the, that's one of the numbers that you have. Uh or that's one of the sort of the answers to this problem Z equals seven. When you plug it back into equation two, 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 one, you'll get your third number. So equation one becomes this, this is gonna become a X plus three. 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 seven and this is equal to two. All right. So if you solve for this, what you're gonna see is that you end up getting uh that uh X minus 36 plus 28 is equal to two. And if you actually solve this, what you're gonna 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 seven. 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.

9

example

Example 2

Video duration:

11m

Play a video:

Welcome back everyone. So let's take a look at this example. Again, we've got these three system of equations. Uh And we want to solve this, meaning we want to find solutions for XY and Z. The way we're going to do this is by writing a matrix in row echelon form. Remember that's just that specific format where we have ones along the diagonal and zeros everywhere else. Let's go ahead and get started here. The first thing we have to do is convert this into a matrix just by pulling out all the numbers and coefficients. All right. So this is gonna be a 246 and then 24 this will become a 1512 and then 60 this will become 3615 and then 20. All right. So remember all we have to do is just sort of work the equations from top to bottom, focus on one number at a time. And also every time we get ones, we're gonna try to focus on everything else, getting them to be zeros. So let's take a look at this first number here. I just want a one that's in this position. I've got a two there. So that's bad. So can I use any of my operations like swapping multiplying or adding to solve this? And actually I can, so what you'll see here is that I can actually swap these two rows in order to get a one in that position. So the first thing you can do is just swap, so we'll swap row one and row two and they'll basically just become each other. All right. So in other words, I'm just gonna rewrite this matrix and this is gonna be 1512 and then I've got 60 this is gonna become 246 and then 24 and then I've got 36 and then 15 and then finally, I've got 20. All right. So I've gotten one of my numbers already. I've got one now, remember rather than focusing on these other numbers and getting them to be ones. The next thing you want to do is focus on getting everything underneath those ones to be zeros before you move on to the next one. So the way we do that remember is by adding, so that we, we, we're gonna do is we're gonna take something to this row over here. And in order to cancel out this two to become a zero, I have to add it to something else. I can't add it to three because those things aren't gonna cancel out to zero. But what I can do is I can add row two and I can add it to a multiple of row one because I have this thing as one over here. So I can do this uh by multiplying by row one by negative two. And that will become my new row two. Let's work this out real quick. So my row two is equal to again 246 and then 24. And then if I multiply negative two times row one, that equals, remember I just multiply all these things by negative two. So this is gonna be negative two. This would be negative 10, be negative 24 and this will be negative 100 and 20. All right. Now once you add those two things, what do you get? These things will cancel and you'll just end up with zero, negative six will be negative 18 and this will be negative 96. All right. So now that becomes my new row two and so you could just rewrite this matrix. So really what happens is I just get uh 1512 and 60 then the 3615 and 20 because those things remain completely unchanged. And now the only thing that changes is row two, which is now zero, negative six, negative 18 and then negative 96. All right. Notice how we got a one and now I've got one of my zeros. Now I'm just gonna focus on getting this thing to be zero and I'm just gonna do a very similar step instead of adding something to row two, I'm gonna add something to row three. And so I wanna add row three and just like we added uh a multiple of row one, we're gonna do the exact same thing, but instead of negative two, all we're gonna do is we're gonna multiply or add to a multiple of negative three of row one. All right. So it's the same exact procedure just trying to cancel out that three there. So what does this become? Well, row three again is just equal to I got 3615, 36, 15 and 20. And then negative three times row one equals I have negative three. This becomes negative 15, negative 36 and then negative 180. All right. So if you add all these things together, this becomes your new row three which should equal the three, the negative three should cancel out to zero. Then this should become negative nine. This should become negative 21 and this should become negative 100. I'm sorry. This should be, this is, this is gonna be negative 160. All right. So that's, that's the little barrier. Uh It's not a one, right? So just be careful there. So this is what your new uh row three should look like. So let's rewrite this. All right. So we've got 15, 12 and 60 we've got zero, negative six, negative 18 and negative 96. And now we've got uh zero, negative nine, negative 21 and then negative 160. All right. So again, making some progress here, I've got ones and I've got zeros underneath. That's good. Now I can focus on the next one. So the easiest way to get this row over here and this entry to be a negative one or sorry, a positive one is I can actually take this whole entire equation and I don't have to add anything to it. I can just multiply it, right? Because it's not like trying to get this number to be zero. I can multiply by something to get this to be positive one. So we're gonna do is we're gonna multiply. Now how do I get negative six to become positive one by multiplying? Well, I basically just multiply everything this equation by negative 16. And what you'll see here is that this would become the new R two. And if I go ahead and rewrite that, what you're gonna see is that this is this becomes nega uh sorry 15 uh 12 and 60 this will become zero. And then this negative six when I multiply it by negative 16 would just become positive one, which is exactly what I wanted. And what about this negative 18? While it just becomes positive three? What about this negative 96? While that just becomes positive 16? All right. And now the last number or the last row number just doesn't change at all. So zero, negative nine, negative 21 and negative 116, these problems are kind of tedious because you just have to end up rewriting the same thing over and over again. But we're making some progress here again because we've got ones here along the diagonal and I've got zeros. So now I just have to focus on these last two numbers over here. How do I get this number over here to be zero? Or remember? Because once you get a one, you want to get everything underneath it to be zero, I'm gonna have to add, right. So this is where you add, I'm gonna have to add something to row three. So I'm gonna add row three. And what I'm gonna do here is I'm gonna use the one that I just got in the previous step in order to cancel out this negative nine. So, what I'm gonna do is I'm gonna add row 3 to 9 times row two and that will become my new R three. Let's work it out. R three is zero, negative nine, negative 21 negative 160. If I nine times R two, this just becomes zero, a positive 927 and then nine times 16 becomes 100 and 44. All right, that becomes 100 and 44. Now again, we're gonna have to sort of set up these little matrices when you add them, this becomes my new R three which should become. So my new R three just becomes zero. and then the nine and negative nine will cancel out to 0 27 and negative 21 becomes six. And then I have 100 and 44 and negative 6160 which should become negative 16. So that's what my new R three becomes. All right. So now this matrix is I got 1512 and 160 sorry 60 15 1260 013 16. And then I've got zero negative nine. I'm sorry, 006 and then negative 16. All right. So now we can see here is I've got ones here. We got zeros here and now I just have to focus on this last uh six over here trying to get into a one and just like we took this negative six and we just multiplied this whole thing by a fraction to get um to get six or sorry to get positive one. We can do the exact same thing over here. All right. So what I can do is I'm just gonna do um let's see. Well, actually there's actually an even easier thing that you could do here. What you see here is that these two numbers are actually the same. So one thing we can do here is we can just add the two equations that we have over here. Uh Actually, let's not do that. Yeah. So let's just multiply this whole entire thing by this uh this fraction. All right. So sorry about that. So you can multiply and we can just multiply R three. We're gonna multiply 16 times R three and that will become new R three, right? So almost done here. All we have to do is so just do the multiplication. This is gonna be 1512 and 60 and this is gonna be 013 and 16 and this will just become 00. Now we got a one here and then this will just become negative 16, divided by six. All right. So that's just gonna be a fraction and that's perfectly fine to have that. All right. So we've got those numbers. But now what we see here is that I've got my equation in row echelon form. So I've got ones here and then I've got zeros here. So now that we have this, now we're finished with row echelon form, we can convert it back into a system of equations. Remember we just pull out all of these coefficients. These are XY and Z coefficients over here. And so we should just get that X plus five, Y plus 12, Z is equal to 60 which is one of our original equations. And then we had uh we have Y plus three, Z is equal to 16. And then we finally just have Z is equal to negative 16/3. All right. So now again, I just like to number these equations. This is equation +12 and three. We just plug equation three back into equation two and then solve. All right. So what we've got here is we've got uh in equation two. So we've already got one of our numbers, Z is equal to negative 16 3rd. That's already one of our answers. So now in equation two, we have Y plus three times negative 16 3rd equals 16. All right. So now what happens here is we'll see that this will become negative, right? Because these things, these things will cancel and actually the three and the negative three will cancel out. So what we'll see here is that Y is equal to uh is that we have Y minus 16 is equal to 16. And so we'll see here is that Y is equal to 32 and that's our other answer. All right. So now what we're gonna do is we're gonna plug this back into equation one and it will be X plus five times Y which is 32 plus 12 Z which is times negative 16 3rd. And that will be 60. And let's see. So what we'll see here is that if you actually end up working this out, what you'll see is you get five times 32 which is 100 and 60. So this ends up being 100 and 60 over here. The 12 times negative 16 3rd. So we have 12 times negative 16 divided by three. This ends up being negative 64 and then this equals 60. So in other words, what we've got here is 100 and 60 minus 64 and that equals 96. And so basically, which you'll end up here is with uh X is equal to um negative 36 and that is gonna be that last number. All right. So hopefully that made sense again, very tedious problems. But let me know if you have any questions and I'll see you in the next video.

10

concept

Solving Systems of Equations - Matrices (Reduced Row-Echelon Form)

Video duration:

5m

Play a video:

Welcome back everyone. So in another video, we learned how to solve a system of equations by using something called the row echelon form. We wrote a matrix in a specific form where we had ones along the diagonal and then we had zeros everywhere else. What I'm gonna show you in this video is another way of solving a system of equations by writing a matrix in something called reduced row echelon form. Now, it might seem like this is an entirely new process, but I'm actually gonna show you it is really similar to this. We're gonna use all the same steps and row operations and all of that stuff. And then we just actually work out this example here. So let's just go ahead and get started. Really the main difference between these types of forms here is the matrix that you're trying to work towards with row echelon form. We had ones along the diagonal and we had zeros under the diagonal like we have over here. And for a reduced row echelon form which you're trying to get is ones along the diagonal. So that's exactly the same except you're trying to get zeros under and above the diagonal. So you, that's really the only difference here. And remember these numbers can be anything. There's, there's no restrictions on them. The key advantage to get something, getting something in this format over here is that when we turn it back into a system of equations, you're done, you actually don't have to do any more work or versus with the row echelon form, once we converted something to equations, we had to use substitute to get your X and Y values and things like that with this form, you actually have no more work to do. So what I'm gonna do in this video is we're actually just here to sort of look at the example that we did in the last video, we're going to sort of pick up from there. So what I mean by that is that in this example, we use this matrix with 17, 14, negative 12 and four and we use our different row operations like adding and multiplying. And then when we got to this point over here, we had row echelon form because we had ones and zeros and then we turn it back into a system of equations. And what we got here was that the answer was Y equals two and X equals zero. So what we're gonna do here is we're gonna sort of pick up from this step and we're just gonna keep it, we're just gonna go one step further because now we have to do is get something and reduce row echelon form. So I have ones along the diagonal zeros under. But now I'm gonna actually have to figure out how to get this position to be a zero because that would make it reduced row echelon form. All right. So that's really all, there's too, we're actually just gonna sort of pick up from this step and we're gonna have to just do one more sort of round of swapping multiplying and adding and things like that. And what we should expect is we'll get the same, the same exact answer. All right. Well, let's get started here. So remember, um, I've got this matrix, I've got 17, 14, 01 and two. So I've got these numbers already. That's that, that the good. And then I just have to get this number over here to be a zero. How do I do that? Well, let's take a look at row operations. Can I swap swapping? Isn't gonna help here because that's gonna mess up all the ones and zeros you already have. And I multiply this equation by something to get this to be zero. You can't, because the only thing is you would have to multiply this whole thing by zero, but you can't do that. So remember the only way to get zeros in a position is you have to add. So we're gonna have to add something to this equation over here. To cancel out that seven. So we're gonna have to add something to row seven over here to cancel this out. What do I have to do? Well, if you take a look here, I've got seven. The only way to cancel it out is if I have negative seven. So remember I can add a multiple of row two in order to uh cancel out this seven over here. And what you have to do is you have to multiply this whole row two by negative seven, multiply negative seven times this number. It'll then cancel out this positive seven. This is gonna be negative seven times row two. All right, now let's go ahead and work this out here. What does that turn out to be? Well, what happens is row two is completely unaffected. So this would be 101 and two. What does row one become? Well, one plus negative seven times zero is still just one. That's when that's so that's the useful thing of having these zeros over here is that when you multiply it by them by numbers, it actually doesn't do anything. So you still have just one here. What about this? Well, this is gonna be seven plus negative seven times one and that's actually gonna cancel out to zero. And then what about this? 14? This is gonna be 14 plus negative seven times two which ends up being negative 14. So what you're actually gonna see here is that this completely just cancels out to zero. This won't always happen, by the way. So this won't always just be zero. Sometimes you'll get other numbers. But in this particular case, that's what it worked out to be. So now what you'll see here is that we have this, this matrix in reduced row echelon form, I got ones along the diagonal and zeros everywhere else. So this is reduced row echelon form. And when you convert it back into a system of equations, we're gonna see what happens here with the X coefficients I have one X and then with the Y coefficients I have zero Y. So it's almost like kind of just that it doesn't exist and this equals zero. So in other words, X equals zero and then for the uh bottom row, the second row, this is zero X. So that goes away plus one Y equals two. So in other words, that just ends up being Y equals two, these are exactly the numbers that we got when we did it using the Gaussian elimination or row echelon form. But we just did a sort of a slightly different way. So we get the same exact answers and that's good. So really, that's how to use this, this sort of reduced row echelon form. So basically to summarize the key difference between these two different types of methods is how much work you have to do between the matrices and equations with row echelon form, you have to do less work with the matrices, but then you'll have to do more work when you turn it back into equations. Whereas the uh reduced row echelon form, you're gonna have to do more work with the matrices up front. So you're gonna have to do more row operations. But then you're gonna have to do less work when it comes down to the equations and it'll actually just sort of spit out your numbers, right for you. All right. So one last thing to point out here, this is uh sometimes called Gaussian elimination. This method here of row echelon form. Whereas this one that we're working with is sometimes called Gauss Jordan elimination or the mathematicians that sort of devise them. But that's really all there is to it. Thanks for watching folks and I'll see you in the next video.

11

Problem

Problem

Solve the system of equations by using row operations to write a matrix in REDUCED row-echelon form.