 Welcome back to our lecture series Math 1050, College Algebra for Students at Southern Utah University. As usual, I'm your professor today, Dr. Andrew Misaline. In the previous lecture, number 11, we learned about solving systems of linear equations using the substitution and or elimination methods. But in those situations, we only focused on two equations and two unknowns. In this situation, we want to learn about how we can apply these techniques to solving systems of equations with three equations and three unknowns. Maybe we have three linear equations involving the variables x, y, and z. How can we modify the techniques of substitution or elimination in that setting? In this video, we're going to talk about how we want to adjust the substitution method in order to solve a system with more than two variables. Well, the idea here is the following. With the substitution method, we take an equation and we select one of the variables. For example, we might choose variables z inside of the first equation. We then solve for that variable. Well, in order to do that, we basically just have to swap the locations of the z and the 1. This will give us that z is equal to x plus y plus 1. Once we make that assignment, we then are going to plug that assignment into the other two equations involving z. When we do that, we're going to get some new equations. We're going to get 4x minus 3y plus 2z, but z can be replaced with x plus y plus 1. This equals 16. We then want to simplify this expression here. We'll just put it down here. We get 4x minus 3y, distribute that 2. We're going to get a 2x plus a 2y plus a 2, this equals 16. Combining like terms, the 4x is combined to give us a 6x. The y's combined to give us a negative y. We're going to move the 2 to the other side and get 16 minus 2, which is 14. We get a new equation, 6x minus y equals 14. We're going to do this for the third equation as well, so 2x minus 2y minus 3. Instead of z, we're going to plug in x plus y plus 1 equals 5. Distribute that negative 3. We get 2x minus 2y minus 3x minus 3y minus 3 equals 5. Combining the x's, we're going to get a negative x this time. Combining the y's, we get a negative 5y. And then moving that 3 to the other side, that is we add 3 to both sides, we get 5 plus 3, which is 8. So now we have two equations that only involve x and y. So because of the substitution, z is now out of consideration. So we have this 6x minus y equals 14. And then we have a negative x minus 5y equals 8. And so now we have this smaller system that's only two equations and two unknowns. We have to then solve this system using either elimination or substitution. We could switch to elimination if we wanted to. But I'm going to keep on using substitution just for the sake of it here. So if we take the first equation, the y, if we swap the places of the y and the 14, we're going to get that y equals 6x minus 14. And then we can substitute that into the other equation there. And upon doing that, we're going to see that negative x minus 5 times 6x minus 14. This is equal to 8. Distribute that negative 5. You're going to get negative x minus 5 times 6 is a 30. So we get negative 30x. And then we times the negative 5 times the 14. You're going to get positive 70. And this, of course, is equal to 8. Combining like terms, negative x and negative 30x will come together to give us negative 31x. When you move the 7 to the other side, you're going to get 8 minus 70, which is equal to negative 62, which fortunately for us, if you like integers, when you divide both sides by negative 31, you're going to get x is negative 62 over negative 31, which is just a positive 2. So now notice what we've done here. We've discovered that what x is. If we keep track of what we know so far, we see that x is equal to 2. Well, since x is equal to 2, we can substitute this back into the previous expression that only involved x and y. And therefore, y is going to equal 6 times 2 minus 14. 6 and 2 gives us a 12 minus 14 is going to give us a negative 2. This is our y-coordinate. So we know the y-coordinate as negative 2. We know the x-coordinate as 2. Well, what about z? Well, we can come back to the original equation that we have here, right? Remember, we solve z for z is equal to x plus y plus 1. Well, x we've discovered is now 2. y we've discovered is now negative 2 plus 1. That adds up together just to be a 1, because the 2s will cancel there. And so putting this together, we find out our solution is going to be x is 2, y is negative 2, and z is 1. So using the substitution method, we can modify it for three equations, three unknowns. We could also do this for four equations, four unknowns, five equations, five unknowns, six by six, seven by seven, a million by a million. This technique could be adjusted to any number of equations and variables that we have present. Now we're really not gonna be doing stuff bigger than three by three. But the idea is we see that we can generalize this technique for any number of variables present. And we can, of course, check to see if our solution is valid or not. If you look at the first equation, right? You plug that in there, 2 minus 2, 2 minus 2 minus 1. That's gonna give us a negative 1. Great. Plug it into the second equation here. You're gonna get 4 times 2, which is 8. You're gonna get negative 3 times negative 2, which is a positive 6. And then you're gonna get 2 times 1, which is a 2. 2 and 8 is 10 plus 6 is 16. And then lastly, when you look at this equation right here, 2 and 2 is 4. And then you get negative 2 times negative 2, which is another 4. And then you're gonna get 3 times 1, which is negative 3 right there. 8 minus 3 is in fact 5. So we have the legitimate solution to the system of equations. And we found this using substitution.