You have made it to the fourth lesson of Solving Compound Inequalities, and the finish line for this unit is in sight! Over the past three lessons, you mastered the difference between "and" and "or," solved "and" inequalities by finding overlapping regions, and streamlined bounded solutions using three-part chains. Every one of those skills dealt with intersection — the place where two conditions meet.
This lesson flips the perspective entirely. We now tackle "or" compound inequalities, where a value only needs to satisfy one of the two conditions. Instead of looking for overlap, we combine both solution sets into a larger set called a union. You will learn to solve each part independently, merge the results, and determine whether the union breaks into two separate pieces or stretches across all real numbers.
Thinking in Unions
Recall from the first lesson that the word "or" means a value must satisfy at least one of the two conditions. If either inequality accepts a number, that number is part of the solution set. This contrasts with "and," which demanded that a number pass both tests simultaneously.
A helpful way to picture this: imagine two spotlights on a stage, each illuminating a different region. With "and," we only care about the area where both beams overlap. With "or," we care about every point touched by at least one beam. The combined lit area is the union of the two individual regions.
This mental image has a practical payoff. Many real-world rules use "or" logic — a smoke detector triggers when smoke is detected or when carbon monoxide is detected. The alarm does not need both dangers present; one alone is enough. That same logic drives the math we are about to explore.
Solving Each Part Separately
Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal
To solve an "or" compound inequality, we handle each inequality on its own, find its solution, and then bring the two solutions together. Let's work through an example:
2x−1<5or3x+4>19
Part 1 — Solve2x−1<5:
2x<6⇒x<3
Part 2 — Solve3x+4>19:
3x>15⇒x>5
Combine: The solution is x<3orx>5. A value belongs to the final set if it lands in either piece. For instance, x=1 works because it is less than 3, and x=7 works because it is greater than 5. However, x=4 does not work because it fails both conditions — it is neither less than 3 nor greater than 5.
Two Separate Pieces
When the Union Covers All Real Numbers
When Both Parts Point the Same Direction
A Practical Example: Temperature Alerts
Common Pitfalls
Before heading into practice, keep these frequent mistakes in mind:
Pitfall
Why it happens
How to avoid it
Intersecting instead of uniting
Habits from "and" problems carry over
Remember: "or" gathers everything from both sets
Skipping steps on one part
Rushing to combine before fully solving
Isolate the variable in each inequality first
Missing the all-real-numbers case
Not checking whether the two sets overlap
Compare the boundaries — if there is no gap, the answer is all real numbers
Forcing two pieces on a same-direction "or"
Assuming "or" always makes two rays
If both parts face the same way, keep the more inclusive one — the answer is a single ray
Conclusion and Next Steps
In this lesson, you learned to solve "or" compound inequalities by working each part independently and merging the results into a union. When the two solution sets do not touch, the answer forms two separate pieces. When they overlap enough to leave no gap, the answer is all real numbers — and recognizing that distinction is the single most important skill from this lesson. And when both parts point the same direction, the union simplifies to a single ray — the more inclusive condition.
Up next, you will practice these ideas hands-on: identifying union pieces, solving "or" inequalities from scratch, spotting the all-real-numbers and single-ray cases, and setting up a thermostat alert scenario on your own. Let's jump in and make these skills stick!
In the example above, the two individual solutions do not touch each other. Everything less than 3 forms one piece, and everything greater than 5 forms another. The gap between 3 and 5 belongs to neither set.
This two-piece pattern is the most common outcome for "or" inequalities. On a number line, you see two rays pointing in opposite directions with a gap in between. This shape is called a disjoint union, meaning the two parts share no values.
Here is a quick checklist for confirming this pattern:
Solve each inequality for the variable.
Compare the two results. If one gives x<a and the other gives x>b with a≤b, the pieces are separated by a gap.
Write the final answer as the two conditions joined by "or."
Not every "or" inequality produces two separate pieces. Sometimes the individual solutions overlap so thoroughly that every real number satisfies at least one condition. Consider this example:
4x+1≤13or2x−3≥−1
Part 1 — Solve4x+1≤13:
4x≤12⇒x≤3
Part 2 — Solve2x−3≥−1:
2x≥2⇒x≥1
Combine: The first part covers every number from 3 on down, and the second part covers every number from 1 on up. Together, these two sets leave no gap because the region 1≤x≤3 is claimed by both parts. Every real number falls into at least one of the two sets, so the solution is all real numbers.
The key signal is the direction of overlap. When one solution extends to the right past the point where the other begins on the left, their union fills the entire number line. In general, if one part gives x≤a and the other gives x≥b with b≤a, there is no gap and the answer is all real numbers. Whenever you see this pattern, you can stop — there is nothing left to exclude.
Just as with "and," an "or" statement can have both parts pointing the same direction — both "greater than" or both "less than." This time, because "or" accepts a value that satisfies at least one condition, the union is the less restrictive condition — the ray that already contains the other.
Consider:
x>2orx>5
Any number greater than 5 is also greater than 2, so the second region sits entirely inside the first. A value only needs to satisfy one condition, and the wider region x>2 already captures everything in x>5. The union is simply x>2 — a single ray, not two separate pieces and not all real numbers.
The same holds for two "less than" conditions:
x<2orx<5⟹x<5
Here the larger bound wins, because everything below 2 is already included in everything below 5. So when an "or" statement has both parts facing the same way, keep the more inclusive condition as your single-ray answer.
"Or" inequalities appear naturally in monitoring systems. Suppose a warehouse thermostat triggers an alert when the temperature drops below50°F or rises above85°F. If the current temperature in Fahrenheit is T, the alert fires when:
T<50orT>85
Because each part is already solved for T, we go straight to combining. The alert range is every temperature less than50 together with every temperature greater than85. Temperatures between 50 and 85 inclusive form the "safe zone" and do not trigger the alert.
Notice the classic two-piece structure: one piece extends to the left (cold side) and one extends to the right (hot side), with a comfortable gap in the middle. Any time a system watches for values that are "too low" or "too high," the resulting inequality naturally forms two separate regions. If, however, the thresholds were reversed — say, the alert fired when T<85 or T>50 — the two solution sets would overlap and the alert would fire at every temperature, which is the all-real-numbers case in disguise.