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.

### Course: Algebra (all content)>Unit 5

Lesson 9: Systems with three variables

# 3-variable linear system word problem

Sal solves a word problem about the angles of a given triangle by modeling the given information as a system of three equations and variables. Created by Sal Khan and Monterey Institute for Technology and Education.

## Want to join the conversation?

• Are there any more videos on this topic?
• Wouldn't it be shorter to rewrite first equation with b and c in terms of a (already solved in 2nd and 3rd equations), solve for a and then use it to solve for b and c?
• That is exactly how I approached this problem, too, but I think Sal is trying to show the more general case.
• I understand everything about solving systems (including how to solve "no solution" or "infinite solutions" problems, thanks to Khan Academy) except how to solve systems like this:

x + 2y = 12
3y - 4z = 25
x + 6y + z = 20

All my teacher said in class about problems like this is that they should be easier but when I saw them in the homework I could not figure them out! Is there a video I could be directed to that could help me?
x + 2y + (0)z = 12
(0)x + 3y - 4z = 25
x + 6y + z = 20
The reason they may be considered easier is that one of the variables has already been "eliminated" in two of the cases.
Hope that helps!
• Do you have any exercises to work on?
• Perhaps search it up in the search box
• A collection of nickels, dimes, and quarters consist of
27
coins with a total of
\$
4.65
.
If the number of dimes is equal to the number of nickels, find the number of each type of coins.
• I having difficulty with word problem of system linear equation in three variables. Q: The perimeter of a triangle is 36 inches. Twice the length of the longest side minus the length of the shortest is 26 inches. the sum of the length of the longest side and twice the sum of both the other side length os 56 inches. find the side length. I came up with:
X+y+z=36
2x -z=26
x+2y=56............but that gave me the wrong answers . what am I reading wrong?
(1 vote)
• You have defined x as the longest side and z the shortest. Your mistake is in setting up the third equation. Twice the sum of both the other side lengths is NOT 2y but 2(y+z). Distributing, this makes your third equation: x+2y+2z=56.
• how do I do a problem like this??
x + 3z = -5
5x - 2y = -22
5y - 6z = 36
(1 vote)
• I'm confused with this word problem. The perimeter of a triangle is 30 inches. The shortest side is 4 inches shorter than the longest side. The longest side is 6 inches less the sum of the other two sides. Find the length of each side.
I have: x representing the shortest side and z representing the longest side and y the other side.
x = z - 4
z = (x + y) - 6
x + y + z = 30

Where am I going wrong? TIA
(1 vote)
• You haven't done anything wrong. Your next steps is to start substituting. Replace "x" with "z-4" in both the other equations:
z=(z-4)+y-6
z-4+y+z=30
From here, I would clean up z=(z-4)+y-6
-- Combine like terms: z=z+y-10
-- Subtract "z": 0=y-10
-- Solve for "y": y=10.
You know y=10.

Then, use this in the last equation: z-4+y+z=30 to replace "y" to get: z-4+10+z=30

You can now solve for "z". Once you have "z", you can use it to calculate "x".

Hope this helps.
(1 vote)
• How do you know whether or not a system of equations with 3 variables has an infinite amount of solutions?
(1 vote)
• in 6, why does Sal -1(a+b+c=180). Could he not just cancel out the b's from (a+b+c=180)
(-4a+b=-50)
(1 vote)
• You can only cancel out when you're dividing (and even then it is factors, not terms, that you can cancel out). You're not dividing here, so you cannot cancel out.

So, no, you cannot cancel out here.
(1 vote)

## Video transcript

Solve the following application problem using three equations with three unknowns. And they tell us the second angle of a triangle is 50 degrees less than four times the first angle. The third angle is 40 degrees less than the first. Find the measures of the three angles. So let's draw ourselves a triangle here. And let's call the first angle a, the second angle b, and then the third angle c. And before we even look at these constraints, one property we know of triangles is that the sum of their angles must be 180 degrees. So we know that a plus b plus c must be equal to 180 degrees. Now, with that out of the way, let's look at these other constraints. So they tell us the second angle of a triangle-- let me do that in another color-- they tell us the second angle of a triangle is 50 degrees less than four times the first angle. So we're saying b is the second angle. So they're saying, the second angle of a triangle is 50 degrees less than four times the first angle. So 4 times the first angle would be 4a, we're calling a the first angle. So 4 times the first angle is 4a. But it's 50 degrees less than that, so minus 50. Now the next constraint they give us, the third angle is 40 degrees less than the first. So the third angle is 40 degrees less than the first. So the first angle, a, is going to be 40 degrees less than that. So we have three equations with three unknowns. And so we just have to solve for it. And let's see, what's a good first variable to try to eliminate? And just to try to visualize that a little bit better, I'm going to bring these a's onto the left hand side of each of these equations over here. So I'm going to rewrite the first equation. We have a plus b plus c is equal to 180. And then this equation, if we subtract 4a from both sides of this equation, if we subtract 4a we have negative 4a plus b is equal to negative 50. And then this equation right over here, if we subtract a from both sides we get negative a plus c is equal to negative 40. I just subtract a from both sides. So we now want to eliminate variables. And we already have-- this third equation here is only in terms of a and c. This is only in terms of a and b. And this first one is in terms of a, b, and c. So if we could-- let's see, this is already in terms of a and c. If we could turn these first two equations, if we can use the information in these first two equations to end up with an equation that's only in terms of a and c, then we could use whatever we end up with along with this third equation right over here, and we'll have a system of two equations with two unknowns. So let's do that. So if we wanted to just end up with an equation only in terms of a and c using these first two, we would want to eliminate the b's. So we could multiply one of these equations times negative 1, and one of these positive b's will turn into a negative b. So let's do that. Let's multiply this first equation over here, let's multiply it times negative 1. So it'll become negative a minus b minus c is equal to negative 180. And then we have this green equation right over here, which is really just this equation, just rearranged. So we have negative 4a plus b is equal to negative 50. And now we can add these two equations. Actually, let me do that in the other color, just so you see where that's coming from. I'll do it in that green color. So this is negative 4a plus b is equal to negative 50. We can add these two up now. And we get negative a minus 4a is negative 5a. The b's cancel out. We have a minus c is equal to negative 180 minus 50 is negative 230. So now using these top two equations we have an equation only in terms of a and c. We have another equation only in terms of a and c. And it looks like if we add them together their c's will cancel out. So let me just rewrite this equation over here. And you have to be careful that you're using all of the equations. Otherwise you'll do a circular argument. You have to be careful that over here this first equation came from these two over here. Now I want to combine that with this third constraint, s constraint that's not already baked into this equation right over here. So we have negative a plus c is equal to negative 40. And we add these two equations. Negative 5a minus a is negative 6a. The c's cancel out. And then you have negative 230 minus 40. This is equal to negative 270. We can divide both sides by negative 6. And we get a is equal to negative 270 over 6. Let me see how many times-- let me see something. 270 is divisible by both 3 and 2. So it should be divisible by 6. So let me just divide it. The negative signs obviously will-- a negative divided by a negative is going to be a positive. And if we take 6 into 270, 6 goes into 27 4 times. 4 times 6 is 24. We subtract. We get 3, bring down the 0. 6 goes into 30 five times. So we get a is equal to 45. Now let's look at the other ones. We can substitute back in to solve for c. c is equal to a minus 40 degrees. So that is equal to-- let me write it right over here in yellow-- so c is equal to 45 minus 40, which is equal to 5 degrees. So, so far we have a is equal to 45 degrees, c is equal to 5 degrees. And then you could substitute into either one of these other ones to figure out b. We could use this one right over here in green. B is equal to 4a minus 50. So b is going to be equal to 4 times 45 is-- let's see, 2 times 45 is 90. So 4 times 45 is 180. So it's going to be 180 minus 50, by this equation right over here, which is equal to 130 degrees. So we get b is equal to 130 degrees. And then we can-- let me write over here. So a is equal to 45. So if I wanted to draw this triangle it would actually look something like this. a is a 45 degree angle, b is a 130 degree angle, and c is 5. So it'll look something like this. It will look something like this, where this is a at 45 degrees, b is 135 degrees, and then c is 5 degrees. And you can verify that it works. One, you can just add up the angles. 45 plus 5 is 50. Oh, sorry, this isn't 135. It's 130. We solved it right over here. It's 130 and this is 5. So when you add them all up-- 45 plus 130 plus 5-- that does indeed equal 180 degrees. 45 plus 5 is 50 plus 130. So this does definitely equal 180. So it meets our first constraint, Then on our second constraint, b needs to be equal to 4a minus 50. Well, 4 times a is 180 minus 50 is 130 degrees. So it meets our second constraint. And then our third constraint, c is a minus 40 degrees. Well, a is 45, c is 5. So if you subtract 40 from 45 you get 5, which is c. So it meets all of our constraints and we are done.