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

A flow diagram. Three equations in x, y and z. Step 1: pair two equations and eliminate one variable, such as z. Step 2: pair a different two equations and eliminate the same variable. This leaves two equations in x and y. Step 3: solve that two-variable system. Step 4: substitute back to find z, and check all three equations.
Eliminate the same variable twice, solve the two-variable system, then substitute back.
  1. Number the equations (1), (2) and (3).
  2. Pick a variable to eliminate. Choose one that is easy to cancel, such as a variable with coefficients 1 and −1.
  3. Combine one pair of equations to eliminate it. Then combine a different pair to eliminate the same variable.
  4. Solve the two new equations for the other two variables.
  5. Substitute back into one of the original equations to find the third variable.
  6. 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}
(x + y + z) + (x + 2y - z) = 6 + 2

Eliminate z. Add (1) and (3)

2x + 3y = 8

Combine like terms ((4)).

(2x - y + z) + (x + 2y - z) = 3 + 2

Add (2) and (3)

3x + y = 5

Combine like terms ((5)).

y = 5 - 3x

Solve (5) for y.

2x + 3(5 - 3x) = 8

Substitute into (4) (see substitution method)

2x + 15 - 9x = 8

Distribute.

-7x + 15 = 8

Combine like terms.

-7x = -7

Subtract 15 from both sides.

x = 1

Divide both sides by −7.

y = 5 - 3(1) = 2

Find y.

1 + 2 + z = 6

Substitute into (1)

z = 3

Subtract 3 from both sides.

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.

(z + 2) + 2z + z = 10

Two equations already give y and x in terms of z. Substitute both into the first.

4z + 2 = 10

Combine like terms.

4z = 8

Subtract 2 from both sides.

z = 2

Divide both sides by 4.

y = 2(2) = 4

Find y.

x = 2 + 2 = 4

Find x.

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).

2x + 2y + 2z = 4

Multiply (1) by 2.

(2x + 2y + 2z) - (2x + 2y + 2z) = 5 - 4

Subtract this from (2)

0 = 1

Simplify.

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).

2x + 2y + 2z = 6

Multiply (1) by 2. This is exactly equation (2).

So (2) gives no new information. Only two different equations remain, (1) and (3).

x = y + 1

Solve (3) for x.

(y + 1) + y + z = 3

Substitute into (1)

2y + z + 1 = 3

Combine like terms.

z = 2 - 2y

Solve for z.

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?

a + s + c = 50

Let a, s and c be the numbers of adult, student and child tickets. Count the tickets ((1)).

12a + 8s + 5c = 450

Count the money ((2)).

s = 2c

Use the ratio ((3)).

a + 2c + c = 50

Substitute (3) into (1)

a + 3c = 50

Combine like terms.

a = 50 - 3c

Solve for a.

12(50 - 3c) + 8(2c) + 5c = 450

Substitute a and s into (2)

600 - 36c + 16c + 5c = 450

Distribute and multiply.

600 - 15c = 450

Combine like terms.

-15c = -150

Subtract 600 from both sides.

c = 10

Divide both sides by −15.

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

MistakeExample of the errorFix
Eliminating different variables in the two pairsEliminating z from one pair and y from the otherEliminate the same variable from both pairs.
Using the same pair twiceCombining (1) and (3), then (3) and (1) againThe second pair must use the equation you haven’t used yet.
Stopping after two variablesGiving x = 1, y = 2 as the answerSubstitute back to find z.
Sign errors when subtracting equations(2x - y) - (x + 2y) = x + ySubtract every term: x - 3y.
Calling 0 = 0 “no solution”Treating a true statement as false0 = 0 means dependent equations (infinitely many). 0 = 1 means no solution.

Practice Problems

  1. Solve: x + y + z = 9, x - y + z = 3, x + y - z = 1.
  2. Solve: 2x + y - z = 5, x - y + 2z = 1, 3x + 2y + z = 8.
  3. Solve: x + 2y + 3z = 14, 2x - y + z = 3, 3x + y - 2z = -1.
  4. Solve: x = 2y, z = x + 1, x + y + z = 11.
  5. Solve: x + y - z = 2, 2x + 2y - 2z = 7, x - y + z = 0.
  6. Solve: x - y + z = 1, 3x - 3y + 3z = 3, x + y = 4.
  7. Is (-1, 2, -3) a solution of x + y + z = -2, 2x - y - z = -1 and x + 3y + z = 2?
  8. 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?
  9. Find a, b and c so that the parabola y = ax^2 + bx + c passes through (1, 2), (2, 7) and (−1, 4).
  10. 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

1.

2x + 2z = 12

Add the first two.

x + z = 6

Divide both sides by 2.

2x + 2y = 10

Add the first and third.

x + y = 5

Divide both sides by 2.

2x = 4

Add the second and third.

x = 2

Divide both sides by 2.

(2, 3, 4)

Then y = 5 - 2 = 3 and z = 6 - 2 = 4. Solution.

2.

3x + z = 6

Add the first two to eliminate y.

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)

3.

5x - z = 2

Add the second and third to eliminate y.

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

6x = 6

Add 5x - z = 2 and x + z = 4.

x = 1

Divide both sides by 6.

Then z = 4 - 1 = 3
Substitute into the second: 2 - y + 3 = 3, so y = 2. Solution: (1, 2, 3)

4.

2y + y + 2y + 1 = 11

Substitute x = 2y and z = 2y + 1 into the third.

5y + 1 = 11

Combine.

5y = 10

Subtract 1.

y = 2

Divide both sides by 5.

(4, 2, 5)

Then x = 4 and z = 5. Solution.

5.

2x + 2y - 2z = 4

Multiply the first by 2.

Compare with the second: 4 = 7 is false
No solution.

6.

The second equation is 3 times the first, so only two equations are different.

x = 4 - y

From x + y = 4.

4 - y - y + z = 1

Substitute into the first.

z = 2y - 3

Combine like terms and solve for z.

(4 - y, y, 2y - 3)

Infinitely many solutions.

7.

-1 + 2 - 3 = -2

Check the first equation. It works.

2(-1) - 2 - (-3) = -2 - 2 + 3 = -1

Check the second equation. It works.

-1 + 3(2) - 3 = -1 + 6 - 3 = 2

Check the third equation. It works.

Yes, it is a solution.

8.

Let n, d, q be the coins. Equations: n + d + q = 20, 5n + 10d + 25q = 280, d = 2q

n + 3q = 20

Substitute d = 2q.

n = 20 - 3q

Subtract 3q from both sides.

5(20 - 3q) + 10(2q) + 25q = 280

Substitute into the value equation.

100 - 15q + 20q + 25q = 280

Distribute.

100 + 30q = 280

Combine.

30q = 180

Subtract 100.

q = 6

Divide both sides by 30.

Then d = 12 and n = 2

9.

Substitute each point: a + b + c = 2, 4a + 2b + c = 7, a - b + c = 4

2b = -2

Subtract the third from the first.

b = -1

Divide both sides by 2.

Then the first gives a + c = 3, and the second gives 4a + c = 9

3a = 6

Subtract.

a = 2

Divide both sides by 3.

Then c = 3 - 2 = 1. The parabola is y = 2x^2 - x + 1.

10.

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

0.02x + 0.03y + 250 = 360

Write the interest equation.

0.02x + 0.03y = 110

Subtract 250 from both sides.

0.02x + 150 - 0.03x = 110

Substitute y = 5000 - x.

-0.01x = -40

Combine.

x = 4000

Divide both sides by −0.01.

Then y = 1000. Amounts: $4,000 at 2%, $1,000 at 3%, $5,000 at 5%

Want more practice? The Algebra 2 Unit 2 Practice Pack has 33 pages of problems on this and the other lessons in the unit, with step-by-step answers and a cheat sheet.

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