Welcome to lesson four of five in Solving Systems by Elimination! By now, you can add equations to cancel opposites, subtract to cancel equals, and scale a single equation to create a match on demand — an impressive set of tools.
In this lesson, we tackle the remaining scenario: systems where both equations need to be scaled before any variable can be eliminated. The key is the least common multiple (LCM), which tells you exactly how to scale each equation so the coefficients line up. Once you have this technique down, no pair of coefficients will stand in your way.
When One Multiplier Is Not Enough
In the previous lesson, scaling one equation worked because one coefficient was always a neat factor of the other. If the x-coefficients were 1 and 3, we simply multiplied by 3 and moved on. But what happens with a system like this?
2x+3y=165x+4y=33
The x-coefficients are 2 and 5. Neither divides evenly into the other (5÷2=2.5), so no single whole-number multiplier can align them. The y-coefficients (3 and 4) have the same problem. To create a match, we need to scale both equations, each by its own constant — and the tool that tells us exactly what those constants should be is the least common multiple.
Finding the Right Multipliers with the LCM
The least common multiple (LCM) of two numbers is the smallest positive integer that both numbers divide into evenly. For example, the LCM of 2 and 5 is 10, because 10 is the smallest number divisible by both.
Here is the planning process, which extends what we did in the last lesson:
Pick the variable you want to eliminate.
Find the LCM of the absolute values of that variable's two coefficients.
Determine the multiplier for each equation by dividing the LCM by that equation's coefficient.
Let's target x in our system. The coefficients are 2 and 5:
Coefficient on x
LCM
Multiplier
Equation 1
2
10
10÷2=5
Equation 2
5
10
10÷5=2
After scaling, both equations will contain 10x, and we can subtract to eliminate it. This planning step is quick, and it guarantees that our multipliers are as small as possible.
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
Solving a System Step by Step
Choosing Which Variable to Eliminate
Double Scaling in a Real-World Setting
Conclusion and Next Steps
Scaling both equations is the most flexible form of elimination. When neither coefficient on a chosen variable divides evenly into the other, the LCM tells you exactly how to scale each equation so the target variable cancels. From there, the familiar eliminate, solve, back-substitute, and verify pipeline takes you to the answer.
In the next and final lesson, you will learn to handle systems that contain fractions or decimals by clearing them before you begin eliminating. But first, the practice exercises ahead will build your double-scaling fluency — from identifying LCMs and multiplier pairs, through scaffolded fill-in-the-blank solutions, all the way to solving complete systems independently, including a real-world shopping scenario.
Step 2 — Subtract to eliminate x. Both equations now have 10x with the same sign, so we subtract:
(10x+15y)−(10x+8y)=80−667y=14
Step 3 — Solve for y.
y=714​=2
Step 4 — Back-substitute. Plug y=2 into the original (unscaled) Equation 1:
2x+3(2)=16⟹2x+6=16⟹2x=10⟹x=5
Step 5 — Verify. Check (x,y)=(5,2) in both original equations:
Equation
Substitution
Result
2x+3y=16
2(5)+3(2)=10+6
16=16 ✓
5x+4y=33
5(5)+4(2)=25+8
33=33 ✓
The solution (x,y)=(5,2) is confirmed. Notice that the process after scaling is identical to what you have been doing all along — the only new piece is computing two multipliers instead of one.
We eliminated x above, but we could have targeted y instead. The y-coefficients are 3 and 4, so the LCM is 12. That means we would multiply Equation 1 by 4 and Equation 2 by 3:
8x+12y=6415x+12y=99
Subtracting the first from the second gives 7x=35, so x=5, and back-substitution yields y=2 — the same answer by a different path.
A helpful rule of thumb: choose the variable whose coefficients produce the smaller LCM. Smaller multipliers keep the numbers manageable and reduce the chance of arithmetic mistakes. Here, LCM(2,5)=10 versus LCM(3,4)=12, so targeting x was slightly more efficient. In many problems the difference is small, but when coefficients get larger, this shortcut can save real effort.
Suppose a craft store sells two gift baskets:
Basket A: 3 candles and 5 bars of soap for $39.
Basket B: 4 candles and 7 bars of soap for $53.
Letting c = price of one candle and s = price of one bar of soap, we write:
3c+5s=39(Basket A)4c+7s=53(Basket B)
The coefficients on c are 3 and 4. Neither divides into the other, so we need double scaling. The LCM of 3 and 4 is 12, giving us multipliers of 4 for Basket A and 3 for Basket B:
12c+20s=15612c+21s=159
Subtracting the first from the second gives s=3. Back-substituting into the original Basket A equation: 3c+15=39, so c=8. Each candle costs $8 and each bar of soap costs $3. A quick verification in Basket B confirms: 4(8)+7(3)=32+21=53 ✓. Whenever the quantities in a real-world problem share no convenient factor, double scaling is the way forward.