Welcome back to Solving Compound Inequalities! In the previous lesson, you explored the difference between the connectives "and" and "or" and learned that "and" produces an intersection (overlap) while "or" produces a union (combined region). With that foundation in place, you are ready to take the next step in this second lesson of the course.
This time, we will learn how to solve "and" compound inequalities from start to finish. The plan is simple: solve each part on its own, then find the overlap of the two solution sets. Along the way, we will also discover what happens when the two sets have no overlap at all — a case that is just as important to recognize.
From Reading to Solving
So far, the compound inequalities you have seen were already in their simplest form — the variable was isolated, and you only needed to interpret the result. In real problems, though, each part of a compound inequality usually involves some algebra before the solution becomes visible. A statement like 2x+1>5andx−3<4 does not reveal its overlap until you solve both parts.
The good news is that every technique you need — adding, subtracting, multiplying, dividing, flipping the sign when multiplying by a negative — comes from your earlier coursework. The new skill in this lesson is bringing the two individual results together and deciding what the overlap looks like, or whether an overlap exists at all.
Solving Each Part Separately
Finding the Overlap
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
The strategy for tackling an "and" compound inequality is refreshingly direct:
Solve the first inequality as if it stood alone.
Solve the second inequality as if it stood alone.
Find the overlap of the two solution sets.
Let's try it with a concrete example:
2x−4≥6and5x+1≤26
First inequality:
2x−4≥6⟹2x≥10⟹x≥5
Second inequality:
5x+1≤26⟹5x≤25⟹x≤5
Each part is solved using the same inverse-operation steps you already know. Now we need to bring the two results together and determine where they overlap.
Because an "and" statement requires both conditions to hold at the same time, we are looking for every value that belongs to the first solution set and the second. From the example above, we found x≥5 and x≤5. The only value that is simultaneously greater than or equal to 5and less than or equal to 5 is x=5 itself — so the solution is a single point.
Let's look at another example where the overlap is wider:
3x+2>−4and4x−1<15
First inequality:
3x+2>−4⟹3x>−6⟹x>−2
Second inequality:
4x−1<15⟹4x<16⟹x<4
The overlap is all values that are greater than−2and less than4. We can write this compactly as:
−2<x<4
This is a bounded region — the solution sits between two boundary values. Many "and" inequalities produce exactly this kind of result, with the variable squeezed between a lower bound and an upper bound.
A bounded region appears whenever one solved part gives a "greater than" condition and the other gives a "less than" condition, and those two conditions genuinely overlap. Think of it like a cooking temperature: if a recipe says the oven must be above 300°F and below 425°F, the acceptable temperatures form a bounded interval from 300 to 425.
When we write −2<x<4, the strict inequality signs tell us that x can be any value between −2 and 4, but not −2 or 4 themselves. If the original inequalities had used ≤ or ≥, those boundaries would be included, and the combined form would reflect that. Here is a quick reference:
Solved Parts
Combined Form
Boundaries
x>a and x<b
a<x<b
Both excluded
x≥a and x<b
a≤x<b
Left included, right excluded
x>a and x≤b
a<x≤b
Left excluded, right included
x≥a and x≤b
a≤x≤b
Both included
In every row, a must be less than b for a bounded region to exist. If aequalsb, check the endpoints: when both parts include the boundary (as in x≥a and x≤a), the overlap is the single value x=a; if either boundary is excluded, there is no overlap. And if a is greater thanb, we run into the situation described in the next section.
Not every "and" compound inequality has a solution. Consider:
x+3<1andx−2>5
First inequality:
x+3<1⟹x<−2
Second inequality:
x−2>5⟹x>7
Now we need a number that is less than−2and greater than7 at the same time. No such number exists! The two regions sit on opposite ends of the number line with no overlap between them.
When the solution sets do not intersect, we say the compound inequality has no solution. You may also see this written as the empty set, symbolized by ∅. A helpful rule of thumb: if one part says x<a and the other says x>b, and a is less than b, the two regions point away from each other and the answer is ∅.
Sometimes both parts of an "and" statement point in the same direction — both "greater than" or both "less than." In that case the two regions do not form a window between two bounds; instead, one region sits entirely inside the other. The overlap is simply the more restrictive condition.
Consider:
x>2andx>5
Every number greater than 5 is automatically greater than 2, but not every number greater than 2 is greater than 5. To satisfy both, a value must clear the higher bar, so the overlap is just x>5 — a single ray, not a bounded region.
The same logic applies to two "less than" conditions:
x<2andx<5⟹x<2
Here the smaller bound wins, because any number below 2 is already below 5. The takeaway: when an "and" statement has both parts facing the same way, the answer is one ray — the tighter of the two conditions — not a bounded segment and not the empty set.
Here is a mental checklist you can run through each time you face an "and" compound inequality:
Solve each inequality separately using inverse operations.
Compare the two results — does one give a lower bound and the other an upper bound?
Check the overlap. If the lower bound is less than the upper bound, write the combined inequality. If the bounds are equal, check endpoint inclusion — when both parts include the boundary, the solution is the single value x=a; otherwise it is ∅. If the lower bound is greater than the upper bound, the solution is ∅.
Carry the correct symbols. Use < or ≤ exactly as each solved part dictates.
If both solved parts point the same direction (both < or both >), there is no window to look for — just keep the more restrictive condition as your single-ray answer.
With practice, steps 2 through 4 will become almost automatic. The key habit to build is pausing after solving to ask, "Do these two regions actually share any common ground?"
In this lesson, you learned that solving an "and" compound inequality comes down to three actions: solve each part on its own, look for the overlap, and write the combined result — or recognize that no overlap exists. The overlap is often a bounded region where the variable is squeezed between two values, but when the two solution sets point away from each other, the result is the empty set ∅. And when both parts point the same direction, the overlap simplifies to a single ray — the more restrictive condition.
Up next is a set of hands-on exercises where you will identify overlapping regions, solve compound inequalities from scratch, spot the tricky no-solution and single-ray cases, and even apply the technique to a real-world cooking scenario. Let's put this knowledge into practice!