Solving systems by elimination
Two equations, two unknowns, and neither letter stands alone. How can you make one of the letters disappear?
Where you are 7 in Systems of equations
When you reach for it
Substitution is the natural move when one equation already gives a letter on its own, such as y = 2x - 3. Many systems do not arrive like that. Look at
No letter is alone, and freeing one brings fractions: the first equation gives \displaystyle y = \frac{31 - 5x}{2}. But read the system in columns instead of rows. The y column holds +2y and -2y, which cancel. If the two equations are added, side to side, the y terms vanish and what is left, 8x = 40, has only one letter in it.
That is elimination: combine the two equations so that one letter drops out, solve the one-letter equation that remains, then go back for the other letter. It suits systems written in standard form, Ax + By = C, where the x terms, the y terms and the numbers already sit in columns. Whatever method is used, the answer is the same pair of numbers: the point where the two lines cross, as in solving by graphing.
The lesson runs over three days: Day 1 adds or subtracts the equations, Day 2 multiplies an equation first, and Day 3 chooses between methods and deals with systems in which both letters vanish.
The procedure
Day 1: adding or subtracting the equations
Why adding two equations is allowed. Suppose a pair (x, y) makes both equations true. For that pair, 5x + 2y is not just an expression: it is the number 31. In the same way 3x - 2y is the number 9. Adding equal amounts to equal amounts gives equal results, so for that pair
In general, if a = b and c = d, then a + c = b + d. This is the familiar rule that adding the same number to both sides keeps an equation true, used twice: c and d are the same number, written two ways.
Written in columns, the addition is
The y terms cancel because their coefficients, 2 and -2, are opposites. Dividing both sides by 8 gives x = 5.
Going back for the other letter. Put x = 5 into either original equation. The first gives 25 + 2y = 31, so 2y = 6 and y = 3. Check in the other one: 3(5) - 2(3) = 15 - 6 = 9. The solution is (5, 3).
Nothing is lost and nothing is gained. The sum, 8x = 40, is true for every solution of the system, so no solution is lost. The reverse also holds: the pair “8x = 40 and 5x + 2y = 31” has exactly the same solutions as the original pair, because subtracting 5x + 2y = 31 from 8x = 40 gives back 3x - 2y = 9. So replacing one equation by the sum produces an equivalent system, one with the same solutions. Notice that the sum is kept alongside one of the originals. On its own, 8x = 40 says nothing about y: it is true for (5, 3), but also for (5, 100).
The picture. Every solution of both equations is a point on both lines. The sum is true at that point too, so its line passes through the crossing point. Elimination chooses the combination whose line is vertical, x = 5, so the crossing point’s x can be read straight off it.
Equal coefficients: subtract. If a letter has the same coefficient in both equations, such as 4x and 4x, adding doubles it instead of canceling it. Subtract one equation from the other instead. The same reasoning applies: if a = b and c = d, then a - c = b - d. The minus sign applies to every term of the equation being subtracted, on both sides (Example 2).
Line the columns up first. Both equations should be in the order x term, y term, equals, number. An equation such as 2x = 3y + 4 is moved into that shape by subtracting 3y from both sides, giving 2x - 3y = 4. Reordering the terms on one side, so that 5y - 2x becomes -2x + 5y, uses the commutative property of addition and changes nothing.
Day 2: multiplying an equation first
Most systems have no ready-made opposites. In
the x coefficients are 4 and 1, and the y coefficients are 5 and 3. Adding or subtracting removes neither letter. But multiply both sides of the second equation by -4 and its x term becomes -4x, the opposite of the 4x above:
So y = 2. Back in x + 3y = 4: x + 6 = 4, so x = -2. Check in the first equation: 4(-2) + 5(2) = -8 + 10 = 2. The solution is (-2, 2).
Why multiplying keeps the same solutions. If x + 3y equals 4 for some pair, then -4 times it equals -4 times 4: multiplying equal numbers by the same number gives equal results. And the step can be undone, by dividing both sides by -4, so any pair that makes -4x - 12y = -16 true also makes x + 3y = 4 true. The two equations have exactly the same solutions; on a graph they are the same line. The multiplier can be any number except 0. Multiplying by 0 turns every equation into 0 = 0, which is true for every pair, and it cannot be undone: the equation’s information is thrown away.
Choosing the multiplier. Pick a letter and aim for a number both of its coefficients divide into, the smallest being their least common multiple. When one coefficient already divides the other, as 1 divides 4, only one equation needs multiplying. When neither divides the other, as with 3 and 4, multiply both: one by 4 and the other by 3 makes 12 and 12, and a minus sign on one multiplier makes them opposites. If a letter’s coefficients already have opposite signs, choose that letter: positive multipliers will do, and the equations are then added.
Fractions and decimals first. An equation such as \displaystyle \frac{1}{2}x + \frac{1}{3}y = 1 is easier with whole numbers. Multiply both sides by the least common denominator, here 6, to get 3x + 2y = 6. For decimals, multiply by 10 or 100. This is the same move, multiplying an equation by a non-zero number, so the solutions do not change. Dividing is allowed for the same reason: dividing by 6 is multiplying by \displaystyle \frac{1}{6}, and it keeps the numbers small when every number in an equation shares a factor (Example 9).
Day 3: choosing a method, and when both letters vanish
Three methods, one answer. Graphing, substitution and elimination find the same pairs, because a system’s solutions belong to the system, not to the method. Substitution suits a system in which a letter already stands alone or has coefficient 1 or -1; elimination suits two equations in standard form; graphing gives a picture, but a crossing at \displaystyle x = \frac{7}{6} cannot be read exactly off a grid, so a point read from a graph must still be checked in both equations.
When both letters vanish. Try elimination on
Multiply the second equation by 2 to get -6x + 4y = 14, and add:
Both letters vanished at once, and what is left is false. Every solution of the system would have to make the sum true, and no pair makes 0 = 24 true, so the system has no solution. The graph agrees. Solving each equation for y gives \displaystyle y = \frac{3}{2}x - \frac{5}{2} and \displaystyle y = \frac{3}{2}x + \frac{7}{2}: the same slope and different intercepts, so the lines are parallel and never meet.
Now change the numbers:
Multiply the first by 2 to get 4x - 10y = 6, and add. Both letters vanish again, but this time the result is 0 = 0, true for every pair, so it rules nothing out. The second equation is the first multiplied by -2, so the two equations are the same line, and there are infinitely many solutions: all the pairs with 2x - 5y = 3, such as (4, 1) and (-1, -1).
The same two endings, a false statement and a statement true for everything, appear in a single equation whose unknown cancels; see No solution, one solution, or every number. Notice that 0 = 0 does not mean x = 0: both letters have gone, and the equation says nothing about either. Both letters vanish together exactly when one equation’s coefficients are a multiple of the other’s, which makes the slopes equal (Exercise 23): parallel lines, or one line counted twice.
Worked examples
Day 1: opposite coefficients
Solve
The x coefficients are 7 and -7, opposites, so adding the equations removes x:
Dividing by 7 gives y = 3. Put it into the first equation: 7x + 6 = -1, so 7x = -7 and x = -1.
Check in the second equation, the one not used to find x: -7(-1) + 5(3) = 7 + 15 = 22. The solution is (-1, 3).
Day 1: equal coefficients, so subtract
Solve
Both equations have 4x. Adding would give 8x, so subtract the second equation from the first instead, the whole of each side:
The minus sign in front of the bracket reaches the -5y too, and 3y - (-5y) = 8y. So y = 2. In the first equation, 4x + 6 = 26, so 4x = 20 and x = 5.
Check in the second: 4(5) - 5(2) = 20 - 10 = 10. The solution is (5, 2). Subtracting the other way round gives -8y = -16 and the same y = 2.
Day 1: lining the columns up first
Solve the system 2x = 3y + 4 and 5y - 2x = 2.
SolutionNeither equation is in standard form. Subtract 3y from both sides of the first, and reorder the terms on the left of the second:
Now the x column holds 2x and -2x. Add:
So y = 3. Then 2x - 9 = 4, so 2x = 13 and \displaystyle x = \frac{13}{2}.
Check in the original equations. First: \displaystyle 2 \cdot \frac{13}{2} = 13 and 3(3) + 4 = 13. Second: \displaystyle 5(3) - 2 \cdot \frac{13}{2} = 15 - 13 = 2. The solution is \displaystyle \left(\frac{13}{2}, 3\right). Elimination finds the fraction exactly, where a graph would only suggest “between 6 and 7”.
Day 2: multiplying one equation
Solve
The y coefficients are 3 and -1, already of opposite sign, and 1 divides 3. Multiply both sides of the second equation by 3, which keeps its solutions, and add:
So x = 2. In the second equation, 2(2) - y = 7, so -y = 3 and y = -3.
Check in the first: 5(2) + 3(-3) = 10 - 9 = 1. The solution is (2, -3). Because y has coefficient -1 in the second equation, substitution (y = 2x - 7) would also have been easy, and gives the same pair.
Day 2: multiplying both equations
Solve
No coefficient divides its partner: 4 and 5 in the x column, 3 and -2 in the y column. The y column already has opposite signs, so aim for 6y and -6y. Multiply the first equation by 2 and the second by 3:
So x = -3. In the first equation, 4(-3) + 3y = 3, so 3y = 15 and y = 5.
Check in the second: 5(-3) - 2(5) = -15 - 10 = -25. The solution is (-3, 5). The 23 built from the four coefficients turns up again later, as the size of the determinant of the system.
Day 2: clearing fractions and decimals
Solve
Make every coefficient a whole number first. The denominators in the first equation are 2 and 3, so multiply both sides by 6: 3x + 2y = 6. The second has one decimal place, so multiply both sides by 10: 5x - 2y = 26. Neither step changes the solutions. Now the y terms are opposites:
So x = 4. Then 3(4) + 2y = 6, so 2y = -6 and y = -3.
Check in the original equations, since an error in clearing would survive a check in the cleared ones: \displaystyle \frac{1}{2}(4) + \frac{1}{3}(-3) = 2 - 1 = 1, and 0.5(4) - 0.2(-3) = 2 + 0.6 = 2.6. The solution is (4, -3).
Day 3: choosing a method
Choose a method for each system, say why, and solve.
(a) x = 4y + 1 and 3x - 5y = 17 \qquad (b) 6x + 5y = 17 and 6x - y = 5 \qquad (c) y = 4x - 5 and y = -x + 10
Solution(a) The first equation already gives x alone, so substitute 4y + 1 for x in the second:
So y = 2 and x = 4(2) + 1 = 9. Check: 3(9) - 5(2) = 27 - 10 = 17. The solution is (9, 2).
(b) Both equations are in standard form and both have 6x, so subtract the second from the first: 5y - (-y) = 6y and 17 - 5 = 12, so 6y = 12 and y = 2. Then 6x - 2 = 5, so \displaystyle x = \frac{7}{6}. Check in the first: \displaystyle 6 \cdot \frac{7}{6} + 5(2) = 7 + 10 = 17. The solution is \displaystyle \left(\frac{7}{6}, 2\right), which no graph could have given exactly.
(c) Both equations are in slope and intercept form, so the lines are quick to draw: one starts at -5 on the y-axis and rises 4 for each step right, the other starts at 10 and falls 1. They cross at (3, 7). Check: 4(3) - 5 = 7 and -3 + 10 = 7.
Day 3: when both letters vanish
(a) Solve 1.5x + 0.5y = 2 and 6x + 2y = 8.
(b) For which values of k does the system 2x + 3y = 5 and 4x + ky = 1 have no solution?
Solution(a) Multiply the first equation by 4 to clear the decimals: 6x + 2y = 8. That is the second equation exactly. Subtracting one from the other gives 0 = 0: both letters vanish and the result is always true. The two equations are the same line, y = 4 - 3x, so the system has infinitely many solutions: every pair (x, 4 - 3x), such as (0, 4), (1, 1) and (2, -2).
(b) Eliminate x. Multiply the first equation by -2 and add:
If k = 6, this reads 0 = -9, which is false, so the system has no solution: the lines are parallel. If k is any other number, k - 6 is not 0, so \displaystyle y = \frac{-9}{k - 6}, and then x follows from the first equation: exactly one solution. So k = 6 is the only such value. Infinitely many solutions never happen: that would need the second equation to be twice the first, and twice 5 is 10, not 1.
Day 3: plants at a garden center
A garden center sells shrubs at 18 dollars each and young trees at 30 dollars each. One weekend it sold 420 plants and took 9960 dollars. How many of each did it sell?
SolutionLet s be the number of shrubs sold and t the number of trees. Counting plants, and counting dollars, gives two equations:
Every number in the second equation is a multiple of 6, so divide both sides by 6 to keep the numbers small: 3s + 5t = 1660. Now multiply the first equation by -3 and add:
So t = 200, and s = 420 - 200 = 220.
Check against the story, not just the equations: 220 + 200 = 420 plants, and 18(220) + 30(200) = 3960 + 6000 = 9960 dollars. The center sold 220 shrubs and 200 trees, both whole numbers, as counts must be.
Boundaries
Linear equations only. Every move here relies on each letter appearing to the first power, so that its terms in the two equations can cancel. A system with x^2 or xy in it is a different problem; see Systems with a curve.
The multiplier must not be 0. Multiplying or dividing an equation by any other number keeps its solutions, because the step can be undone. Multiplying by 0 cannot be undone.
Whole equations, both sides, every term. Adding, subtracting or multiplying applies to each term on each side. Multiplying only the left side produces an equation that the solution no longer satisfies.
In a problem from words, the numbers must fit the story. A count of plants or people must be a whole number that is not negative; a result that fails this means the information given was inconsistent.
Where this goes next
Elimination is the method behind most problems in words with two unknowns: two kinds of ticket, two speeds, two ingredients, each giving one equation for a total count and one for a total value. Systems in word problems sets them up. With three unknowns, systems in three variables use elimination twice, removing one letter from two different pairs of equations to leave a two-letter system of the kind solved here.
The letters only mark the columns; all the work is done on the coefficients and the numbers on the right. Writing just those numbers in a rectangle is the idea of a matrix, and writing a system as a matrix equation makes it precise. Elimination done row by row on that rectangle is Gaussian elimination, the method computers use for systems with thousands of unknowns.
Exercises
Day 1: add or subtract
Solve each system by adding or subtracting the equations, and check the answer.
- x + y = 17 and x - y = 5
- 3x + 4y = 10 and -3x + y = 10
- 2x + 7y = -1 and 2x + 3y = 3
- 6x - 5y = 4 and 2x - 5y = -12
- 4y = 3x + 1 and 3x + 2y = 11
- 7x - 3y = 1 and 2x + 3y = 17
- The line y = mx + b passes through (2, 9) and (-1, 0). Putting each point into the equation gives two equations in m and b. Solve them by elimination to find m and b.
Day 2: multiply first
Solve each system by elimination.
- 3x + 5y = -11 and x - 4y = 19
- 5x - 4y = 6 and 3x + 2y = -14
- 7x + 3y = 11 and 5x - 2y = 12
- 6x + 5y = -16 and 4x + 3y = -10
- \displaystyle \frac{x}{5} + \frac{y}{2} = 4 and \displaystyle \frac{x}{4} - \frac{y}{6} = \frac{11}{6}
- 0.4x + 0.3y = 1.8 and 0.2x - 0.5y = -0.4
Day 3: choose a method, and when both letters vanish
For 14 to 17, say which method suits the system and why, then solve it.
- y = 4x + 9 and 3x - 2y = -13
- 2x + 9y = 5 and 2x + 4y = 0
- 4x - 6y = 2 and -6x + 9y = -3
- 3x + 6y = 4 and x + 2y = 5
- For which value of k does the system x - 7y = 5 and 3x + ky = 15 have infinitely many solutions? What happens for every other value of k?
- Solve the system 3(x - 2y) = x + 4 and 5y = 2x - 7.
Reasoning
- A pair (x, y) makes both a = b and c = d true. Explain why it also makes a + c = b + d true. Then explain why the system made of that sum and the first equation has exactly the same solutions as the original system.
- Why may an equation be multiplied by any number except 0 during elimination? What goes wrong with 0?
- Gwilym eliminates x from a system and is left with 0 = 7. Henrietta draws the graphs of the same two equations. Describe what she sees, and explain why it must look that way.
- The equations a_1x + b_1y = c_1 and a_2x + b_2y = c_2 have b_1 and b_2 not 0. A number t times the first equation, added to the second, removes both x and y. Show that the two lines have the same slope.
- Kofi solves a system by substitution and Lorelei solves the same system by elimination. Explain why, if neither makes an arithmetic slip, they must reach the same answer.
Answers
- (11, 6). Adding gives 2x = 22, so x = 11, and then y = 6.
- (-2, 4). Adding gives 5y = 20, so y = 4; then 3x + 16 = 10, so x = -2.
- (3, -1). Subtracting the second from the first gives 4y = -4, so y = -1; then 2x - 3 = 3, so x = 3.
- (4, 4). Subtracting the second from the first gives 4x = 16, so x = 4; then 24 - 5y = 4, so y = 4.
- \displaystyle \left(\frac{7}{3}, 2\right). The first in standard form is -3x + 4y = 1. Adding gives 6y = 12, so y = 2; then 3x + 4 = 11, so \displaystyle x = \frac{7}{3}.
- \displaystyle \left(2, \frac{13}{3}\right). Adding gives 9x = 18, so x = 2; then 14 - 3y = 1, so \displaystyle y = \frac{13}{3}.
- m = 3 and b = 3, so the line is y = 3x + 3. The points give 2m + b = 9 and -m + b = 0. Subtracting gives 3m = 9, so m = 3, and then b = 3.
- (3, -4). Multiply the second by -3: -3x + 12y = -57. Adding gives 17y = -68, so y = -4; then x = 19 - 16 = 3.
- (-2, -4). Multiply the second by 2: 6x + 4y = -28. Adding gives 11x = -22, so x = -2; then -6 + 2y = -14, so y = -4.
- (2, -1). Multiply the first by 2 and the second by 3, then add: 29x = 58, so x = 2; then 14 + 3y = 11, so y = -1.
- (-1, -2). Multiply the first by 2 and the second by -3: 12x + 10y = -32 and -12x - 9y = 30. Adding gives y = -2; then 4x - 6 = -10, so x = -1.
- (10, 4). Multiply the first by 10 and the second by 12: 2x + 5y = 40 and 3x - 2y = 22. Multiply these by 2 and 5 and add: 19x = 190, so x = 10; then 20 + 5y = 40, so y = 4.
- (3, 2). Multiply both by 10: 4x + 3y = 18 and 2x - 5y = -4. Multiply the second by -2 and add: 13y = 26, so y = 2; then 4x + 6 = 18, so x = 3.
- (-1, 5). Substitution, since the first equation gives y alone: 3x - 2(4x + 9) = -13 gives -5x - 18 = -13, so x = -1 and y = -4 + 9 = 5.
- (-2, 1). Elimination by subtracting, since both have 2x: 5y = 5, so y = 1; then 2x + 4 = 0, so x = -2.
- Infinitely many solutions: every pair with 2x - 3y = 1, such as (2, 1) and (-1, -1). Multiply the first by 3 and the second by 2 and add: 0 = 0. Both equations are 2x - 3y = 1 multiplied through.
- No solution. Multiply the second by -3, giving -3x - 6y = -15, and add: 0 = -11, which is false. The lines are parallel.
- k = -21. Multiply the first by -3 and add: (k + 21)y = 0. For k = -21 this is 0 = 0, and the second equation is three times the first: infinitely many solutions. For any other k, y = 0 and then x = 5: exactly one solution, (5, 0).
- (11, 3). In standard form the equations are 2x - 6y = 4 and 2x - 5y = 7. Subtracting the second from the first gives -y = -3, so y = 3; then 2x - 18 = 4, so x = 11.
- For that pair, a and b are the same number, and so are c and d. Adding equal amounts to equal amounts gives equal results, so a + c = b + d. So every solution of the original system solves the sum and the first equation. Conversely, if a pair solves a + c = b + d and a = b, subtracting a = b from the sum gives c = d, so it solves the original system too.
- Multiplying both sides by a number t keeps an equation true, and if t is not 0 the step is undone by dividing by t, so the new equation has exactly the same solutions. With t = 0 every equation becomes 0 = 0, which every pair satisfies; the information is lost.
- Two parallel lines that never meet. Every solution of the system would have to make 0 = 7 true, and no pair does, so the lines share no point. Both letters vanished together, which happens only when the slopes are equal; since the lines do not meet, they are parallel.
- Removing x and y means ta_1 + a_2 = 0 and tb_1 + b_2 = 0, so a_2 = -ta_1 and b_2 = -tb_1. Since b_2 is not 0, neither is t. The slope of the second line is \displaystyle -\frac{a_2}{b_2} = -\frac{-ta_1}{-tb_1} = -\frac{a_1}{b_1}, the slope of the first.
- The solutions belong to the system: they are the pairs that make both equations true, the points on both lines. Every step of either method replaces the system by one with exactly the same solutions, so both end with the same pairs.