What this inequality solver does
It solves linear inequalities like 3x + 4 < x − 2 and quadratic inequalities like x² − 5x + 6 < 0, one step at a time. You get the answer as an inequality, in interval notation and on a number line, with a check you can do by hand. Fractions are kept exact.
How linear inequalities are solved
Solve them like equations: get the x terms on one side and the numbers on the other. There's one extra rule.
Why? Multiplying by a negative number reverses the order of numbers on the number line. 2 < 5 is true, but after multiplying by −1 you get −2 and −5, and −2 is bigger. So −2 > −5. Adding or subtracting never flips the sign, and neither does multiplying or dividing by a positive number.
Worked example
Solve −2x + 5 ≥ 11.
- Subtract 5 from both sides: −2x ≥ 6.
- Divide both sides by −2. It's negative, so ≥ becomes ≤: x ≤ −3.
- In interval notation: (−∞, −3]. The bracket means −3 is included.
- Check with x = −4: −2(−4) + 5 = 13, and 13 ≥ 11 is true.
How quadratic inequalities are solved
Move everything to one side so you're comparing ax² + bx + c with 0. If a is negative, multiply everything by −1 and flip the sign, so the parabola opens upward. Then:
- Find the roots of ax² + bx + c = 0 with the quadratic formula, x = (−b ± √(b² − 4ac)) ÷ 2a.
- The roots split the number line into intervals. The sign of the expression can only change at a root.
- Test one point in each interval, and keep the intervals with the sign you want.
For x² − 5x + 6 < 0 the roots are 2 and 3. Testing x = 0 gives 6 (positive), x = 2.5 gives −0.25 (negative) and x = 4 gives 2 (positive). So the answer is 2 < x < 3, or (2, 3).
| Upward parabola, roots r₁ < r₂ | Solution |
|---|---|
| < 0 | (r₁, r₂) |
| ≤ 0 | [r₁, r₂] |
| > 0 | (−∞, r₁) ∪ (r₂, ∞) |
| ≥ 0 | (−∞, r₁] ∪ [r₂, ∞) |
| No real roots, > 0 or ≥ 0 | All real numbers |
| No real roots, < 0 or ≤ 0 | No solution |
Interval notation in one minute
A parenthesis ( ) means the endpoint isn't included (< or >). A square bracket [ ] means it is (≤ or ≥). Infinity always gets a parenthesis, because it isn't a number you can reach. ∪ joins two pieces.
Limitations
- One variable, x, with a linear or quadratic expression. Rational inequalities (x in a denominator), absolute values and systems of inequalities aren't covered.
- Coefficients can be whole numbers or decimals up to about a trillion. Answers stay exact; irrational roots are shown in square-root form with a decimal value.