Welcome back to Solving Systems by Elimination! You have reached lesson three of five, and the elimination skills you have been building are about to become far more versatile.
So far, every system we have tackled came conveniently prepared: one variable already had opposite coefficients (so we added) or equal coefficients (so we subtracted). In practice, coefficients rarely line up on their own. In this lesson, you will learn to scale one equation by multiplying every term by a carefully chosen constant, creating matching or opposing coefficients on demand. Once the coefficients are aligned, the rest of the process works exactly as before.
When Coefficients Don't Match Yet
Elimination works by making two coefficients cancel: adding cancels opposites like 3y and −3y, and subtracting cancels equals like 5x and 5x. But look at this system:
3x+2y=19x+y=8
The x-coefficients are 3 and 1; the y-coefficients are 2 and 1. Neither pair is equal or opposite, so adding or subtracting these equations as they stand will not eliminate anything. We need a preliminary step: multiply every term of one equation by a constant to create the alignment, and then proceed with the elimination techniques we already know.
Choosing the Right Multiplier
Picking the multiplier comes down to one question: What must I multiply this coefficient by so that it matches the corresponding coefficient in the other equation — or its opposite? A straightforward three-step approach works well:
Pick the variable you want to eliminate.
Identify the two coefficients on that variable across both equations.
Compare their absolute values and divide the larger by the smaller. The result is your multiplier, applied to the equation with the smaller absolute value.
In the system above, suppose we target x. Equation 1 has coefficient 3 and Equation 2 has coefficient 1. Since 3÷1=3, we multiply every term of Equation 2 by 3 so that both equations will contain 3x. We could just as easily target y: the multiplier would be 2÷1=2, applied to Equation 2. Either choice leads to the correct answer.
Using absolute values matters when a coefficient is negative. If one equation has −2y and the other has 6y, the absolute values are 2 and 6, so the multiplier is 6÷2=3, applied to the equation containing −2y. That turns −2y into −6y — the opposite of 6y rather than a match — which is equally useful for elimination, as the next section explains.
One important rule: every term in the equation must be multiplied — including the constant on the right side of the equals sign. Multiplying only part of an equation breaks its balance, just like adding weight to only one side of a scale.
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
Equal or Opposite? Choosing Your Scaling Sign
Scaling in a Real-World Setting
Conclusion and Next Steps
When a system's coefficients are not already aligned, multiplying one equation by the right constant bridges the gap. The overall flow stays the same — scale, eliminate (add or subtract), solve, back-substitute, and verify. The two details to watch are multiplying every term in the equation and choosing the correct follow-up operation based on the coefficients you actually end up with: equal coefficients mean subtract, opposite coefficients mean add.
In the next lesson, you will handle systems where neither coefficient divides evenly into the other, requiring you to scale both equations. But first, it is time to practice what you have just learned! The exercises ahead will walk you through identifying the right multiplier, scaling equations term by term, connecting your scaling choice to the correct operation, and solving complete systems — including a real-world purchasing scenario — on your own.
Let's work through the full process with our system:
3x+2y=19(Equation 1)x+y=8(Equation 2)
Step 1 — Scale Equation 2 by 3. Multiply every term:
3(x)+3(y)=3(8)3x+3y=24(Scaled Equation 2)
Step 2 — Subtract to eliminate x. Both equations now contain 3x, so we subtract the scaled Equation 2 from Equation 1. Remember to flip every sign in the equation being subtracted:
Step 3 — Solve for y. Divide both sides by −1:
y=5
Step 4 — Back-substitute. Plug y=5 into the original (unscaled) Equation 2:
x+5=8⟹x=3
Always back-substitute into an original equation, not the scaled version. Both will give the same answer, but using the original keeps the arithmetic simpler and avoids carrying forward any scaling errors.
Step 5 — Verify. Substitute into both original equations:
Equation
Substitution
Result
3x+2y=19
3(3)+2(5)=9+10
19=19 ✓
x+y=8
3+5
8=8 ✓
Both equations balance, so (x,y)=(3,5) is confirmed.
In the walkthrough above, we multiplied by 3, which produced equalx-coefficients (3 and 3), so we subtracted. There is an alternative: multiply Equation 2 by −3 instead.
−3(x)+(−3)(y)=−3(8)−3x−3y=−24
Now the x-coefficients are 3 and −3 — opposites — so we add:
(3x+2y)+(−3x−3y)=19+(−24)−y=−5⟹y=5
Same answer, different path. Notice that the deciding factor is not the sign of the multiplier itself — it is the pair of coefficients you end up with:
Equal coefficients (same sign) → subtract.
Opposite coefficients (different signs) → add.
Always read the two coefficients after scaling and then decide. When both original coefficients have the same sign, a positive multiplier gives you equal coefficients and a negative multiplier gives you opposites. But when the original coefficients already have different signs, it flips: with −2y and 6y, multiplying by a positive 3 produces −6y and 6y — opposites, so you add. Multiplying by −3 would produce 6y and 6y — equal, so you subtract.
Some learners deliberately choose the multiplier that creates opposites, because adding avoids the sign-flipping step that subtraction requires. Others prefer creating equal coefficients. Either way is perfectly valid, so choose whichever gives you more confidence — just be sure to check the resulting signs before you add or subtract.
Letting l = price of a latte and m = price of a muffin, the system is:
2l+3m=17(Combo A)l+m=7(Combo B)
Neither coefficient pair matches. Multiply the Combo B equation by 2 so both equations have 2l:
2l+2m=14
Subtract from Combo A:
(2l+3m)−(2l+2m)=17−14m=3
Back-substitute into the original Combo B equation: l+3=7, so l=4. Each latte costs $4 and each muffin costs $3. A quick check in Combo A confirms: 2(4)+3(3)=8+9=17 ✓. Whenever one coefficient divides evenly into the other, a single scaling step is all you need.