Solving Systems With Three Variables
A system of three equations with three unknowns works on the same principle as a two-variable system: you need as many independent equations as you have unknowns. The strategy is to use elimination (or substitution) to reduce the three-variable system down to a two-variable system, solve that, then back-substitute to find all three values.
The Method
The general approach using elimination:
- Choose two pairs of equations and eliminate the same variable from each pair. This leaves you with two new equations in two unknowns.
- Solve that two-variable system using the methods from the two-variable lesson.
- Back-substitute the values you found to get the third variable.
- Check your answer in all three original equations.
Worked Example
Solve the system:
$$x + y + z = 6 \tag{1}$$ $$2x - y + z = 3 \tag{2}$$ $$x + 2y - z = 2 \tag{3}$$
Step 1 — Eliminate z from two pairs.
Add equations (1) and (3):
$$(x + y + z) + (x + 2y - z) = 6 + 2$$ $$2x + 3y = 8 \tag{A}$$
Add equations (2) and (3):
$$(2x - y + z) + (x + 2y - z) = 3 + 2$$ $$3x + y = 5 \tag{B}$$
Step 2 — Solve the two-variable system (A) and (B).
From equation (B): \(y = 5 - 3x\).
Substitute into (A):
$$2x + 3(5 - 3x) = 8$$ $$2x + 15 - 9x = 8$$ $$-7x = -7$$ $$x = 1$$
Then \(y = 5 - 3(1) = 2\).
Step 3 — Back-substitute to find z.
Use equation (1): \(1 + 2 + z = 6 \implies z = 3\).
Solution: \(x = 1,\ y = 2,\ z = 3\).
Step 4 — Check in all three original equations:
- \(1 + 2 + 3 = 6\) ✓
- \(2(1) - 2 + 3 = 3\) ✓
- \(1 + 2(2) - 3 = 2\) ✓
When There's No Unique Solution
Not every system has exactly one solution.
No solution: The equations are inconsistent — they can't all be true at once. Geometrically, three planes that don't all share a common point. Algebraically, you'll reach a contradiction like \(0 = 5\) during elimination.
Infinitely many solutions: Two or more equations describe the same plane (or their intersection is a line rather than a point). Algebraically, you'll reach a true but unhelpful statement like \(0 = 0\). The equations are not independent.
In either case, the matrix calculator can help identify the issue quickly — row reduction will reveal whether the system is inconsistent or underdetermined.
Practice Problems
1. Solve: $$x + y + z = 6 \qquad x - y + z = 2 \qquad x + y - z = 4$$ Show answerAdd Eq1 and Eq2: \(2x + 2z = 8 \implies x + z = 4\) (A). Add Eq1 and Eq3: \(2x + 2y = 10 \implies x + y = 5\) (B). Add Eq2 and Eq3: \(2x = 6 \implies x = 3\). From (A): \(z = 1\). From (B): \(y = 2\). Solution: \(x = 3,\ y = 2,\ z = 1\). Check: \(3+2+1=6\) ✓, \(3-2+1=2\) ✓, \(3+2-1=4\) ✓
2. Solve: $$x + y + z = 9 \qquad 2x + y - z = 3 \qquad x - y + 2z = 7$$ Show answerEq1 + Eq2: \(3x + 2y = 12\) (A). Eq1 + Eq3: \(2x + 3z = 16\) (B). Eq2 + Eq3: \(3x + z = 10 \implies z = 10 - 3x\) (C). Into (B): \(2x + 3(10-3x) = 16 \implies -7x = -14 \implies x = 2\). Then \(z = 4\). From (A): \(y = 3\). Solution: \(x = 2,\ y = 3,\ z = 4\). Check: \(9=9\) ✓, \(4+3-4=3\) ✓, \(2-3+8=7\) ✓
3. A farmer has chickens, cows, and pigs — 30 animals total. Chickens have 2 legs, cows and pigs each have 4. There are 90 legs total. He has 3 times as many chickens as pigs. How many of each? Show answerLet \(c, k, p\) = chickens, cows, pigs. System: \(c + k + p = 30\), \(2c + 4k + 4p = 90\), \(c = 3p\). Simplify the second equation: \(c + 2k + 2p = 45\). Substitute \(c = 3p\) into the first: \(k = 30 - 4p\). Into the simplified second: \(3p + 2(30-4p) + 2p = 45 \implies -3p = -15 \implies p = 5\). So \(c = 15\), \(k = 10\). 15 chickens, 10 cows, 5 pigs. Check: \(30 + 40 + 20 = 90\) legs ✓