 good me and my old friend the wind is here to show you one more video just to create one more video about systems of linear equations I really want to finish with systems of linear equations they are really not that important in the greater scheme of things or solving them with these row operations it's not what linear algebra the matrices that we're going to look at and what they represent what you can do with them the abstract notion of a matrix that's what it's all about but let's do one more just so you get to fully understand what these operations are all about once again I'm going to create my own three equations and three unknowns I'm going to decide x is one y is two and z is one and I'm just going to represent them there there's my x values one one one my y values two to two my z values one one one and I've just put arbitrary constants in front of them one two and a one a one a one a two a three and a one and one so one times one is one one times two is two three times one is one one plus two plus three is six two plus two plus one is five one plus four plus one is six so what we actually have is the following we're going to have x plus y plus three is z equals six and we're going to have two x plus y plus z equals five and then here we're going to have an x plus a two y plus z also equals six three equations and three unknowns I've created them myself I know what the solutions are because I created them remember you might you might not get it in this format you might get this expressed as z itself so for instance here you will have z equals minus 2x minus y plus 5 and you just have to bring all the x y z's or x sub 1's x sub 2 x sub 3 whatever the case may be over to the left-hand side to do this and from here we can create our augmented matrix and the augmented matrix is just going to be these coefficients remember so that's one one three and six and we're going to have two and one and one and five and we're going to have one and two and one and six you can put that day if you want to if you have to and there's our augmented matrix so let's do the row operations but what I want to do is I want to go step by step so this is going to be a bit of a stuttering lecture because I'm going to clean the board every time we'll solve this algebraically and the representation in the matrix form just so that you fully understand what these row operations are all about instead of just trying to memorize to memorize them okay so here we go we've got a linear system system of linear equations on this side and it's represented as a matrix an augmented matrix on this side and we're just trying to solve this all I want you to know of course that these are equations this equals that so if I added six to this side and six to this side for this middle one same thing I've added six to both sides but I can add six to this side and all of this to that side same thing because these two things here are equal so what I do to the other one one I do to the other one so the first row operation that you get in that you might have been taught to assist to to change the rows just to interchange the rows so one of the common tricks is just to put the one with the largest coefficient at the top so we can go for 2x plus y plus z equals five and then that's the first one then we'll put that one x plus y plus 3 z equals six and then we're gonna have x plus 2 y plus z equals six so for my augmented matrix here I'm not going to put the dashes and these this is stick to the numbers the coefficients 2 1 1 5 and then I'm gonna have 1 1 3 and 6 and then I'm gonna have 1 2 1 and 6 so just interchange the rows it's all I'm doing I'm just writing one equation ahead of the other one now if I notice I can do something here I can multiply my my idea is to get rid of the x and get rid of the y so I'm just left with a z and then to work to work to work backwards so if I very notice that if I multiply this second one throughout by negative 2 I get negative 2x I get negative 2 y I get negative 6 z and I get negative 12 and I can do the same thing with a second one because I can get negative 2x I can get negative 4 z I can get negative 2 z and I can get negative 12 so if I do that the same thing here I get 2 1 1 that stays the same so this becomes negative 2 that's negative 2 that's negative 6 that's negative 12 and the same here negative 2 negative 4 negative 2 12 because what I can do now is just to do the following I'm want to add something to this side of the equation this first one and if I do something to the left-hand side I've got to do something to the right-hand side as well so this is what I did on this side I multiplied this side by negative 2 and that side by negative 2 so what I'm going to do I'm going to be clever about it I'm going to add this this to this side of the equation and that one to that side of the equation but that equals that so I'm adding the same thing to both sides so the first one is still going to stay the same 2x plus y plus z equals 5 and now let's add if I were to add this and this together the x is the y's and the z's go together so that gives me a 0x so x is gone which is what I want this is going to be a negative y it's going to be left this is going to be negative 5 negative 5z and that's going to be a negative 7 is that right minus 12 plus 5 that's negative 7 and I'm going to do the same here that's 0x it's exactly what I want this is a negative 3y and with z I've got left a negative z is that right z and a minus 2z and yeah I've also got left a negative 7 so let's just see on the augmented matrix side I'm going to have 2 1 1 5 that gives me 0 and I can do that and I stay in the columns and you can see why we stay in the columns there it's going to be a negative 1 this is going to be a negative 5 that's going to be a negative 7 and the same here 2 and a negative 2 if I were to add this to this and that to that which is what we're doing there I still get a 0 there get a minus 3 here get a minus 1 there and I get a minus 7 there at least we are this far that we've gotten that we've gotten rid of these two leading zeros what about getting rid of the 3 here so I have a 0 and a 0 so that there's nothing there well if I have negative 3 why what I can do is multiply this one throughout by negative 3 0 times negative 3 is still 0 negative 3 times that that's going to give me a positive 3 that's going to give me a positive 15 and that's going to give me a positive 21 now I have that and I can do the same here if I multiply that by negative 3 I get 3 that by negative 3 I get 15 that by negative 3 I get 21 so let's add this left hand side to this left hand side that right hand side to that right hand side I'm still going to be left with 2x plus y plus z equals 5 and same here left with a 0x plus 3 y plus 15 z equals 21 now let's add this I'm still left with a 0x now I'm left with a 0 y that's fantastic and I'm left with 14 z's and I'm left with 14 on that hand side as well and immediately I can see if I divide this side by 14 and that's how by 14 I get z equals 1 and that's exactly what I'm going to see I'm going to be left with 21 1 5 I'm going to be left with 0 3 15 and 21 and I'm left with 0 0 a 14 and a 14 and if I say if I were to do that I'm left with 15 and 15 1 and 1 1 and 1 so I already know that z equals 1 I've done that I can do that here I'm just going to have plus z equals 1 so I really know what z equals 1 is now we just want to move one up and above this z I want all zeros as well so I notice that if I multiply this once we out by negative 15 z negative 15 z that's going to be 0x 0 y minus 15 z equals minus 15 so I can multiply throughout and I get minus 15 minus 15 let's clear this and then I can start working from there from the top again so you can see 1 2 3 since that line so you see in tandem what is happening here so I'm still left with that 2x plus y plus z equals 5 and I find this left-hand side to that and this right-hand side to that I'm still left with the 0x I'm still left with 3 y's and I'm left with 0 z's and that's going to equal 7 is that 6 I'm left with 6 and in this side I still have 0x plus 0 y plus z equals 1 just divide by 15 on both sides so I'm getting 2 1 1 5 I'm getting 0 3 15 and 21 well I'm adding 0 and 0 so that's a 0 and that's a 6 and I'm still left with 0 0 1 1 so all I have to do is try and get rid of this this z here and let's clean the board okay board is cleaned let's carry on so what I can do is I can multiply throughout by negative 1 here so that's going to give me a negative z and a negative 1 so I'm going to have a negative and a negative and I can add this left-hand side to that and this left-hand side to that what am I going to get 0x and 2x is this 2x still 0 y and y is still a y minus z and positive z that gives me a 0 z and that equals negative 1 to that is 4 and I still have 0x and I have 3 y's and I have 0 z's and I have a 6 and on this side still 0x plus 0 y plus 1 z which is the z equals 1 so if I were to do this that's 2 1 0 4 if I add this last one to this first one this is still 3 0 0 3 0 6 and 0 0 1 1 and all I have to try to still have to do is just to get rid of this one here so that I have just that single one what I do notice here is that if I multiply by a divide by 3 throughout 3 divided by 3 is 1 and that's 6 divided by 3 is 2 and immediately I can see what is happening here if I multiply and divide by 3 throughout 0 divided by 3 3 divided by 3 0 divided by 3 6 divided by 3 is 2 so I can immediately see that y equals 2 I've already had z equals 1 and all I have to do is multiply 3 out by negative 1 here negative 1 here so that I can add this left-hand side to that and if this left-hand side to that so if I were to do that that's minus 1 minus 1 minus 2 and if I were to add this to that I get 2x I get a 0 y I get a 0 z and I get a 2 and yeah I still have 0x plus y plus 0 z equals and multiply again by negative 1 throughout that just gives me the positive 2 again and yeah I have 0 x plus 0 y plus z equals 1 and on this side I've done my my my negative my negative still here if I just add this to that and this side to that side I'm going to get 2 0 0 2 and if I multiply by minus 1 I get 0 1 0 2 0 0 1 1 and all I have to do is here divide by 2 throughout which means I get a 1 and a 1 if I multiply by a half or divide by 2 multiply by a half throughout a half times 2 that's this equals 1 that's still a 0 that's still a 0 and that becomes a 1 and that's what we have now we have x plus nothing plus nothing is 1 so x is 1 y is 2 and z is 1 and we have it on this side as well 1 x there is 1 y is 2 and z is 1 just as we did before so you can see that these elementary row operations is nothing but just leaving out the x y's and z's sticking columns to columns later on you'll see that you can interchange columns as well you know you can go get into all of that but as long as you understand the concept of what happens here it's this algebra and I'm just leaving out the variables to get it on this side and what I do to the left-hand side I do to the right-hand side but because these two things are equal if I add this to that then I add this to that I have not changed this equation because these two things this thing and this thing is the same so if I were to add this to that and I just do that that's the exact same thing and it's nice that we write these in columns so that I don't have to write out this whole long thing this thing plus that thing I can just stick column to column so the x's the y's and the z's stay the same and it's just simple algebra so there you go linear equations done and dusted what I'll show you just I'm just very quickly in Mathematica is this let's just check that what we had you know was indeed absolutely correct we can just do the row reduce they enjoy our little planes just to get just to get some exercise so make these for yourself and and solve them just a bit of exercises I think it's pointless but there you go okay so here we are in Mathematica we see the three equations that we had x plus y plus 3z is 6, 2x plus y plus z is 5 and x plus 2y plus z equals 6 you can see the cell here I've done one of those numbered equations I just want to show you how it would look like perhaps in your exams you'll get them all expressed as a function of z so z equals minus a third x minus a third y plus 2 so I've just isolated z there on the left hand side then the same for the second two equations it helps if you have it in this format because if we do go into plotting these you know we're going to need it in that format and then here we have the augmented equation let's let's just do that plot 3d let's just do the plot 3d and we are going to put as always the square brackets and then in parentheses we're going to do these three equations here in z so I'm going to have minus one over and that is control or command and the fourth slash to get three I'm going to use my arrow key to go to the right so I have my negative third there and I must say multiply by x I could also just say space x there's got to be that space and then minus another one over another one over three arrow to the right space y plus 2 comma let's comma let's go for the second one I have minus 2 space x minus y plus 5 and the last one I'm going to have is a minus x minus 2 space y to indicate 2 times y plus 6 I'm going to close my curly brace it's my list of three equations and I've just got to tell Mathematica what I want these domains for x and y to be so I'm going to say x goes from let's make it negative 5 to 5 that's a safe bet usually with these let's take y from negative 5 to 5 as well and let's just plot that and there we can see beautifully let me increase the size of this and we can see the point in which these three planes intersect and that is indeed x equals 1 y is 2 and z equals 1 let's create a just an augmented matrix here I'm going to call it a and I'm going to put each row inside of its own set of square curly braces I should say and it was 1 comma 1 comma 3 comma 6 close my curly brace comma my next row is 2 comma 1 comma 1 comma 5 comma 5 there we go and the last one was 1 comma 2 comma 1 comma 6 close that line close the whole thing and shift enter or shift to return and there I have and if I wanted to do see that in matrix form I can say matrix I'm going to tap down to get to form matrix form of a and I see the augmented matrix there remember I could also do post fix notation so a fort slash fort slash matrix form matrix form and there we go exactly the same thing let's do the row reduction on this a row reduce and I'm going to pass a and I'm just going to express this in matrix form as well and that's our row reduced form and I see x equals 1 y equals 2 and z equals 1 as simple as that so that's it elementary row operations row reduced form gas Jordan Jordan elimination systems of linear equations done let's concentrate a bit on the matrices that we get from these themselves see them as something that exists on their own and not necessarily part of a system of linear equations I hope you get the systems of linear equations I hope you get these row operations done and that's that let's move on