Systems of Equations in Three Variables
A system of equations in three variables has three equations with three unknowns, usually x, y and z. Its solution is an ordered triple (x, y, z) that makes all three equations true. You solve it by eliminating one variable to get two equations in two variables, then solving those.
Before this lesson: You should know the Elimination Method, the Substitution Method and Number of Solutions for two-variable systems.
What the Solution Means
An equation like x + y + z = 6 has a graph that is a flat plane in space. Three planes can meet at one point, meet along a whole line, or have no point in common. So a three-variable system has one solution, infinitely many solutions or no solution, just like a two-variable system.
The Strategy: Reduce to Two Variables
- Number the equations (1), (2) and (3).
- Pick a variable to eliminate. Choose one that is easy to cancel, such as a variable with coefficients 1 and −1.
- Combine one pair of equations to eliminate it. Then combine a different pair to eliminate the same variable.
- Solve the two new equations for the other two variables.
- Substitute back into one of the original equations to find the third variable.
- Check the triple in all three original equations.
Worked Examples
Example 1: One solution
Solve the system.
\begin{aligned} x + y + z &= 6 \quad (1) \\ 2x - y + z &= 3 \quad (2) \\ x + 2y - z &= 2 \quad (3) \end{aligned}- Eliminate z. Add (1) and (3): (x + y + z) + (x + 2y - z) = 6 + 2
- Combine like terms: 2x + 3y = 8 (4)
- Add (2) and (3): (2x - y + z) + (x + 2y - z) = 3 + 2
- Combine like terms: 3x + y = 5 (5)
- Solve (5) for y: y = 5 - 3x
- Substitute into (4) (see substitution method): 2x + 3(5 - 3x) = 8
- Distribute: 2x + 15 - 9x = 8
- Combine like terms: -7x + 15 = 8
- Subtract 15 from both sides: -7x = -7
- Divide both sides by −7: x = 1
- Find y: y = 5 - 3(1) = 2
- Substitute into (1): 1 + 2 + z = 6
- Subtract 3 from both sides: z = 3
- Check (2): 2(1) - 2 + 3 = 3 ✓ and (3): 1 + 2(2) - 3 = 2 ✓
Answer: (1, 2, 3)
Example 2: Use substitution when it is easier
Solve: x + y + z = 10, y = 2z and x = z + 2.
- Two equations already give y and x in terms of z. Substitute both into the first: (z + 2) + 2z + z = 10
- Combine like terms: 4z + 2 = 10
- Subtract 2 from both sides: 4z = 8
- Divide both sides by 4: z = 2
- Find y: y = 2(2) = 4
- Find x: x = 2 + 2 = 4
- Check: 4 + 4 + 2 = 10 ✓
Answer: (4, 4, 2)
Example 3: No solution
Solve: x + y + z = 2 (1), 2x + 2y + 2z = 5 (2), x - y + z = 1 (3).
- Multiply (1) by 2: 2x + 2y + 2z = 4
- Subtract this from (2): (2x + 2y + 2z) - (2x + 2y + 2z) = 5 - 4
- Simplify: 0 = 1
- This is false, so no triple can make (1) and (2) both true.
Answer: No solution. Equations (1) and (2) are parallel planes.
Example 4: Infinitely many solutions
Solve: x + y + z = 3 (1), 2x + 2y + 2z = 6 (2), x - y = 1 (3).
- Multiply (1) by 2: 2x + 2y + 2z = 6. This is exactly equation (2).
- So (2) gives no new information. Only two different equations remain, (1) and (3).
- Solve (3) for x: x = y + 1
- Substitute into (1): (y + 1) + y + z = 3
- Combine like terms: 2y + z + 1 = 3
- Solve for z: z = 2 - 2y
Answer: Infinitely many solutions, (y + 1, y, 2 - 2y) for any y. For example, y = 0 gives (1, 0, 2). The planes meet along a line.
Example 5: Word problem with tickets
A school play sold 50 tickets for $450. Adult tickets cost $12, student tickets $8 and child tickets $5. Twice as many student tickets as child tickets were sold. How many of each were sold?
- Let a, s and c be the numbers of adult, student and child tickets. Count the tickets: a + s + c = 50 (1)
- Count the money: 12a + 8s + 5c = 450 (2)
- Use the ratio: s = 2c (3)
- Substitute (3) into (1): a + 2c + c = 50, so a + 3c = 50
- Solve for a: a = 50 - 3c
- Substitute a and s into (2): 12(50 - 3c) + 8(2c) + 5c = 450
- Distribute and multiply: 600 - 36c + 16c + 5c = 450
- Combine like terms: 600 - 15c = 450
- Subtract 600 from both sides: -15c = -150
- Divide both sides by −15: c = 10
- Find s and a: s = 2(10) = 20 and a = 50 - 3(10) = 20
- Check the money: 12(20) + 8(20) + 5(10) = 240 + 160 + 50 = 450 ✓
Answer: 20 adult, 20 student and 10 child tickets.
Common Mistakes
| Mistake | Example of the error | Fix |
|---|---|---|
| Eliminating different variables in the two pairs | Eliminating z from one pair and y from the other | Eliminate the same variable from both pairs. |
| Using the same pair twice | Combining (1) and (3), then (3) and (1) again | The second pair must use the equation you haven’t used yet. |
| Stopping after two variables | Giving x = 1, y = 2 as the answer | Substitute back to find z. |
| Sign errors when subtracting equations | (2x - y) - (x + 2y) = x + y | Subtract every term: x - 3y. |
| Calling 0 = 0 “no solution” | Treating a true statement as false | 0 = 0 means dependent equations (infinitely many). 0 = 1 means no solution. |
Practice Problems
- Solve: x + y + z = 9, x - y + z = 3, x + y - z = 1.
- Solve: 2x + y - z = 5, x - y + 2z = 1, 3x + 2y + z = 8.
- Solve: x + 2y + 3z = 14, 2x - y + z = 3, 3x + y - 2z = -1.
- Solve: x = 2y, z = x + 1, x + y + z = 11.
- Solve: x + y - z = 2, 2x + 2y - 2z = 7, x - y + z = 0.
- Solve: x - y + z = 1, 3x - 3y + 3z = 3, x + y = 4.
- Is (-1, 2, -3) a solution of x + y + z = -2, 2x - y - z = -1 and x + 3y + z = 2?
- A jar has 20 coins in nickels, dimes and quarters, worth $2.80. There are twice as many dimes as quarters. How many of each coin are there?
- Find a, b and c so that the parabola y = ax^2 + bx + c passes through (1, 2), (2, 7) and (−1, 4).
- Jen invests $10,000 in three accounts paying 2%, 3% and 5% per year. She earns $360 in a year. The amount in the 5% account equals the other two amounts combined. How much is in each account?
Show answers
- Add the first two: 2x + 2z = 12, so x + z = 6
Add the first and third: 2x + 2y = 10, so x + y = 5
Add the second and third: 2x = 4, so x = 2
Then y = 5 - 2 = 3 and z = 6 - 2 = 4. Solution: (2, 3, 4) - Add the first two to eliminate y: 3x + z = 6
Multiply the second by 2 and add the third: 2x - 2y + 4z + 3x + 2y + z = 2 + 8, so 5x + 5z = 10, or x + z = 2
Subtract: (3x + z) - (x + z) = 6 - 2, so 2x = 4 and x = 2
Then z = 2 - 2 = 0
Substitute into the first: 4 + y - 0 = 5, so y = 1. Solution: (2, 1, 0) - Add the second and third to eliminate y: 5x - z = 2
Multiply the second by 2 and add the first: x + 2y + 3z + 4x - 2y + 2z = 14 + 6, so 5x + 5z = 20, or x + z = 4
Add 5x - z = 2 and x + z = 4: 6x = 6, so x = 1
Then z = 4 - 1 = 3
Substitute into the second: 2 - y + 3 = 3, so y = 2. Solution: (1, 2, 3) - Substitute x = 2y and z = 2y + 1 into the third: 2y + y + 2y + 1 = 11
Combine: 5y + 1 = 11
Subtract 1: 5y = 10, so y = 2
Then x = 4 and z = 5. Solution: (4, 2, 5) - Multiply the first by 2: 2x + 2y - 2z = 4
Compare with the second: 4 = 7 is false
No solution. - The second equation is 3 times the first, so only two equations are different.
From x + y = 4: x = 4 - y
Substitute into the first: 4 - y - y + z = 1, so z = 2y - 3
Infinitely many solutions: (4 - y, y, 2y - 3) - First: -1 + 2 - 3 = -2 ✓
Second: 2(-1) - 2 - (-3) = -2 - 2 + 3 = -1 ✓
Third: -1 + 3(2) - 3 = -1 + 6 - 3 = 2 ✓
Yes, it is a solution. - Let n, d, q be the coins. Equations: n + d + q = 20, 5n + 10d + 25q = 280, d = 2q
Substitute d = 2q: n + 3q = 20, so n = 20 - 3q
Substitute into the value equation: 5(20 - 3q) + 10(2q) + 25q = 280
Distribute: 100 - 15q + 20q + 25q = 280
Combine: 100 + 30q = 280
Subtract 100: 30q = 180, so q = 6
Then d = 12 and n = 2 - Substitute each point: a + b + c = 2, 4a + 2b + c = 7, a - b + c = 4
Subtract the third from the first: 2b = -2, so b = -1
Then the first gives a + c = 3, and the second gives 4a + c = 9
Subtract: 3a = 6, so a = 2
Then c = 3 - 2 = 1. The parabola is y = 2x^2 - x + 1. - Let x, y, z be the amounts at 2%, 3% and 5%. Equations: x + y + z = 10{,}000, 0.02x + 0.03y + 0.05z = 360, z = x + y
Substitute z = x + y into the first: 2z = 10{,}000, so z = 5000 and x + y = 5000
Interest equation: 0.02x + 0.03y + 250 = 360, so 0.02x + 0.03y = 110
Substitute y = 5000 - x: 0.02x + 150 - 0.03x = 110
Combine: -0.01x = -40, so x = 4000
Then y = 1000. Amounts: $4,000 at 2%, $1,000 at 3%, $5,000 at 5%
FAQ
How do you solve a system of three equations with three variables?
Eliminate one variable from two different pairs of equations. Solve the two resulting equations for two variables, then substitute back to find the third.
What does the solution of a three-variable system look like?
It is an ordered triple (x, y, z), the point where three planes meet. Some systems have no solution or infinitely many.
How can you tell if there is no solution?
While eliminating, you get a false statement such as 0 = 1. If you get a true statement like 0 = 0, there are infinitely many solutions.
Can you use substitution instead of elimination?
Yes. If an equation already gives one variable in terms of the others, substitution is often faster, as in Example 2.
Summary
- The solution of a three-variable system is an ordered triple (x, y, z) that makes all three equations true.
- Eliminate the same variable from two different pairs to get two equations in two variables.
- Solve those, substitute back for the third variable, and check all three equations.
- A false statement like 0 = 1 means no solution. A true statement like 0 = 0 means infinitely many.
Previous lesson: Inverse Functions
Next lesson: Linear Programming
Back to the Algebra 2 Index