Welcome to the final lesson of Solving Systems by Substitution — you have made it to lesson five of five! Over the past four lessons, we built a complete toolkit: substituting pre-isolated variables, rearranging to isolate variables with coefficients of 1 or −1, creating fractional expressions when the coefficient is something else, and substituting those fractions while distributing and clearing denominators. Each of those lessons asked us to solve a system using a setup that was already decided. In this lesson, we shift our attention to the decision itself: how do we choose which variable and which equation to use so that the resulting algebra is as clean as possible? Along the way we will see something important: the guidelines for making that choice are genuinely useful, but they are heuristics — things to check by looking at the actual expressions — not a rule you can apply without thinking.
Any Valid Isolation Works — Some Just Cost Less
Before anything else, remember the principle from Lesson 2: the choice of which variable to isolate affects convenience, not correctness. Every valid isolation leads to the same solution. What changes is how much arithmetic you do along the way and how many opportunities you create for a slip.
Fractions and negative signs are where most errors happen, so a good setup is one that produces as few of them as possible. Spending a few seconds comparing your options before you start computing is almost always worth it.
First Check: Can the Fractions Be Avoided Entirely?
A coefficient of 1 or −1 always gives a fraction-free isolation, but it is not the only way to avoid fractions. Look at what happens in general. To isolate x from
ax+by=c,
you move the by term and then divide every term by a:
x=ac−aby
The result is fraction-free exactly when a divides evenly into bothb and c. Notice what does not matter here: the size of a. What matters is divisibility.
Two quick examples with no coefficient of 1 anywhere:
6x+2y=14⟶2y=14−6x⟶y=7−3x4x+8y=20⟶4x=20−8y⟶x=5−2y
Both isolations are completely fraction-free. So the very first thing to do when you look at a system is scan each equation and ask: "Does one of these coefficients divide evenly into the other coefficient and the constant?" If the answer is yes, that isolation is fraction-free, and it is almost always the best place to start.
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
When Fractions Cannot Be Avoided: Useful Heuristics
A Case Where the Smallest Coefficient Loses
Comparing All Four Options
Solving With the Best Choice
Applying the Comparison to Event Tickets
Common Pitfalls to Watch For
Conclusion and Next Steps
In this final lesson, we added a strategic layer to the substitution method. Before touching the algebra: check whether some coefficient divides evenly into every other term of its own equation — if so, that isolation is fraction-free regardless of coefficient size. If none does, compare the candidate expressions using denominator size, whether the constant stays whole, whether the fraction will clear during distribution, and the sign of the coefficient. These are heuristics to check, not a fixed rule to apply, and the surest way to settle a close call is to write the expressions down and compare them.
Combined with the skills from the previous four lessons, you now have a complete and efficient approach to solving systems by substitution. Head over to the practice exercises, where you will compare setups, justify your choices, and solve full systems from decision to verification. Let's finish this course strong!
If no coefficient divides its whole equation, some fraction will appear no matter what you do. Then you are comparing options, and these features are worth checking:
Denominator size. The coefficient you divide by becomes the denominator. A coefficient of 2 produces halves; a coefficient of 7 produces sevenths. Smaller denominators usually mean lighter arithmetic.
Whether the constant divides evenly. If the coefficient divides the constant, the constant part stays a whole number and only one term carries a fraction. Dividing 18 by 3 gives a clean 6; dividing 16 by 3 gives 316.
Whether the fraction will clear when you distribute. If the other equation's coefficient of the substituted variable is a multiple of your denominator, the fraction disappears during distribution and you skip the clearing step entirely.
Sign of the coefficient. When two options are otherwise equal, prefer the positive coefficient. Dividing by a negative flips the sign of every term, which is manageable but adds one more place for a sign error.
These four features often point in the same direction — but not always, and no single one of them decides the matter on its own. Treat them as a short checklist, and when two options look close, write both isolated expressions down and glance at what the substitution step would look like. That comparison takes only a few seconds and settles the question far more reliably than any ranking.
Here is a system that shows why "smallest coefficient first" cannot be treated as a rule:
2x+5y=173x+6y=18
The smallest absolute value in the system is 2, on x in Equation 1. If we isolate that variable, we divide by 2:
x=217−25y
Both terms are fractional, because 2 divides neither 5 nor 17. Now run the divisibility check on Equation 2 instead. The coefficient 3 divides evenly into both 6 and 18:
3x=18−6y⟶x=6−2y
Completely fraction-free, even though 3 is larger than 2. Substituting into Equation 1 is then about as easy as substitution gets:
2(6−2y)+5y=17⟹12−4y+5y=17⟹y=5x=6−2(5)=−4
Verify:
Eq 1:2(−4)+5(5)=−8+25=17 ✓
Eq 2:3(−4)+6(5)=−12+30=18 ✓
The takeaway: run the whole-equation divisibility check before you reach for coefficient size. Divisibility can beat smallness, and it did here.
Now let's work through a system where the divisibility check comes up empty, so we really do have to compare fractional options:
2x+5y=164x+3y=18
Divisibility check first. Isolating x from Eq 1 means dividing by 2, which divides 16 but not 5. Isolating y from Eq 1 means dividing by 5, which divides neither 2 nor 16. Isolating x from Eq 2 means dividing by 4, which divides neither 3 nor 18. Isolating y from Eq 2 means dividing by 3, which divides 18 but not 4. No option is fraction-free, so we compare:
Choice
Isolated Expression
Denominator
Constant
Does the fraction clear on substitution?
x from Eq 1
x=8−25y
2
8 (whole)
Yes — Eq 2's x-coefficient 4 is a multiple of 2
y from Eq 1
y=516−52x
5
516
No — Eq 2's y-coefficient is 3
x from Eq 2
x=29−43y
4
29
No — Eq 1's x-coefficient is 2
y from Eq 2
y=6−34x
3
6 (whole)
No — Eq 1's y-coefficient is 5
Reading the table, the first row wins on three counts at once: the smallest denominator, a whole-number constant, and a fraction that clears by itself during distribution. The runner-up, y from Eq 2, has a whole constant too, but its denominator of 3 will survive distribution and force an extra clearing step. The bottom two rows both carry fractional constants, so every later step would involve fraction arithmetic.
So we choose isolate x from Equation 1, and we can say why in one sentence: the coefficient 2 gives the smallest denominator, divides evenly into 16, and cancels against the 4 in Equation 2 when we distribute.
The isolated expression is:
x=8−25y
Substitute into Equation 2, wrapping the expression in parentheses and distributing the coefficient 4:
4(8−25y)+3y=1832−10y+3y=18
Notice that 4×25y=220y=10y. The fraction cleared itself during distribution, exactly as the table predicted — no separate clearing step needed.
Combine like terms and solve:
32−7y=18⟹−7y=−14⟹y=2
Back-substitute into the isolated expression to find x:
x=8−25(2)=8−5=3
Finally, verify in both original equations:
Eq 1:2(3)+5(2)=6+10=16 ✓
Eq 2:4(3)+3(2)=12+6=18 ✓
The solution is (x,y)=(3,2). Contrast this with isolating y from Equation 1, which would have given a denominator of 5 and a fractional constant of 516, requiring fraction work at every step for the exact same final answer.
Let's see how the same thinking works in a practical setting. A school sells adult tickets for a dollars each and child tickets for c dollars each. On Friday, 2 adult tickets and 3 child tickets bring in $26. On Saturday, 4 adult tickets and 5 child tickets bring in $48.
2a+3c=264a+5c=48
Divisibility check first. Dividing Eq 1 by 2: 2 divides 26 but not 3. Dividing Eq 1 by 3: 3 divides neither 2 nor 26. Dividing Eq 2 by 4: 4 divides 48 but not 5. Dividing Eq 2 by 5: 5 divides neither 4 nor 48. No fraction-free isolation exists here, so we compare the fractional options.
Isolating a from Equation 1 gives the smallest denominator (2), a whole-number constant (26÷2=13), a positive coefficient, and — best of all — Equation 2's a-coefficient of 4 is a multiple of 2, so the fraction will clear when we distribute:
a=13−23c
Substitute into Equation 2 and distribute:
4(13−23c)+5c=4852−6c+5c=48
Once again, 4×23c=6c — the denominator cancels. Solving the simplified equation:
52−c=48⟹c=4
Back-substitute to find a:
a=13−23(4)=13−6=7
Verify in both original equations:
Eq 1:2(7)+3(4)=14+12=26 ✓
Eq 2:4(7)+5(4)=28+20=48 ✓
Each adult ticket costs $7 and each child ticket costs $4. The strategic choice kept the algebra fraction-free from start to finish, even though every coefficient was 2 or larger. That is the payoff of pausing to compare before you compute.
Treating the guidelines as a guaranteed ranking. "Smallest coefficient first" is a good instinct, not a law. As the 2x+5y=17, 3x+6y=18 example showed, a larger coefficient can produce a fraction-free expression while a smaller one produces two fractions.
Skipping the whole-equation divisibility check. Fractions are avoidable more often than learners expect. Always ask whether a coefficient divides evenly into both the other coefficient and the constant before assuming you are stuck with fractions.
Forgetting to look ahead to the substitution step. A denominator that cancels against the other equation's coefficient effectively disappears. Comparing the two candidate expressions and what happens when they are distributed is the most reliable check.
Over-optimizing. Do not spend a minute agonizing over which of two similar setups is marginally better. Every valid isolation gives the same answer; a quick comparison, then commit.