Inequality Calculator — Linear & Compound, Step-by-Step
Solve linear and compound linear inequalities step by step. Automatic sign-flip handling on negative multiplication/division, plus correct interval notation.
Enter the inequality a·x + b < c — for example a = -2, b = 3, operator <, c = 7 means -2x + 3 < 7.
Solving — Step by Step
Original inequality:
-2x + 3 < 7
Subtract b from both sides
-2x < 4
Divide both sides by a (-2) — negative, so the inequality flips
Dividing by a negative number reverses the inequality: < becomes >
x > -2
Solution (interval notation):
x > -2 → (-2, ∞)
Solves standard linear inequalities (ax + b vs. c, using <, >, ≤, or ≥) and compound linear inequalities (a < mx + b < c). Multiplying or dividing both sides by a negative number flips the inequality direction — this calculator always shows that step explicitly. Not intended for quadratic, absolute-value, or multi-variable inequalities. For differentiating composite functions instead of solving inequalities, see the companion Chain Rule Calculator.
Reference Values
Last verified:| Category | Range | What It Means | Status |
|---|---|---|---|
| Adding or subtracting a term | No flip | Adding or subtracting the same number from both sides of an inequality never changes which direction the inequality symbol points. | Good |
| Multiplying/dividing by a positive number | No flip | Multiplying or dividing both sides by a positive number preserves the inequality's direction, just like solving an equation. | Good |
| Multiplying/dividing by a negative number ★ | **Flip required** | The inequality symbol must reverse direction (< becomes >, ≤ becomes ≥, and vice versa) any time you multiply or divide both sides by a negative number. This is the single most common error students make when solving linear inequalities. | ★ Best |
| Strict inequality (< or >) | Parenthesis ( ) | Interval notation uses a parenthesis on any boundary that is NOT included in the solution set — the value is approached but never reached. | Good |
| Non-strict inequality (≤ or ≥) | **Square bracket [ ]** | Interval notation uses a square bracket on any boundary that IS included in the solution set. | Good |
| Infinity (∞ or −∞) ★ | **Always a parenthesis** | Infinity is a concept, not a reachable number, so it is always written with a parenthesis in interval notation — never a square bracket — regardless of whether the inequality itself is strict or non-strict. | ★ Best |
Source: Sign-flip rule and interval notation convention cross-checked against Pearson Channels' linear inequalities lessons (channels.pearson.com) and LibreTexts Mathematics, "Inequalities, Number Lines, and Interval Notation."
Worked Examples
Simple Inequality — No Sign Flip
- Inequality
- 3x + 4 < 19
Subtract 4 from both sides: 3x < 15. Divide by 3 — since 3 is positive, the symbol stays the same: x < 5.
Simple Inequality — Sign Flip Required
- Inequality
- -2x + 5 ≥ -3
Subtract 5 from both sides: -2x ≥ -8. Divide by -2 — because we're dividing by a negative number, ≥ flips to ≤: x ≤ 4.
Simple Inequality — Strict, No Flip
- Inequality
- 5x - 7 > 3
Add 7 to both sides: 5x > 10. Divide by 5 — positive coefficient, no flip: x > 2.
Simple Inequality — Sign Flip with Negative Coefficient
- Inequality
- -4x - 1 ≤ 11
Add 1 to both sides: -4x ≤ 12. Divide by -4 — dividing by a negative flips ≤ to ≥: x ≥ -3.
Compound Inequality — Sign Flip on All Three Parts
- Compound Inequality
- -4 < -3x + 2 ≤ 11
Subtract 2 from all three parts: -6 < -3x ≤ 9. Divide all three by -3 — both inequality symbols flip: 2 > x ≥ -3. Reordering ascending gives -3 ≤ x < 2.
How to Use This Calculator
- 1
Choose Simple or Compound mode
Simple mode solves ax + b compared to c. Compound mode solves a < mx + b < c, where the variable is sandwiched between two bounds.
- 2
Enter the coefficients and operator
For simple mode: a, b, the comparison operator (<, >, ≤, ≥), and c. For compound mode: the left bound L, m, b, the right bound R, and the two operators.
- 3
Read each algebra step
The calculator shows subtracting the constant, then dividing by the coefficient, exactly like solving by hand.
- 4
Watch for the flip warning
If the coefficient you divide by is negative, a red flip notice appears explaining exactly which symbol changed and why.
- 5
Read the interval notation result
The final answer is shown both as an inequality (like x > -3) and in interval notation (like (-3, ∞)), using parentheses for strict bounds and brackets for inclusive bounds.
What Each Value Means
- Sign-Flip Rule (rule)
- The algebra rule stating that multiplying or dividing both sides of an inequality by a negative number reverses the inequality's direction (< ↔ >, ≤ ↔ ≥), while addition and subtraction never do.
- Interval Notation (notation)
- A compact way to write an inequality's solution set as a range of numbers, using parentheses for excluded (strict) boundaries and square brackets for included (non-strict) boundaries — infinity always gets a parenthesis.
- Compound Inequality (expression)
- An inequality with three parts chained together (a < mx + b < c), meaning the middle expression must satisfy both bounds at once. Solved by applying the same operation to all three parts simultaneously.