If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

Main content

# Solving linear systems with 3 variables

## Video transcript

solve this system and once again we have three equations with three unknowns so this is essentially trying to figure out where three different planes would intersect in three dimensions and to do this if we want to do it by elimination if we want to be able to eliminate variables it looks like well it looks like we have a negative Z here we have a plus 2z we have a 5z over here if we were to scale up this third equation by positive two then you would have a negative 2z here and it would cancel out with this 2z there and then if you were to scale it up by five you'd have a negative 5z here and then that could cancel out with that 5z over there so let's try to cancel out let's try to eliminate the Z's first so let me start with this equation up here I'll just rewrite it so we have I'll draw an arrow over here we have x + 2 y + 5 Z is equal to negative 17 and then to cancel out or to eliminate the Z's I'll multiply this equation here times 5 so I'm going to multiply this equation times 5 so we have to multiply both sides by 5 so 3x times 5 is 15 X Y times 5 is plus 5y and then negative Z times 5 is negative 5 Z that's the whole point while we're multiplying it by 5 is equal to 3 times 5 which is equal to 15 and so if we add these two equations we get x + 15 X is 16 X 2y + 5 y is 7 y + 5 z minus 5z or plus negative 5 z those are going to cancel out and that is going to be equal to negative 17 plus 15 is negative 2 so we were able to use the constraints in that equation in that equation and now we have an equation in just x + y so let's try to do the same thing let's try to eliminate the Z's but now use this equation and this equation so this equation let me just rewrite it over here we have 2x minus 3y plus 2z is equal to negative 16 i just rewrote it and now so that this 2z gets eliminated let's multiply this equation times 2 so let's multiply it times 2 so a negative 2z here to eliminate with the positive 2z so 2 times 3x is 6x 2 times y is plus 2y and then 2 times negative z is negative 2 z is equal to 2 times 3 is equal to 6 and now we can add these two equations 2x + 6 X is 8x negative 3y plus 2y is negative Y and then these two guys get cancelled out and then that is equal to negative 16 plus 6 is negative is negative 10 so now we have two equations with two unknowns we've eliminated the Z's and let's see if we want to eliminate again we have a negative Y over here we have a positive 7y well we could eliminate the Y's if we multiply this times 7 and add the two equation so let's do that so let's multiply this times 7 7 times 8 is 56 7 times 8 is so it's 56 X minus 7y minus 7y is equal to 7 times negative 10 is equal to negative is equal to negative 70 and now we can add these two equations I'm now trying to eliminate the Y's so we have 16x + 56 X that is 72 X so we have 72 X these guys eliminate equal to negative 72 equal to negative 72 negative 2 plus negative 70 divided both sides by 72 and we get X is equal to negative 1 and now we just have to substitute back to figure out what y&z are equal to so let's we could go back to this equation right over here so we have 8x minus y is equal to negative 10 if X is equal to negative 1 that means 8 times negative 1 or negative 8 minus y is equal to negative 10 we can add 8 to both sides and so we have negative Y is equal to negative 2 or multiplying both sides by negative 1 Y is equal to to let me square that off so X is equal to negative one y is equal to two we now just have to worry about Z and we can go back to any of these up here so let's just use I'll just use this last one the numbers seem lower so if I we substitute back into this last equation right over here we have 3 times X which is 3 times negative 1 plus y which is 2 minus Z is equal to 3 so it's negative 3 plus 2 minus Z is equal to 3 and this is negative 1 minus Z is equal to 3 and then add 1 to both sides add 1 to both sides we get these cancel out negative Z is equal to 4 multiplying both sides by negative 1 you get Z is equal to negative 4 so we're done let's verify that these solutions or this solution of X negative 1 y is equal to 2 Z is equal to negative 4 actually satisfies all three of these constraints so let's substitute into this first one so you have X plus 2y plus 5z so that is X is negative 1 plus 2 times y so plus 4 plus 5z so minus 20 has to be equal to negative 17 and this is negative this right here is positive 3 minus 20 is indeed equal to negative 17 so it satisfies the first constraint let's look at the second one 2 times X 2 times negative 1 that's negative 2 minus 3 times y that's minus 6 3 times 2 is 6 minus 6 plus 2 times Z Z is negative 4 so that's 2 times negative 4 is negative 8 that needs to equal negative 16 negative 2 minus negative 8 is sorry 2 negative 2 minus negative 6 is negative 8 subtract another 8 you get negative 16 so it meets the second constraint and then finally let's look at the last constraint we have 3 times X 3 times X so negative 3 plus y so plus 2 minus Z so minus negative 4 is the same thing as plus 4 that needs to be equal to 3 so negative three plus two is negative one plus four is indeed equal to three so we found our the point of intersection in three dimensions of these three of these three planes X is negative one Z is negative four Y is two and we were able to verify that it does indeed meet all of the constraints