Systems with More Variables

Learning goals

  • Write ax+by+cz=dax + by + cz = d and solve for ordered triples
  • Eliminate the same variable from two different pairs
  • Reduce to a two-variable system, then back-substitute
  • Explain why each round removes an unknown and terminates
  • Picture each equation as a plane meeting at a point
  • Read a false or always-true leftover as the special cases

From two unknowns to three

Take the system

x+y+z=6,x−y+z=2,x+y−z=0.x + y + z = 6, \qquad x - y + z = 2, \qquad x + y - z = 0.

The triple (1,2,3)(1, 2, 3) solves it, because 1+2+3=61 + 2 + 3 = 6, and 1−2+3=21 - 2 + 3 = 2, and 1+2−3=01 + 2 - 3 = 0 are all true. Each equation now holds three letters instead of two, and a solution is three numbers instead of two, one for each letter.

An equation like these, written in the standard form

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

is a linear equation in three variables: aa, bb, cc, and dd are numbers, aa, bb, and cc are not all zero, and each variable appears only to the first power. Its solutions are ordered triples (x,y,z)(x, y, z). A system of three linear equations stacks three such equations and asks for the triple that satisfies all three at the same time. A single three-variable equation, like a single two-variable equation, has far too many solutions to pin the unknowns down. Fixing three unknowns takes three equations that each contribute a genuinely new condition, not one that just repeats another: three independent equations, one condition for each unknown.

The plan is to shrink the system one variable at a time. You already own the tool that removes a variable: elimination, from two lessons ago. Adding or subtracting two equations to cancel a variable worked no matter what the other letters were, so that same move works just as well when a third letter is riding along. The new idea in this lesson is purely organizational. You will run elimination twice, on two different pairs of the three equations, and both times you must cancel the same variable. Canceling the same variable is what leaves you two equations sharing the same two remaining unknowns.

Check your understanding

Which of these is written in the standard form ax+by+cz=dax + by + cz = d for a linear equation in three variables?

Answer choices

The reduction strategy step by step

Every three-variable system yields to the same routine.

  1. Choose a variable to eliminate. Pick whichever one has the friendliest coefficients, often a variable that already appears with matching or opposite coefficients somewhere.
  2. Eliminate it from one pair of equations. Combine two of the three equations, by adding or subtracting (scaling first if needed), so that variable cancels. You now have one equation in the other two unknowns.
  3. Eliminate the same variable from a second pair. Combine a different pair, being sure to use the equation you have not touched yet, and cancel the same variable again. This gives a second equation in the same two unknowns.
  4. Solve the two-variable system. Those two new equations form an ordinary system in two unknowns. Solve it by substitution or elimination.
  5. Back-substitute for the third variable. Put the two values you found into any one of the three original equations and solve for the variable you eliminated.
  6. Check the triple in all three original equations. A genuine solution satisfies every one of them, not just the two you happened to use.

The one step people get wrong is step 3. If you eliminate zz from the first pair but then eliminate yy from the second, your two leftover equations do not share the same unknowns. Without the same two unknowns, those two leftover equations cannot be solved together. Cancel the same variable both times.

The three-to-two-to-one reductionThree boxes left to right: three equations three unknowns, two equations two unknowns, one equation one unknown. Forward arrows are labeled eliminate a variable; a return arrow below is labeled back-substitute for each variable.3 equations3 unknowns2 equations2 unknowns1 equation1 unknowneliminate a variableeliminate a variableback-substitute for each variable
The reduction in one picture. Each elimination removes one variable, so three equations in three unknowns become two in two unknowns, then one in one unknown. Solving that and back-substituting walks the answer back up the chain.

Worked example 1 Solve x+y+z=6x + y + z = 6, 2x−y+z=32x - y + z = 3, and x+2y−z=2x + 2y - z = 2

Number the equations so the bookkeeping stays clear:

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

Choose to eliminate zz. Look at the zz terms: equations (1)(1) and (2)(2) both have +z+z, while equation (3)(3) has −z-z. That makes equation (3)(3) the convenient partner, because adding it to either of the others cancels zz on the spot.

Eliminate zz from the first pair, equations (1)(1) and (3)(3). Add them:

(x+y+z)+(x+2y−z)=6+2,2x+3y=8.(A)(x + y + z) + (x + 2y - z) = 6 + 2, \qquad 2x + 3y = 8. \quad (A)

Now eliminate the same variable zz from a second pair, equations (2)(2) and (3)(3), using the equation not yet touched. Add them:

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

Equations (A)(A) and (B)(B) form an ordinary two-variable system. Solve it by substitution: equation (B)(B) gives y=5−3xy = 5 - 3x, so replace yy in (A)(A):

2x+3(5−3x)=8,2x+15−9x=8,−7x=−7,x=1.2x + 3(5 - 3x) = 8, \qquad 2x + 15 - 9x = 8, \qquad -7x = -7, \qquad x = 1.

Then y=5−3(1)=2y = 5 - 3(1) = 2. Back-substitute x=1x = 1 and y=2y = 2 into equation (1)(1) to recover zz:

1+2+z=6,z=3.1 + 2 + z = 6, \qquad z = 3.

The candidate is (1,2,3)(1, 2, 3). Check it in all three originals, not just the two pairs you combined:

1+2+3=6 ✓,2(1)−2+3=3 ✓,1+2(2)−3=2 ✓.1 + 2 + 3 = 6 \ \checkmark, \qquad 2(1) - 2 + 3 = 3 \ \checkmark, \qquad 1 + 2(2) - 3 = 2 \ \checkmark.

All three hold, so the solution is (1,2,3)(1, 2, 3).

Check your understanding

You want to eliminate zz from the pair x+y+z=4x + y + z = 4 and x+y−z=2x + y - z = 2. What do you get by adding the two equations?

Answer choices

Check your understanding

Which ordered triple (x,y,z)(x, y, z) solves all three equations x+y+z=6x + y + z = 6, x−y+z=4x - y + z = 4, and 2x+y−z=52x + y - z = 5?

Answer choices

Why the reduction works and always finishes

The routine trades a big system for a smaller one and repeats, and that is trustworthy only if each step keeps exactly the same solutions and the shrinking actually stops. Both follow from what you already proved for two equations.

Why eliminating a variable preserves the solution set, and why two rounds finish it#

A solution of the system is a triple (x,y,z)(x, y, z) that satisfies all three equations at once, and the reduction must not lose or invent one. Recall the guarantee from the elimination lesson: keep one equation untouched, replace a second equation by that equation plus a multiple of the kept one, and the new pair has exactly the same solutions as the old pair, because you can undo the step by subtracting the same multiple back. Nothing in that argument counted the letters, so it holds just as well with three variables as with two.

Apply it twice, first reordering the equations if needed so the kept equation’s coefficient on the target variable is not zero. Keep the first equation. Replace the second equation with the second minus the right multiple of the first, chosen so the target variable cancels; the solution set is unchanged. Replace the third equation the same way, subtracting a multiple of the first so its copy of the target variable cancels too; the solution set is unchanged again. What is left is the untouched first equation, still carrying all three unknowns, plus two equations that hold only the other two unknowns. Those two form an ordinary two-variable system, which you already know how to solve; back-substituting into the untouched first equation then finds the last unknown. Two rounds of elimination take three unknowns down to two, then to one, and solving that last equation directly finishes the job: the process cannot run forever.

Check your understanding

Why does the reduction always come to an end, instead of running forever, no matter which three-variable system you start with?

Answer choices

Because every step preserves the solution set, the strange endings carry a clear meaning. If a stage ever collapses to a false statement such as 0=40 = 4, then the original system had no triple satisfying it, so the system has no solution. Suppose instead a stage collapses to an always-true statement such as 0=00 = 0. That step added no new condition, so it did nothing to narrow the triples down. Whatever equations survive still have to be checked: infinitely many triples solve the system, or none do. In the two-variable case, with only two equations to begin with, hitting 0=00 = 0 leaves nothing standing in the way, so the answer there is always infinitely many. A third equation changes that: it can still contradict the others. Consider x+y+z=1x + y + z = 1 paired with 2x+2y+2z=22x + 2y + 2z = 2, which collapses to 0=00 = 0. Now add x+y+z=5x + y + z = 5 to that pair: eliminating against the first equation leaves 0=40 = 4 as well, so the enlarged system has no solution at all.

Check your understanding

After eliminating zz and solving the resulting two-variable system, you find x=1x = 1 and y=2y = 2. How do you find zz?

Answer choices

A three-variable word problem

Three-variable systems earn their keep on problems with three unknowns and three facts. A clean example is recovering unknown prices from several receipts, where each receipt is one equation.

Worked example 2 Unknown prices from three receipts

At a snack stand the popcorn, pretzels, and drinks each have a fixed price. Three customers pay:

  • one popcorn, one pretzel, and one drink cost 77 dollars,
  • two popcorns, one pretzel, and three drinks cost 1111 dollars,
  • one popcorn, two pretzels, and four drinks cost 1414 dollars.

Find the price of each item.

Name the unknowns. Let pp, tt, and dd be the price in dollars of a popcorn, a pretzel, and a drink. Each receipt becomes one equation:

(1) p+t+d=7,(2) 2p+t+3d=11,(3) p+2t+4d=14.(1)\ p + t + d = 7, \qquad (2)\ 2p + t + 3d = 11, \qquad (3)\ p + 2t + 4d = 14.

Eliminate pp, whose coefficient is 11 in the first equation. Subtract twice equation (1)(1) from equation (2)(2):

(2p+t+3d)−2(p+t+d)=11−14,−t+d=−3.(A)(2p + t + 3d) - 2(p + t + d) = 11 - 14, \qquad -t + d = -3. \quad (A)

Eliminate the same variable pp from the untouched equation (3)(3) by subtracting equation (1)(1):

(p+2t+4d)−(p+t+d)=14−7,t+3d=7.(B)(p + 2t + 4d) - (p + t + d) = 14 - 7, \qquad t + 3d = 7. \quad (B)

Add (A)(A) and (B)(B) to cancel tt:

(−t+d)+(t+3d)=−3+7,4d=4,d=1.(-t + d) + (t + 3d) = -3 + 7, \qquad 4d = 4, \qquad d = 1.

From (A)(A), −t+1=−3-t + 1 = -3, so t=4t = 4. Back-substitute into equation (1)(1): p+4+1=7p + 4 + 1 = 7, so p=2p = 2.

The prices are 22 dollars for popcorn, 44 dollars for a pretzel, and 11 dollar for a drink. Check the third receipt, the one held back the longest: 2+2(4)+4(1)=2+8+4=142 + 2(4) + 4(1) = 2 + 8 + 4 = 14, correct. The other two receipts check the same way.

The geometry: three planes in space

Two variables live on a flat page, and a linear equation there draws a line. Three variables live in space, and a linear equation ax+by+cz=dax + by + cz = d draws a flat sheet stretching out forever, a plane. A system of three equations is then three planes, and a solution triple is a point lying on all three at once.

In the ordinary case the three planes tilt in different directions and meet at exactly one point, the single triple that solves the system. This is the picture behind almost every example in this lesson.

Three planes meeting at one pointThree parallelogram-shaped planes sharing a single common corner point, which is highlighted and labeled as the triple x, y, z that solves the system.(x, y, z)
Each equation of a three-variable system is a plane in space. When the three planes tilt in general directions they cross at a single shared point, and that point is the one triple (x, y, z) solving all three equations.

Check your understanding

In the ordinary case, three planes in space, one for each equation of a three-variable system, cross at exactly one shared point. What does that point represent?

Answer choices

Special arrangements break that single crossing, and they match the same two exceptions you met with lines. If the planes never share a common point, the system is inconsistent and has no solution. That happens when two of them are parallel, or when all three cross each other in pairs without ever sharing one point in common. If the three planes instead share a whole common line, or even coincide as one plane, then endlessly many points lie on all three. In that case the system has infinitely many solutions. The algebra flags each case for you: eliminating variables leaves a false statement in the first situation and an always-true statement in the second.

When the reduction hits no solution or infinitely many

Worked example 3 A system with no solution

Solve

(1) x+y+z=6,(2) x+2y+3z=14,(3) 2x+3y+4z=25.(1)\ x + y + z = 6, \qquad (2)\ x + 2y + 3z = 14, \qquad (3)\ 2x + 3y + 4z = 25.

Eliminate xx using the first equation. Subtract equation (1)(1) from equation (2)(2):

(x+2y+3z)−(x+y+z)=14−6,y+2z=8.(A)(x + 2y + 3z) - (x + y + z) = 14 - 6, \qquad y + 2z = 8. \quad (A)

Now clear the same variable from equation (3)(3) by subtracting 22 times equation (1)(1):

(2x+3y+4z)−2(x+y+z)=25−12,y+2z=13.(B)(2x + 3y + 4z) - 2(x + y + z) = 25 - 12, \qquad y + 2z = 13. \quad (B)

Equations (A)(A) and (B)(B) read y+2z=8y + 2z = 8 and y+2z=13y + 2z = 13. The same expression y+2zy + 2z cannot equal both 88 and 1313. Subtract (A)(A) from (B)(B) to see it plainly:

0=5.0 = 5.

This is false, so no triple satisfies all three equations, and the system has no solution. Geometrically the three planes fail to share any common point.

Worked example 4 A system with infinitely many solutions

Solve

(1) x+y+z=6,(2) x+2y+3z=14,(3) x+3y+5z=22.(1)\ x + y + z = 6, \qquad (2)\ x + 2y + 3z = 14, \qquad (3)\ x + 3y + 5z = 22.

Eliminate xx again with the first equation. Subtract equation (1)(1) from equation (2)(2):

(x+2y+3z)−(x+y+z)=14−6,y+2z=8.(A)(x + 2y + 3z) - (x + y + z) = 14 - 6, \qquad y + 2z = 8. \quad (A)

Subtract equation (1)(1) from equation (3)(3):

(x+3y+5z)−(x+y+z)=22−6,2y+4z=16.(B)(x + 3y + 5z) - (x + y + z) = 22 - 6, \qquad 2y + 4z = 16. \quad (B)

Equation (B)(B) is exactly twice equation (A)(A), so it says nothing new. Subtract 22 times (A)(A) from (B)(B):

0=0.0 = 0.

The statement is always true, so the third equation added no new condition beyond the first two, and the system has infinitely many solutions: pick any value for zz, and (A)(A) gives yy, then equation (1)(1) gives xx. Try a few values and see the pattern:

zzy=8−2zy = 8 - 2zx=6−y−zx = 6 - y - zTriple
0088−2-2(−2,8,0)(-2, 8, 0)
1166−1-1(−1,6,1)(-1, 6, 1)
224400(0,4,2)(0, 4, 2)

Every row solves all three original equations; check the first one: −2+8+0=6-2 + 8 + 0 = 6, −2+2(8)+3(0)=14-2 + 2(8) + 3(0) = 14, and −2+3(8)+5(0)=22-2 + 3(8) + 5(0) = 22, all true. A different choice of zz gives a different triple on the same line, and there is no limit to how many you could list.

The three planes meet along this whole line rather than at a single point.

Check your understanding

Reducing a system of three equations in three unknowns, you eliminate a variable from two pairs and arrive at y+z=5y + z = 5 and 2y+2z=102y + 2z = 10. What does this tell you?

Answer choices

Check your understanding

Reducing a system of three equations in three unknowns, you eliminate a variable from two pairs and arrive at 0=40 = 4. What does this tell you?

Answer choices

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)
Go deeper (optional)

You can skip this and keep going. Read it if you want to know more.

Why elimination works and finishes for any number of equations, not just three

The lesson proved it for three equations in three unknowns. Nothing in that argument depended on the number three, so the same reasoning runs on any system of nn equations in nn unknowns.

Why elimination preserves solutions and terminates for a system of any size#

Keep the first equation, reordering the equations first if needed so its coefficient on the target variable is not zero, and eliminate that variable from every other equation using the same move: replace an equation with that equation minus the right multiple of the kept one. Each replacement preserves the solution set for the same reason it did with two or three equations, because the step can always be undone. After one round, the untouched first equation still carries every variable, and the other n−1n - 1 equations carry only the remaining n−1n - 1 variables. Those n−1n - 1 equations form a smaller system of exactly the same kind, one equation and one unknown lighter. Run the same round on it, and the next, and the next: each round strips away one equation and one unknown together, so after n−1n - 1 rounds a single equation in a single unknown remains, or a round collapses to a false or always-true statement first. Those endings mean exactly what they meant for three equations: a false statement rules out a solution, and an always-true one means that equation was redundant, leaving the surviving equations to decide the outcome. When a single equation does remain, solve it, then climb back up the chain, substituting each newly known value into the equation from the round before, until every unknown is found. The chain has only n−1n - 1 rounds to climb, so it always finishes, one way or the other.

Writing every solution of an infinite family with one parameter

The lesson showed a few triples on the line of solutions for x+y+z=6x + y + z = 6, x+2y+3z=14x + 2y + 3z = 14, and x+3y+5z=22x + 3y + 5z = 22: pick a value for zz, and xx and yy follow. Writing that pattern once, for every value at once, uses a parameter, a letter standing for “whichever number you pick.”

Let z=tz = t, where tt can be any number. From (A)(A), y+2t=8y + 2t = 8, so y=8−2ty = 8 - 2t. From equation (1)(1), x=6−y−z=6−(8−2t)−t=t−2x = 6 - y - z = 6 - (8 - 2t) - t = t - 2. So every triple

(x,y,z)=(t−2, 8−2t, t)(x, y, z) = (t - 2,\ 8 - 2t,\ t)

solves the system, one triple for each value of tt. Setting t=0,1,2t = 0, 1, 2 reproduces the same three triples found by hand above, and every other value of tt gives another point on the same line.

A bit of history (optional)

Why would anyone want a system with eight unknowns? Here is one answer, from 18451845.

Electricity was new, and the current inside a wire could not be measured directly. A circuit with several branches was a real puzzle. The current splits at every junction, and how it splits depends on the whole network, not on any single piece.

Gustav Kirchhoff was a student of twenty-one in Prussia, a kingdom in what is now Germany. He wrote down two rules that settled the matter. At any junction, the current arriving equals the current leaving. Around any closed loop, the voltage gained and the voltage lost cancel out. Each junction and each loop gives one equation, and each branch of the circuit is one unknown.

That is a system, and it is exactly the kind you have been reducing. A circuit with eight branches yields eight unknowns and eight equations. Nobody solves such a thing by eye. You knock out one unknown, then another, until a single one is left. Then you climb back up and pick up the rest. That is this lesson’s method, run a few more rounds.

Kirchhoff’s rules are still how engineers describe a circuit, and the tools that solve those systems still run elimination underneath. Three unknowns give you three planes meeting at a point, and that is the last picture you can draw. Past three, the geometry runs out of room and the algebra carries on without it.