- Simultaneous equations — substitution
- Solving equations with brackets and fractions · coming soon
- y = mx + c · coming soon
- One linear, one quadratic
- Simultaneous equations word problems
- Gaussian elimination · coming soon
Two receipts and one subtraction
Kofi buys stationery twice in one week. Both times he pays the same prices.
- Monday: 3 pens and 2 notebooks cost $16.
- Thursday: 3 pens and 1 notebook cost $11.
How much is one notebook? Put the two receipts side by side. Both contain 3 pens. The only difference is that Monday's receipt has one extra notebook. Monday also cost $5 more. So that extra notebook must cost $5.
Now the pens are easy. Thursday's receipt says 3 pens and one $5 notebook cost $11. So 3 pens cost $6, and one pen costs $2. Check on Monday's receipt: . ✓
Look at what happened there. You compared the two receipts, and the pens disappeared from the comparison, because both receipts had the same number of them. The method is called elimination: you combine two equations so that one letter disappears.
The last lecture promised a better tool for a pair like this one:
Substitution struggles here. No letter has a coefficient of 1 or −1, so isolating any letter gives a fraction at once, such as . Elimination handles this pair without a single fraction. We will solve it in Worked Example 4. First, we need to see why the method is allowed at all.
Why you may add or subtract equations
Write the receipts as equations. Let be the price of a pen and the price of a notebook, in dollars.
The first equation says that and 16 are the same number. The second says that and 11 are the same number. Now use a rule you have trusted for years: if you take equal amounts away from equal amounts, what is left is still equal. So you may take the left side of the second equation away from the left side of the first, and take 11 away from 16 on the right. The two results must still be equal.
Inside the left side, and . So the line becomes . The letter has gone. This is the same as the receipt comparison, written in symbols.
The same rule works for adding. If and , then . You may also multiply both sides of one equation by the same number, because that keeps its two sides equal. These three moves (add, subtract, multiply through) are all that elimination uses.
When you subtract one equation from another, you get a new equation. Is this new equation true for every pair , or only for some?
Show the answer
Only for some. The new equation is guaranteed to be true for any pair that makes both original equations true, because that is what we used to build it. It is not a new fact about the world. It is a consequence of the two facts we already had. That is why it can lead us to the solution. It also explains why, at the end, we go back to one of the original equations to find the second letter.
A picture of what elimination does
The last lecture showed that each linear equation is a straight line, and the solution is the point where the two lines cross. So what is the new equation we make by combining them?
It is another straight line. And it must pass through the crossing point, because the crossing point makes both original equations true, so it makes the combination true as well. Every combination of the two equations is a line through the same point. Different combinations give lines that point in different directions.
Two of these lines are special. One is vertical, , and one is horizontal, . Each tells you one coordinate of the crossing point directly. Elimination is a search for one of those two combinations.
Try it yourself below. You choose how many times to take each equation, and the explorer adds the results. Watch the new line turn about the crossing point.
Choose how many times to take each equation. The explorer adds the two results and draws the new line in teal. Find a choice that makes the teal line vertical, and one that makes it horizontal.
Combining 3x + 4y = 10 (taken a times) with 5x − 2y = 8 (taken b times) gives (3a + 5b)x + (4a − 2b)y = 10a + 8b. Every one of these lines passes through (2, 1).
| a | b | Combined equation | What it tells you |
|---|---|---|---|
| 1 | 1 | 8x + 2y = 18 | a sloping line through (2, 1) |
| 2 | 1 | 11x + 6y = 28 | a sloping line through (2, 1) |
| 1 | 2 | 13x = 26 | y removed: x = 2 |
| 5 | −3 | 26y = 26 | x removed: y = 1 |
Check one sloping line: 8(2) + 2(1) = 18 ✓. The figure above shows the two special lines, x = 2 and y = 1.
What did you see? Whatever numbers you chose, the combined line passed through . For most choices it was a sloping line that told you nothing new. But when you took the first equation once and the second equation twice, the terms cancelled: . The line became vertical, , so . When you took the first equation 5 times and the second −3 times, the terms cancelled instead, and the line became horizontal, .
That is it. That is the whole idea. Elimination chooses multipliers so that one letter's terms add up to zero. The rest is careful arithmetic.
1. Choose a letter to eliminate. If its coefficients are not equal in size, multiply one or both equations so that they are.
2. If the matching terms have opposite signs, add the equations. If they have the same sign, subtract one equation from the other.
3. Solve the equation that is left, which has one unknown.
4. Substitute that value into one of the original equations to find the other letter.
5. Check the pair in both original equations.
Step 2 is not a rule to learn by heart. It follows from what you want: the two matching terms must add up to zero. With and , adding gives . With and , adding gives , which removes nothing. So you subtract: .
Worked examples
Solve and .
Both equations have , with the same sign. So subtract the second equation from the first. Put the whole second equation in a bracket first, because every term in it is being taken away.
Remove the bracket: . Notice that . So , and .
Substitute into the first equation: , so , so . The answer is a fraction, and that is fine. Leave it exact.
Check in both: ✓ and ✓.
Solve and .
No coefficients match. But doubling the second equation gives , which matches the first. Multiply every term, including the right side: .
Now both equations have with the same sign, so subtract: , which gives .
Substitute into the simpler original equation: , so .
Check in both: ✓ and ✓.
Solve and .
Option A, remove . The coefficients are 4 and −2. Doubling the second equation gives . The terms now have opposite signs, so add: , which gives , so . Then , so , so .
Option B, remove . The coefficients are 3 and 5, so both equations must change. Multiply the first by 5 and the second by 3: and . Subtract: , so .
Both options work. Option A needed one multiplication and small numbers. Option B needed two multiplications and larger numbers. So before you start, look at both letters, and remove the one whose coefficients are easier to match.
Check in both: ✓ and ✓.
Subtraction is where most mistakes in this topic happen. Make a prediction before you read on.
Subtract the second equation from the first. Which line do you get? Choose before you work it through.
4x + 3y = 11
4x + y = 7
Subtracting 4x + y = 7 from 4x + 3y = 11 means taking away every term: (4x + 3y) − (4x + y) = 11 − 7, so 4x + 3y − 4x − y = 4, which gives 2y = 4 and y = 2. The common wrong answer, 4y = 4, comes from writing −4x + y instead of −4x − y.
Solve and .
The coefficients are 3 and −4, with opposite signs. The smallest number that both 3 and 4 divide into is 12. So multiply the first equation by 4 and the second by 3:
Add: , so . Then , so , so .
Check in both: ✓ and ✓.
If you solve this pair by substitution, you write , substitute, and multiply through by 3 to clear the fraction. You reach , which is : the same line as above. The two methods do the same arithmetic in a different order. Elimination simply avoids the fractions on the way.
Solve and .
Elimination needs like terms in the same columns. The first equation is not in that form. Rearrange it: subtract from both sides to get . Multiply through by −1 to make it tidier: .
Now remove . The coefficients are −2 and 3. Multiply the first by 3 and the second by 2: and . Add: , so .
Substitute into the original first equation: , so .
Check in both: and ✓; ✓.
When both letters disappear
Sometimes the multiplier that removes one letter removes the other one too. Take and . Doubling the first gives . Subtracting this from the second gives .
It means what it meant with substitution. A false statement means that no pair fits both equations, so the lines are parallel. Both lines have gradient . If the second equation had been , you would get . That is always true, because the second equation is just the first one doubled. They describe the same line, so there are infinitely many solutions.
Aisha must solve and . She says, "No coefficient is 1, and nothing matches, so elimination will not work." Is she right?
Show the answer
No. Elimination works on every pair of linear equations that has one solution. It only needs a multiplier for each equation. To remove , multiply the first by 3 and the second by 2: and . Subtract: . Then , so . Check: ✓. Matching coefficients are something you make, not something you wait for.
Substitution or elimination?
Choose substitution when one letter is already on its own, as in , or when a letter has a coefficient of 1 or −1, so that isolating it creates no fractions.
Choose elimination when both equations are written as and no letter is easy to isolate, or when two coefficients already match.
The two methods differ when one equation is not a straight line. Elimination needs terms that match and cancel. When one equation is linear and the other contains , there is usually no term in the linear equation to cancel against. Substitution does not need matching terms, so it is the usual method there. The next lecture uses it.
Three classic mistakes
Subtracting means subtracting every term: . Students often write , changing the sign of the first term only. Write the whole equation in a bracket before you subtract, then change every sign inside it, including the number on the right.
Doubling gives , not . An equation is a balance. If you double one side and not the other, the two sides are no longer equal, and every answer after that is wrong. Multiply every term, on both sides.
In Worked Example 5, the first equation was . Adding it directly to would mix terms with terms and remove nothing. First rearrange both equations into the same order, , so that the terms sit above each other and so do the terms.
Work each one on paper first. Open a hint only when you are stuck.
-
Solve and .
Hint 1
The terms are and . They already have opposite signs.
Hint 2
Add the equations: .
Full answer
Adding gives , so . Then , so . Check: ✓ and ✓. In words: the sum of two numbers is 10 and their difference is 4, so the numbers are 7 and 3.
-
Solve and .
Hint 1
Removing needs only one multiplication. What should the second equation be multiplied by?
Hint 2
Multiply the second equation by 3: . Then add.
Full answer
Adding and gives , so . Then , so . Check: ✓ and ✓.
-
Solve and .
Hint 1
Both equations must be multiplied. The coefficients 3 and 2 can both become 6.
Hint 2
the first: . the second: . Same signs, so subtract.
Full answer
Subtracting gives . Then , so , so . Check: ✓ and ✓. A zero on the right side is no different from any other number.
-
Elimination also works with three unknowns. Solve , and .
Hint 1
Compare the first two equations. Subtracting one from the other removes two letters at once.
Hint 2
Subtracting the second from the first gives , so . Put into the first and third equations. You now have two equations in and .
Full answer
From the first two, , so . The first equation becomes . The third becomes , which is . Add these two: , so . Then . Check all three: ✓, ✓, ✓. Notice the plan: each elimination removes one letter, until one equation with one letter is left. That plan works for any number of unknowns.
Elimination is very old. A Chinese book called The Nine Chapters on the Mathematical Art was put together by several generations of scholars more than 2,000 years ago. Its eighth chapter, Fangcheng, contains 18 problems. Each one becomes a set of simultaneous linear equations. The book solves them with a procedure very similar to the one in this lecture: arrange the numbers in columns, then combine whole equations until letters disappear one at a time. To make that work, the book also gave rules for calculating with negative numbers.
Today the same plan is called Gaussian elimination. It is named after the German mathematician Carl Friedrich Gauss, because a way of writing the steps that he devised in the early 1800s was taken up by later calculators. It is how computers solve systems with thousands of unknowns, in engineering, weather forecasting and economics. The machine follows the same plan as the last question: remove one letter, then the next.
- Adding or subtracting two true equations, side by side, gives another equation that is true for their common solution.
- Every such combination is a straight line through the crossing point, and elimination chooses the combination that is vertical or horizontal.
- To eliminate a letter, multiply the equations so that its coefficients are equal in size, then add if their signs are opposite and subtract if they are the same.
- When you subtract or multiply an equation, every term changes, including the number on the right side.
- If both letters disappear, a false result such as 0 = 3 means parallel lines and no solution, and 0 = 0 means the same line and infinitely many solutions.
- Substitution suits equations with an isolated letter or a coefficient of 1, and elimination suits equations written as ax + by = c.