Solving Systems by Elimination

Learning goals

  • Add or subtract equations so one variable cancels
  • Scale one or both equations to match the coefficients
  • Justify the method from the properties of equality
  • Back-substitute for the second variable, then check both
  • Distinguish no solution from infinitely many by reading a false or always-true leftover
  • Prefer elimination in standard form, substitution when one is isolated

Adding equations to cancel a variable

A system of two linear equations asks for the pair (x,y)(x, y) that satisfies both equations at the same time. Elimination finds it by combining the two equations so that one variable cancels. Start with a system whose coefficients are already arranged for it:

x+y=5,x−y=1.\begin{gathered} x + y = 5, \\ x - y = 1. \end{gathered}

The yy terms, +y+y and −y-y, are opposites. Add the left sides and add the right sides:

(x+y)+(x−y)=5+1.(x + y) + (x - y) = 5 + 1.

The yy terms sum to zero, leaving only xx:

2x=6,x=3.\begin{gathered} 2x = 6, \\ x = 3. \end{gathered}

Recover the other variable by putting x=3x = 3 back into either original equation, say x+y=5x + y = 5:

3+y=5,y=2.\begin{gathered} 3 + y = 5, \\ y = 2. \end{gathered}

Check (3,2)(3, 2) in both equations, as with substitution: 3+2=53 + 2 = 5 and 3−2=13 - 2 = 1. Both are true, so (3,2)(3, 2) solves the system.

Adding cancels a variable whenever its coefficients are opposites, because opposite numbers sum to zero. If the coefficients are equal, subtracting one equation from the other cancels it instead. The remaining question is what to do when the coefficients are neither opposite nor equal.

The elimination method step by step

  1. Line up the equations in standard form ax+by=cax + by = c, so like terms sit in columns.
  2. Match a variable’s coefficients. Pick the variable to eliminate, then multiply one or both equations by nonzero constants so its coefficients become opposites (to add) or equal (to subtract).
  3. Add or subtract the equations to remove that variable, leaving one equation in one unknown.
  4. Solve the one-variable equation.
  5. Back-substitute the value into an original equation to find the other variable.
  6. Check the pair in both original equations.

If both variables cancel in step 3, read the leftover statement as described later in the lesson. If a variable is already absent from one equation, solve that one-variable equation directly.

Worked example 1 Solve 2x+y=72x + y = 7 and 3x−y=83x - y = 8

The first equation has +y+y and the second has −y-y, so step 2 needs no multiplying. Adding the equations eliminates yy:

(2x+y)+(3x−y)=7+8.(2x + y) + (3x - y) = 7 + 8.

The yy terms cancel and the xx terms combine:

5x=15,x=3.\begin{gathered} 5x = 15, \\ x = 3. \end{gathered}

Back-substitute x=3x = 3 into an original equation. Using 2x+y=72x + y = 7:

2(3)+y=7,6+y=7,y=1.\begin{gathered} 2(3) + y = 7, \\ 6 + y = 7, \\ y = 1. \end{gathered}

So the candidate is (3,1)(3, 1). Check it in both equations, not just the one you used:

2(3)+1=7 ✓,3(3)−1=8 ✓.\begin{gathered} 2(3) + 1 = 7 \ \checkmark, \\ 3(3) - 1 = 8 \ \checkmark. \end{gathered}

Both hold, so the solution is (3,1)(3, 1).

Stacking the equations shows the whole method: like terms sit in columns, and a column of opposite terms adds to zero (a column of equal terms cancels on subtracting). When that column is not already in place, multiply one or both equations first to create it.

Elimination shown as aligned column additionThe equations 2x + y = 7 and 3x - y = 8 stacked so like terms line up. The y-terms +y and -y are opposites in a highlighted column; adding the equations cancels y and gives 5x = 15.2x+y=73x-y=85x=15opposite terms cancel
Elimination as column addition. The first worked example, 2x + y = 7 and 3x - y = 8, is stacked so like terms align. The y column holds +y above -y, opposites that sum to zero, so adding the equations cancels y and leaves 5x = 15.

Why adding equations keeps every solution

The combined equation alone is usually not enough: it gives one coordinate, and a kept original equation recovers the other. Together, the kept equation and the combined equation have exactly the same solutions as the original pair.

Why combining the equations preserves the solution set#

Take x+2y=10x+2y=10 and 2x−y=52x-y=5. The pair (4,3)(4,3) satisfies both: 4+2(3)=104+2(3)=10 and 2(4)−3=52(4)-3=5. Keep the first equation and replace the second by the first plus twice the second:

(x+2y)+2(2x−y)=10+2(5),5x=20.\begin{gathered} (x+2y)+2(2x-y)=10+2(5),\\ 5x=20. \end{gathered}

The original solution (4,3)(4,3) satisfies the combination too: 5(4)=205(4)=20. To reverse the move, subtract the kept equation, then divide by 22:

5x−(x+2y)=20−10,4x−2y=10,2x−y=5.\begin{gathered} 5x-(x+2y)=20-10,\\ 4x-2y=10,\\ 2x-y=5. \end{gathered}

That recovers the second original. The new system gives x=4x=4, then y=3y=3, the same pair.

For the general move, keep the first equation and replace the second by mm times the first plus nn times the second, with n≠0n\neq0. A pair satisfying the originals satisfies the combination, by the multiplication property of equality and the addition property of equality: adding equal quantities to equal quantities gives equal totals. If L1=R1L_1=R_1 and L2=R2L_2=R_2, then

L1+L2=R1+R2.L_1+L_2=R_1+R_2.

To reverse the move, subtract mm times the kept equation from the combination, then divide by nn. That recovers the second equation, so every pair satisfying the new system also satisfies both originals. This needs n≠0n \neq 0, because the reverse step divides by nn. With n=0n = 0, the combination would be just mm times the first equation, and the second equation would be lost.

So the new system has lost no solutions and gained none. The same check works for any replacement: if each new equation is a combination of the originals and each original can be rebuilt from the new ones, the two systems have the same solutions. Systems with exactly the same solutions are called equivalent systems.

Check your understanding

Keep x+y=7x+y=7 and replace x−y=1x-y=1 by the sum 2x=82x=8. Why does the new system have exactly the same solutions?

Answer choices

Matching the coefficients: multiply, then eliminate

In most systems no variable already has opposite or equal coefficients, so you make them match. Multiplying an entire equation by a nonzero constant gives an equation with the same solutions, by the multiplication property of equality, but with new coefficients that you can choose to match.

If one coefficient of a variable is a multiple of the other, multiplying just one equation lines them up. When neither nonzero integer coefficient divides the other, multiply both equations to reach a common multiple of their absolute values; the least common multiple keeps the numbers small. Give the matched coefficients opposite signs and add, or equal signs and subtract.

Worked example 2 Multiply one equation: solve x+2y=11x + 2y = 11 and 3x−y=53x - y = 5

Eliminate yy. Doubling the second equation turns its −y-y into −2y-2y, the opposite of the +2y+2y in the first. Multiply every term of 3x−y=53x - y = 5 by 22:

6x−2y=10.6x - 2y = 10.

Now add this to the first equation, x+2y=11x + 2y = 11:

(x+2y)+(6x−2y)=11+10.(x + 2y) + (6x - 2y) = 11 + 10.

The yy terms cancel:

7x=21,x=3.\begin{gathered} 7x = 21, \\ x = 3. \end{gathered}

Back-substitute x=3x = 3 into x+2y=11x + 2y = 11:

3+2y=11,2y=8,y=4.\begin{gathered} 3 + 2y = 11, \\ 2y = 8, \\ y = 4. \end{gathered}

The solution is (3,4)(3, 4). Check the second equation too: 3(3)−4=53(3) - 4 = 5. Only one equation needed multiplying, because doubling the yy coefficient −1-1 gives −2-2, the opposite of the first equation’s 22.

Worked example 3 Multiply both equations: solve 2x+3y=72x + 3y = 7 and 3x+2y=83x + 2y = 8

Eliminate xx. Its coefficients are 22 and 33, and neither divides the other, so scale both to their least common multiple, 66. Multiply the first equation by 33 and the second by 22:

6x+9y=21,6x+4y=16.\begin{gathered} 6x + 9y = 21, \\ 6x + 4y = 16. \end{gathered}

Both now carry 6x6x. The coefficients are equal, so subtract the second equation from the first, flipping every sign in the second:

(6x+9y)−(6x+4y)=21−16,5y=5,y=1.\begin{gathered} (6x + 9y) - (6x + 4y) = 21 - 16, \\ 5y = 5, \\ y = 1. \end{gathered}

Back-substitute y=1y = 1 into 2x+3y=72x + 3y = 7:

2x+3(1)=7,2x=4,x=2.\begin{gathered} 2x + 3(1) = 7, \\ 2x = 4, \\ x = 2. \end{gathered}

The solution is (2,1)(2, 1), and 3(2)+2(1)=83(2) + 2(1) = 8 confirms the second equation. Multiplying the second equation by −2-2 instead, to get −6x−4y=−16-6x - 4y = -16, and adding gives the same result.

Check your understanding

Solve 2x+5y=192x + 5y = 19 and 3x−2y=03x - 2y = 0 by elimination: scale both equations to match coefficients, combine them, back-substitute, and check both originals. What is the solution pair (x,y)(x, y)?

Answer choices

When a variable cancels to a number: no solution and infinitely many

Sometimes both variables cancel together and leave a bare numerical statement. As with substitution, check whether that statement is true or false.

Worked example 4 A system with no solution

Solve

2x+y=5,4x+2y=3.\begin{gathered} 2x + y = 5, \\ 4x + 2y = 3. \end{gathered}

Eliminate xx. Multiply the first equation by −2-2 so its 2x2x becomes −4x-4x, opposite the 4x4x below:

−4x−2y=−10.-4x - 2y = -10.

Add this to 4x+2y=34x + 2y = 3:

(−4x−2y)+(4x+2y)=−10+3.(-4x - 2y) + (4x + 2y) = -10 + 3.

Both variables cancel at once, leaving

0=−7.0 = -7.

This is false for every xx and yy, so the system has no solution. The two lines have the same steepness but different heights, so they are parallel and never meet.

Worked example 5 A system with infinitely many solutions

Solve

x−3y=2,2x−6y=4.\begin{gathered} x - 3y = 2, \\ 2x - 6y = 4. \end{gathered}

Eliminate xx by doubling the first equation so its xx becomes 2x2x:

2x−6y=4.2x - 6y = 4.

This is now identical to the second equation, so subtracting them gives

0=0.0 = 0.

The leftover statement is always true. The second equation is just the first multiplied by 22, so every pair solving the first already solves the second: the two describe the same line, and the system has infinitely many solutions. Each point (x,y)(x, y) with x−3y=2x - 3y = 2 is a solution.

These examples give a quick coefficient test in standard form. If the second left side is a nonzero multiple of the first, elimination cancels both variables. The same multiple on the right side leaves 0=00=0 (one line); a different right side leaves a false statement (parallel lines). If the left sides are not multiples, elimination leaves a nonzero coefficient and exactly one solution pair (lines crossing once).

For example, take x+2y=5x+2y=5 and 3x+4y=113x+4y=11. Multiply the first equation by 33 to match the xx coefficients, then subtract the second:

(3x+6y)−(3x+4y)=15−11,2y=4,y=2.\begin{gathered} (3x+6y)-(3x+4y)=15-11,\\ 2y=4,\qquad y=2. \end{gathered}

The kept first equation gives x+4=5x+4=5, so x=1x=1, and the pair checks: 1+2(2)=51+2(2)=5 and 3(1)+4(2)=113(1)+4(2)=11. Matching the xx coefficients did not also match the yy coefficients: they became 66 and 44, which differ, so yy was left after subtracting.

The same reasoning works for any two linear equations whose left sides are not multiples, each with at least one nonzero variable coefficient. When both xx coefficients are nonzero, scale to match them; the yy coefficients then differ, so subtraction leaves a nonzero coefficient of yy, which fixes yy, and the kept equation fixes xx. If only one equation contains xx, the other fixes yy directly, then the first fixes xx. If neither contains xx, both left sides are multiples of yy, the case already covered. In the nonmultiple case, these reversible steps give exactly one solution pair.

Check your understanding

Eliminating a variable from a system, you reach 0=60 = 6. What does this tell you?

Answer choices

Check your understanding

Eliminating a variable from a different system, you reach 0=00 = 0 instead of a false statement. What does this tell you?

Answer choices

Substitution or elimination?

Both methods agree on the solutions. Choose the one that needs less rearranging.

Check your understanding

For y=2x−1y=2x-1 and 3x+4y=183x+4y=18, which first step needs the least rearranging?

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)
A bit of history (optional)

A farmer has three grades of grain. Three bundles of the best grade, two of the middle, and one of the poorest yield a known amount. Two other mixtures yield two other amounts. How much grain does one bundle of each grade contain?

This problem appears in The Nine Chapters on the Mathematical Art, a Chinese handbook from roughly two thousand years ago. Its eighth chapter, Fangcheng, treats systems of equations. The numbers for each equation are arranged in a column. Scaling and subtracting columns removes unknowns one at a time, then working backward recovers their values. The layout differs from ours, but the steps are the same scaling and subtracting you used in this lesson.

The modern name, Gaussian elimination, honors Carl Friedrich Gauss, who in the early 1800s used related calculations in astronomy, including work on the minor planet Pallas. He called it common elimination. His special notation for the repeated calculations is one reason his name became attached to a much older technique.

MacTutor describes the Chinese handbook. Joseph Grcar’s history of elimination traces how Gauss’s name became attached to the method.

Your progress

See all your progress →