Compound Inequality Calculator
This compound inequality calculator solves "and" and "or" inequalities, including double inequalities like −3 < 2x + 1 ≤ 7. It shows every algebra step and gives the answer in inequality form, in interval notation, and on a number line.
Solve a compound inequality
AND: both conditions must be true (intersection ∩). OR: at least one condition must be true (union ∪).
Type a double inequality, or join two inequalities with "and" / "or". Use <= and >= (or ≤, ≥).
Solution:
Steps:
How to use the compound inequality calculator
- Type the problem exactly as it appears, for example -3 < 2x + 1 <= 7 or x < -1 or x >= 4.
- Each part can be any linear inequality in x, including fractions and parentheses such as (3 - x)/2 >= 1.
- Press Solve with Steps. Each part is solved on its own, then the parts are combined with an intersection (and) or a union (or).
- Copy the answer in whichever form your class uses: inequality, interval notation, or the number line graph.
How compound inequalities work
Solving each part uses the same rules as a single linear inequality: add or subtract the same amount on both sides, and multiply or divide both sides by the same number. The one special rule is that multiplying or dividing by a negative number reverses the inequality sign.
After both parts are solved, the connecting word decides how they combine:
- AND (∩): keep only the overlap. x > −2 and x ≤ 3 overlap between −2 and 3, giving (−2, 3]. If there is no overlap, there is no solution.
- OR (∪): keep everything either part allows. x < −1 or x ≥ 4 gives two rays, (−∞, −1) ∪ [4, ∞). If the rays cover the whole line, the answer is all real numbers.
A double inequality such as −3 < 2x + 1 ≤ 7 is an AND statement. You can split it into −3 < 2x + 1 and 2x + 1 ≤ 7, or solve all three parts at once, which is usually faster.
Worked examples
Worked example 1: −3 < 2x + 1 ≤ 7
Subtract 1 from all three parts: −4 < 2x ≤ 6. Divide all three parts by 2: −2 < x ≤ 3. −2 is excluded and 3 is included. Answer: (−2, 3].
Worked example 2: x < −1 or x ≥ 4
Both parts are already solved. "Or" means union: every number less than −1 together with every number from 4 upward. Answer: (−∞, −1) ∪ [4, ∞).
Worked example 3: 4 ≤ −2x + 6 < 10
Subtract 6 from all parts: −2 ≤ −2x < 4. Divide all parts by −2 and reverse both signs: 1 ≥ x > −2. Rewrite from smallest to largest: −2 < x ≤ 1. Answer: (−2, 1].
Worked example 4: 3x − 5 > 4 or 2x + 1 ≤ −3
First part: 3x > 9, so x > 3. Second part: 2x ≤ −4, so x ≤ −2. Take the union. Answer: x ≤ −2 or x > 3, which is (−∞, −2] ∪ (3, ∞).
Worked example 5: x + 2 > 7 and 3x ≤ 6
First part: x > 5. Second part: x ≤ 2. No number is both greater than 5 and at most 2, so the intersection is empty. Answer: no solution (∅).
Common mistakes to avoid
- Reversing only one sign. When you divide a double inequality by a negative number, both signs flip, as in Example 3.
- Operating on only two of the three parts. In −3 < 2x + 1 ≤ 7, subtracting 1 from the middle means subtracting 1 from the left and right parts too.
- Mixing up AND and OR. "And" gives the overlap (∩); "or" gives everything covered (∪). Writing (−1, 4) for x < −1 or x ≥ 4 describes exactly the numbers that are not solutions.
- Writing impossible chains. "2 < x > 5" is not a valid double inequality. Both signs in a chain must point the same way; otherwise write two separate inequalities.
- Getting endpoint brackets wrong. Use [ ] only for ≤ and ≥, and always use a parenthesis next to ∞ or −∞.
Frequently asked questions
What is a compound inequality?
A compound inequality is two inequalities joined by "and" or "or", such as x > −2 and x ≤ 3, or x < −1 or x ≥ 4. A double inequality like −3 < 2x + 1 ≤ 7 is a compact way to write an "and" compound inequality.
What is the difference between "and" and "or" compound inequalities?
An "and" inequality keeps only the numbers that satisfy both conditions, which is the intersection (∩) of the two solution sets and usually one interval. An "or" inequality keeps every number that satisfies at least one condition, which is the union (∪) and often two separate pieces.
How do you solve a double inequality like a < bx + c < d?
Do the same operation to all three parts at once. Subtract c from every part, then divide every part by b. If b is negative, reverse both inequality signs, then rewrite the result from smallest to largest. For −3 < 2x + 1 ≤ 7: subtract 1 to get −4 < 2x ≤ 6, then divide by 2 to get −2 < x ≤ 3.
When does a compound inequality have no solution?
An "and" inequality has no solution when the two conditions do not overlap. For example, x > 5 and x ≤ 2 cannot both be true, so the solution set is empty (∅). An "or" inequality only has no solution if both parts have no solution on their own.
When is the answer all real numbers?
An "or" inequality covers every real number when its two pieces overlap or touch across the whole line. For example, x > 1 or x < 4 is true for every x, so the answer is (−∞, ∞). An "and" inequality rarely gives all real numbers unless both parts are always true.
How do you graph a compound inequality on a number line?
Graph each part, then combine. For "and", shade only where the graphs overlap; for "or", shade everything that either graph covers. Use an open circle for < or > and a filled circle for ≤ or ≥. The calculator above draws this number line for you.
Stuck on a word problem?
Snap a photo and get step-by-step help setting up and solving inequality word problems.
Snap a photo and get step-by-step help →How compound inequalities work
Formula
AND = intersection; OR = union
An AND statement keeps values satisfying both conditions, while an OR statement keeps values satisfying either condition.
Worked example
x > 1 and x ≤ 5 becomes (1, 5]; x < 1 or x ≥ 5 becomes (−∞, 1) ∪ [5, ∞).
Common mistake
Reverse the inequality sign when multiplying or dividing both sides by a negative number.