Welcome back to Solving Multi-Step Inequalities! This is the fourth of five lessons in the course, which means we are almost at the finish line. So far, we have solved two-step inequalities, combined like terms to simplify before solving, and expanded parentheses with the distributive property. Every one of those problems had one thing in common: the variable appeared on only one side of the inequality. That changes now. In this lesson, we tackle inequalities where variable terms appear on both sides, and we learn how to gather them together strategically before solving. Let's get to it.
When Variables Show Up on Both Sides
So far, our solving workflow has focused on simplifying one side of the inequality and then isolating the variable with inverse operations. But many real-world comparisons naturally produce variable terms on both sides. For example, imagine choosing between two phone plans: one charges a $6 monthly fee plus $1 per gigabyte, and the other charges $4 per gigabyte with no fee. To find when the first plan is cheaper, we would write 6+x<4x, and now x lives on both sides.
Before we can isolate x, we need all the variable terms on one side and all the constants on the other. This "collecting" step is the new skill we are adding to our toolkit, and it works just like moving a constant across the inequality — subtract or add the same term on both sides to relocate it.
The Core Technique: Collecting Variable Terms
Choosing Which Side to Collect On
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
The idea is straightforward: subtract (or add) a variable term on both sides to move it across the inequality, exactly the way we already move constants. Consider:
6x−1<4x+7
Step 1 — Subtract 4x from both sides to remove the variable from the right:
2x−1<7
Step 2 — Add 1 to both sides to isolate the variable term:
2x<8
Step 3 — Divide both sides by 2:
x<4
The coefficient was positive, so no sign flip was needed. Let's verify with x=3: the left side gives 6(3)−1=17, the right side gives 4(3)+7=19, and 17<19. ✓
Notice that subtracting a variable term from both sides follows exactly the same logic as subtracting a constant. It does not change the direction of the inequality.
A Guided Example
Combining Earlier Techniques
A Real-World Application: Comparing Plans
Mistakes to Avoid
Conclusion and Next Steps
In this lesson, we learned how to handle inequalities with variable terms on both sides by collecting those terms onto one side and the constants onto the other. The process mirrors what we already do with constants: subtract or add the same term on both sides. The key strategic insight is to subtract the smaller variable term, which keeps the resulting coefficient positive and avoids unnecessary sign flips. Together with expanding parentheses and combining like terms from earlier lessons, this gives us a complete set of tools for multi-step inequalities.
Now it is time to put this technique into action. In the upcoming exercises, you will walk through a guided solution step by step, solve inequalities on your own, make strategic choices about where to collect variables, and even set up a plan comparison from scratch. Let's go!
Here is where strategy makes a real difference. When variable terms appear on both sides, we get to choose which side keeps them. The smart move is to subtract the smaller variable term so the resulting coefficient stays positive, which avoids an unnecessary sign flip later.
To see why, let's try the opposite choice on the same inequality. Starting again with 6x−1<4x+7, suppose we subtract 6x from both sides instead:
−1<−2x+7
The variable term now has a negative coefficient. We can still solve: subtract 7 to get −8<−2x, then divide by −2 and flip the sign to get 4>x, which is the same as x<4. We arrive at the same answer, but we had to navigate a sign flip that was entirely avoidable.
Choice
Result after collecting
Sign flip needed?
Subtract 4x (smaller coefficient)
2x−1<7
No
Subtract 6x (larger coefficient)
−1<−2x+7
Yes
Tip: Compare the coefficients of the variable on each side. Move the term with the smaller coefficient to the other side, and the remaining coefficient will be positive.
Let's work through another problem with this strategy in mind:
3x+10≥7x−2
The left side has coefficient 3 and the right has 7. Since 3<7, we subtract 3x from both sides to keep the coefficient positive:
10≥4x−2
Add 2 to both sides:
12≥4x
Divide both sides by 4:
3≥x
This is the same as x≤3. Check with x=1: 3(1)+10=13 and 7(1)−2=5, and 13≥5. ✓
No sign flip was necessary because we collected the variable on the side that produced a positive coefficient. Notice that the variable ended up on the right side of the inequality — that is perfectly fine. We can always rewrite 3≥x as x≤3 if we prefer the variable on the left.
Real problems often mix the techniques from earlier lessons with variables on both sides. Consider:
2(x+3)>5x−9
First, expand the parentheses on the left side:
2x+6>5x−9
Now we have variables on both sides. Since 2<5, subtract 2x from both sides:
6>3x−9
Add 9 to both sides:
15>3x
Divide by 3:
5>x
So x<5. Check with x=0: 2(0+3)=6 and 5(0)−9=−9, and 6>−9. ✓
This example shows how the skills we have been building layer on top of each other: expand parentheses first, then collect variable terms, then solve with inverse operations.
Suppose you are choosing between two streaming services. Plan A charges a $15 monthly base fee plus $2 per movie rented. Plan B has no base fee but charges $5 per movie. You want to find when Plan A costs less than Plan B.
Let m represent the number of movies rented in a month. The costs are:
Plan A:15+2m
Plan B:5m
We set up the inequality 15+2m<5m. Since 2<5, subtract 2m from both sides:
15<3m
Divide by 3:
5<m
So Plan A is the better deal when m>5, meaning you rent more than five movies per month. This kind of comparison — where both sides contain the variable — comes up naturally whenever two options depend on the same quantity at different rates.
Keep the practical domain in mind here too: movies are counted in whole numbers, so the algebraic solution m>5 really means Plan A wins for whole-number values of m that are 6 or greater. Separating the pure inequality from the whole-number domain keeps the recommendation realistic.
Subtracting a variable term from only one side. Whatever we do to one side, we must do to the other. If we subtract 4x from the left, we subtract 4x from the right as well.
Flipping the sign when subtracting a variable term. The sign-flip rule applies only when we multiply or divide both sides by a negative number. Subtracting a term is just subtraction, so the inequality direction stays the same.
Always forcing the variable to the left. There is no rule that the variable must end up on the left. Collecting on whichever side keeps the coefficient positive is the smarter strategy, even if it means writing 3≥x instead of x≤3.