Systems in Three Variables

Learning goals

  • Picture each equation as a plane in three-dimensional space
  • Eliminate one variable at a time to reach triangular form, then back-substitute
  • Tell a false row (no solution) apart from a vanishing row (a free variable)
  • Sort the outcome into a point, a line, a plane, or no solution
  • Parameterize a line or a plane with one letter per free variable

From a line to a plane

A linear equation in three variables has the standard form

ax+by+cz=d,ax + by + cz = d,

with numbers aa, bb, cc, dd and at least one of aa, bb, cc nonzero, and each variable to the first power only. Its solutions are ordered triples (x,y,z)(x, y, z), three numbers at once. Compare the counting. In two variables an equation ax+by=cax + by = c leaves one degree of freedom: solve for whichever variable has a nonzero coefficient, and the other is free to be anything, so the solutions sweep out a line. (If b≠0b \neq 0, that means picking xx freely and solving for yy.) In three variables an equation ax+by+cz=dax + by + cz = d leaves two degrees of freedom: solve for one variable using whichever coefficient is nonzero, and the other two are free, so the solutions sweep out a two-dimensional sheet, a plane. (If c≠0c \neq 0, that means picking xx and yy freely and solving for zz.) Going up one variable lifts the picture up one dimension.

A two-variable equation is a line; a three-variable equation is a planeOn the left, axes with a slanted line through them. On the right, a tilted parallelogram representing a plane in space.two variablesa linethree variablesa plane
One equation, one dimension up. In two variables the solutions of ax + by = c fill a line in the plane; in three variables the solutions of ax + by + cz = d fill a flat plane in space. Each extra variable adds a degree of freedom to the solution set.

A system of three linear equations stacks three of these and asks for the triples satisfying all three at once. Geometrically it stacks three planes and asks which points lie on every one. That is why solving a three-variable system is the study of how planes can intersect.

The elimination algorithm: reduce to triangular form

You met elimination as a way to cancel a variable by adding or subtracting equations. The previous lessons also proved the key fact we lean on: replacing one equation by itself plus a multiple of another changes nothing about the solution set. The upgrade here is to stop combining pairs at random and instead aim at a target shape. Use the first equation to remove xx from the other two, then use the new second equation to remove yy from the third. This only works if the equation you are eliminating with actually contains the variable you are clearing; if it does not, for instance the first equation happens to have no xx term, swap it with a lower equation that does. Swapping the order of two equations changes nothing about the solution set, so it is always allowed. What remains is a triangular (staircase) system: the first equation still carries all three unknowns, the second carries only two, the third carries only one.

Triangular form and back-substitutionAn upper-triangular staircase of shaded cells over columns x, y, z, with the diagonal cells outlined in blue and an upward back-substitution arrow.xyz= 4= 1= 3xyzyzzback-substitute
The target shape. Forward elimination clears the lower-left entries so each equation begins one variable later than the one above it, leaving a staircase. The bottom row has a single unknown; back-substitution then climbs the stairs, solving for z, then y, then x.

The bottom equation has one unknown, so you solve it outright. Carry that value up into the second equation and solve for its second unknown. Carry both up into the first equation and solve for the last. This forward sweep to triangular form, then the climb back up, is a fixed procedure you can run without inventing anything. Two lessons from now you will drop the letters and record only the coefficients in a rectangular array called a matrix, and this identical sweep becomes a purely mechanical routine. For now keep the letters, so the reasoning stays visible.

Worked example 1 Solve x+y+z=4x + y + z = 4, x+2y+3z=5x + 2y + 3z = 5, 2x+3y+z=122x + 3y + z = 12

Number the equations to keep the bookkeeping honest:

(1) x+y+z=4,(2) x+2y+3z=5,(3) 2x+3y+z=12.(1)\ x + y + z = 4, \qquad (2)\ x + 2y + 3z = 5, \qquad (3)\ 2x + 3y + z = 12.

Use equation (1)(1) to clear xx from the other two. Subtract (1)(1) from (2)(2), and subtract 22 times (1)(1) from (3)(3):

(2)−(1): y+2z=1,(3)−2(1): y−z=4.(2) - (1): \ y + 2z = 1, \qquad (3) - 2(1): \ y - z = 4.

Now clear yy from the second of these by subtracting it from the first, which leaves a single equation in zz:

(y+2z)−(y−z)=1−4,3z=−3.(y + 2z) - (y - z) = 1 - 4, \qquad 3z = -3.

The system is now triangular, one variable dropping away at each step:

x+ y+ z=4y+ 2z=13z=−3\begin{array}{rrrcr} x & +\, y & +\, z & = & 4 \\[2pt] & y & +\, 2z & = & 1 \\[2pt] & & 3z & = & -3 \end{array}

Climb from the bottom. The last row gives z=−1z = -1. Put that into the middle row:

y+2(−1)=1 ⇒ y=3.y + 2(-1) = 1 \ \Rightarrow \ y = 3.

Put y=3y = 3 and z=−1z = -1 into the top row:

x+3+(−1)=4 ⇒ x=2.x + 3 + (-1) = 4 \ \Rightarrow \ x = 2.

The candidate is (2,3,−1)(2, 3, -1). Check it in all three originals, including the one you touched last:

2+3−1=4 ✓,2+6−3=5 ✓,4+9−1=12 ✓.2 + 3 - 1 = 4 \ \checkmark, \qquad 2 + 6 - 3 = 5 \ \checkmark, \qquad 4 + 9 - 1 = 12 \ \checkmark.

The three planes meet at the single point (2,3,−1)(2, 3, -1).

Check your understanding

A system has been reduced to the triangular form x−y+2z=1x - y + 2z = 1, y+z=5y + z = 5, and 4z=84z = 8. What is xx?

Answer choices

A word problem in three unknowns

Three unknowns generally need three independent facts to pin down one value for each, and each fact becomes one equation. Independent just means each fact adds real information: repeating something you already know does not count as a fourth fact. The elimination routine solves the resulting system the same way, whether the third fact is a full weighted total or a plain relationship between the unknowns.

Worked example 2 A three-way coffee blend

A roaster builds a 1212-pound blend from three coffees. The three coffees are a house roast at 66 dollars per pound, a dark roast at 99 dollars per pound, and a decaf at 1212 dollars per pound. The blend costs 102102 dollars in all, and the roaster uses as much house roast as dark and decaf combined. How many pounds of each go in?

Let hh, dd, and kk be the pounds of house, dark, and decaf. The three facts become

(1) h+d+k=12,(2) 6h+9d+12k=102,(3) h=d+k.(1)\ h + d + k = 12, \qquad (2)\ 6h + 9d + 12k = 102, \qquad (3)\ h = d + k.

Divide equation (2)(2) by 33 to shrink the numbers, and rewrite equation (3)(3) with all terms on one side:

(2′) 2h+3d+4k=34,(3′) h−d−k=0.(2')\ 2h + 3d + 4k = 34, \qquad (3')\ h - d - k = 0.

Use (3′)(3') to clear hh. Subtract (3′)(3') from (1)(1), and subtract 22 times (3′)(3') from (2′)(2'):

(1)−(3′): 2d+2k=12 ⇒ d+k=6,(2′)−2(3′): 5d+6k=34.(1) - (3'): \ 2d + 2k = 12 \ \Rightarrow \ d + k = 6, \qquad (2') - 2(3'): \ 5d + 6k = 34.

Those two equations are an ordinary two-variable system. Subtract 55 times the first from the second to strip out dd:

(5d+6k)−5(d+k)=34−30,k=4.(5d + 6k) - 5(d + k) = 34 - 30, \qquad k = 4.

Then d=6−k=2d = 6 - k = 2, and h=d+k=6h = d + k = 6. Check the cost, the fact held back longest:

6(6)+9(2)+12(4)=36+18+48=102 ✓.6(6) + 9(2) + 12(4) = 36 + 18 + 48 = 102 \ \checkmark.

The blend takes 66 pounds of house roast, 22 pounds of dark, and 44 pounds of decaf.

The four possible outcomes

Every example so far ended at one point, but that is only the most common ending. Recall the two-variable result from the previous lesson: a system there is consistent (has a solution) or inconsistent (none). A consistent system is in turn either independent (exactly one solution) or dependent (infinitely many). The infinite case had a single shape, a whole line where two equations described the same line. Space adds a dimension, and with it a new possibility. A dependent system in three variables can leave the solutions filling a line or filling an entire plane, so the catalog grows from three entries to four.

The four intersection patterns of three planesA two by two catalog: a point, a line, a coincident plane, and three parallel planes with no common intersection.one pointunique solutiona lineinfinitely manya planeinfinitely manyemptyno solution
One example of each of the four possible solution sets: crossing at a single point, sharing one line, coinciding as a single plane (both infinitely many solutions), or sharing no point at all (no solution, shown here as parallel planes, though planes can also fail to share a point without being parallel). Every three-equation system lands in exactly one of these four outcomes.

How do you tell which of the four you are looking at, just from the arithmetic? Read the triangular form. The next three examples work out a line, a false row, and a plane in turn; after that we can explain why these four outcomes, and no others, are the only ones possible.

Degenerate systems and how to read them

When the sweep ends with anything other than one value pinned down for each variable, the arithmetic tells you which shape you have. A false row (0=k0 = k with k≠0k \neq 0) means no solution, and it overrides everything else. If no row is false, then a vanishing row (0=00 = 0) is a redundant constraint, so a variable is free and you parameterize. To parameterize, name each free variable with a letter and solve for the rest in terms of it.

Worked example 3 A vanishing row: the solutions form a line

Solve

(1) x+3y+z=3,(2) −x+y+z=1,(3) −x+5y+3z=5.(1)\ x + 3y + z = 3, \qquad (2)\ -x + y + z = 1, \qquad (3)\ -x + 5y + 3z = 5.

Clear xx using equation (1)(1). Add (1)(1) to each of the others, since their xx terms are −x-x:

(1)+(2): 4y+2z=4 ⇒ 2y+z=2,(1)+(3): 8y+4z=8 ⇒ 2y+z=2.\begin{aligned} (1) + (2): \ 4y + 2z &= 4 \ \Rightarrow \ 2y + z = 2, \\ (1) + (3): \ 8y + 4z &= 8 \ \Rightarrow \ 2y + z = 2. \end{aligned}

Both reductions give the identical equation 2y+z=22y + z = 2, so subtracting one from the other leaves 0=00 = 0. The third equation carried no new information. Only two real constraints survive, equation (1)(1) and 2y+z=22y + z = 2, so one variable is free: the solutions form a line.

Parameterize by naming the free variable. Set z=tz = t; then 2y+z=22y + z = 2 gives

2y+t=2 ⇒ y=1−t2.2y + t = 2 \ \Rightarrow \ y = 1 - \frac{t}{2}.

Recover xx from equation (2)(2), −x+y+z=1-x + y + z = 1:

−x+(1−t2)+t=1 ⇒ −x+1+t2=1 ⇒ x=t2.-x + \left(1 - \frac{t}{2}\right) + t = 1 \ \Rightarrow \ -x + 1 + \frac{t}{2} = 1 \ \Rightarrow \ x = \frac{t}{2}.

Every solution has the form

(x,y,z)=(t2, 1−t2, t),(x, y, z) = \left(\frac{t}{2},\ 1 - \frac{t}{2},\ t\right),

one triple for each value of tt. (You could set z=2tz = 2t instead to clear the fraction out of yy, giving (t, 1−t, 2t)(t,\ 1 - t,\ 2t): the same line, just labeled with a differently scaled letter.) Check the held-back equation (3)(3):

−t2+5(1−t2)+3t=−t2+5−5t2+3t=5-\frac{t}{2} + 5\left(1 - \frac{t}{2}\right) + 3t = -\frac{t}{2} + 5 - \frac{5t}{2} + 3t = 5

for every tt. The three planes share this whole line.

Worked example 4 A false row: no solution

Solve

(1) x+y+2z=4,(2) 2x+3y+z=5,(3) 3x+4y+3z=12.(1)\ x + y + 2z = 4, \qquad (2)\ 2x + 3y + z = 5, \qquad (3)\ 3x + 4y + 3z = 12.

Clear xx with equation (1)(1). Subtract 22 times (1)(1) from (2)(2), and 33 times (1)(1) from (3)(3):

(2)−2(1): y−3z=−3,(3)−3(1): y−3z=0.(2) - 2(1): \ y - 3z = -3, \qquad (3) - 3(1): \ y - 3z = 0.

The same expression y−3zy - 3z cannot equal both −3-3 and 00. Subtract the first from the second to see it:

0=3.0 = 3.

This row is false, so no triple satisfies all three equations. The system is inconsistent, and the three planes enclose space without ever sharing a common point.

Check your understanding

Elimination on a three-equation system produces the rows x+y+z=2x + y + z = 2, y−z=1y - z = 1, and 0=50 = 5. What is the solution set?

Answer choices

Worked example 5 Two vanishing rows: the solutions form a plane

Solve

(1) 2x−y+z=3,(2) −4x+2y−2z=−6,(3) 6x−3y+3z=9.\begin{aligned} (1)\ 2x - y + z &= 3, \\ (2)\ -4x + 2y - 2z &= -6, \\ (3)\ 6x - 3y + 3z &= 9. \end{aligned}

Look before computing. Equation (2)(2) is exactly −2-2 times equation (1)(1), and equation (3)(3) is exactly 33 times equation (1)(1). Elimination confirms it: adding 22 times (1)(1) to (2)(2) gives 0=00 = 0, and subtracting 33 times (1)(1) from (3)(3) gives 0=00 = 0. Both extra rows vanish, so only one real constraint survives. With two variables left undetermined, the solution set is a whole plane, namely the single plane 2x−y+z=32x - y + z = 3 that all three equations describe.

Parameterize with two letters. Solve for yy, whose coefficient is −1-1 so no fractions appear, and let the other two run free as x=sx = s and z=tz = t:

2x−y+z=3 ⇒ y=2x+z−3=2s+t−3.2x - y + z = 3 \ \Rightarrow \ y = 2x + z - 3 = 2s + t - 3.

Every solution has the form

(x,y,z)=(s, 2s+t−3, t),(x, y, z) = (s,\ 2s + t - 3,\ t),

one triple for each pair (s,t)(s, t). Two free letters sweep out a two-dimensional sheet, which is exactly what it means for the answer to be a plane.

Check your understanding

A system reduces to the single surviving equation x−y+z=2x - y + z = 2, with the other two rows vanishing to 0=00 = 0. Writing y=sy = s and z=tz = t, which parameterization gives every solution?

Answer choices

Why exactly these four?

Why exactly these four outcomes, and never a stray answer like two points? The triangular form settles it. The count that matters is how many rows out of the triangular system still carry real information, that is, how many did not vanish into 0=00 = 0.

Why the solution set is a point, a line, a plane, or nothing#

Run the forward elimination until the system is triangular, exactly as in the examples above. Each step replaces one equation by itself plus a multiple of another, and the earlier lessons proved that such a step neither loses a solution nor invents one. So the triangular system has exactly the solutions the original did. Read it from the bottom up.

If any row comes out false (0=k0 = k with k≠0k \neq 0), no triple can satisfy it, so the solution set is empty. That case is done; assume from here that no row is false.

Otherwise, count the surviving equations, the rows that did not vanish into 0=00 = 0. Each surviving equation pins down one variable once the variables below it are known, the same way back-substitution worked in every worked example above. Every variable that no surviving equation pins down is free: you may give it any value you like, and each choice produces a different solution.

Surviving equationsFree variablesSolution set
30a single point
21a line (one parameter)
12a plane (two parameters)

A count of 00 surviving equations would need all three original equations to vanish, which cannot happen for a genuine system of three equations. So a consistent system always lands in one of the three rows above, and together with the empty case, the complete catalog is point, line, plane, or nothing. It can never be exactly two solutions, or any other finite count past one, because as soon as one variable is free, running it through infinitely many values produces infinitely many solutions.

Common mistakes

Practice

Multiple Choice Questions (MCQ)

Progressively harder sets of questions. Each opens on its own page.

Core practice

Practice problems at the level of the course, to be worked out on paper. Hints one at a time, then the answer or the full worked solution, with your progress kept in this browser.

Core practice Work it out on paper 10 problems Start →
More practice (optional)

Extra sets, as hard as the Challenge set. Each one opens on its own page.

More resources (optional)

Other explanations of this lesson, if you want a second take.

A bit of history (optional)

A surveyor measures the same corner of a field again and again, and the readings never quite agree, since no instrument is perfect. Fitting one set of numbers to every reading at once means solving a large system of linear equations, and for a century that work was done by hand.

Wilhelm Jordan wrote the handbook German surveyors worked from, and his 1888 edition laid elimination out as a fixed routine with a set order and a place on the page for every step. His one change is worth knowing: instead of stopping once the system is triangular and climbing back up, he kept clearing, removing each variable from the rows above it too. For a system with a single solution, that leaves every row reading one variable equals one number directly, with nothing left to climb; a degenerate system still simplifies the same way, it just keeps whatever zero rows, false rows, or free variables the sweep already found. That version, now called Gauss-Jordan elimination, trades a little extra arithmetic in the middle for none at the end when there is a unique solution to find. Your forward sweep above is the first half of it; back-substitution is the half a surveyor’s routine wrote out of the job.