Inequality and Absolute Value Equation Solver with Number Line
Type inequalities like |2x − 3| ≤ 5 or x² − 5x + 6 ≥ 0 and get the solution set in interval notation, set-builder form and on a number line, with case-by-case working.
Runs in your browser. Your files never leave your device. See how to check
…
How to do it
- 1Type the problem
Enter the inequality using <, <=, >, >=, = and |…| for absolute values.
- 2Read the solution set
See the interval notation, set-builder form and shaded number line.
- 3Follow the cases
Read the working, including sign flips, roots, sign charts or absolute value cases.
- 4Check with test values
Use the listed test values to confirm which regions belong to the solution.
- 5Keep a homework list
Add your questions in Homework list, each with its own number line and working.
- 6Practise
Choose a level and answer in interval notation or with inequalities.
About this tool
Inequalities look like equations but behave differently: dividing by a negative number flips the sign, a quadratic can be positive on two separate pieces of the line, and an absolute value splits a problem into cases. This solver handles linear inequalities, quadratic and higher polynomial inequalities, compound inequalities such as −3 < 2x + 1 ≤ 7, conditions joined with "and" or "or", and absolute value inequalities and equations, including ones with absolute values on both sides or x outside the bars. The answer is given in interval notation, in set-builder notation and on a number line with filled dots for included endpoints and open dots for excluded ones. The working shows each step: moving terms, dividing and flipping the sign when needed, finding roots with the quadratic formula and testing each region, or splitting the line at the critical points of every absolute value and solving piece by piece. A homework list and a practice mode that marks answers in either notation complete the workbench.
Who this is for
Algebra 1 and 2, GCSE and A-level students, college algebra and precalculus classes, and anyone who needs to turn an inequality into interval notation correctly.
Linear and compound inequalities
Collect the x terms on one side and the numbers on the other, then divide by the coefficient of x. If that coefficient is negative the inequality sign reverses, because multiplying both sides by a negative number reverses their order. A compound inequality such as −3 < 2x + 1 ≤ 7 is two inequalities that must both hold; the solution is their intersection, here −2 < x ≤ 3, written (−2, 3].
Quadratic inequalities
Bring everything to one side, find the roots of the quadratic, then test one value in each region of the number line. For x² − 5x + 6 ≥ 0 the roots are 2 and 3; the expression is positive outside them, so the solution is (−∞, 2] ∪ [3, ∞). Irrational roots are kept exact, as in 1 ± √2.
Absolute values
|u| < k means −k < u < k, a single interval, while |u| > k means u < −k or u > k, two rays. For anything more complicated, the solver finds where each expression inside the bars equals zero, splits the line there, replaces each |u| by u or −u on each piece and solves an ordinary inequality, then checks the critical points themselves. This method works for |x − 1| < |x − 5| and |2x − 1| ≥ x + 2 alike.
Worked example
Solve |2x − 3| ≤ 5. This means −5 ≤ 2x − 3 ≤ 5. Add 3: −2 ≤ 2x ≤ 8. Divide by 2: −1 ≤ x ≤ 4. In interval notation the answer is [−1, 4], drawn with filled dots at −1 and 4. For |x + 1| > 3: x + 1 < −3 or x + 1 > 3, so x < −4 or x > 2, written (−∞, −4) ∪ (2, ∞).
Limits
Only the variable x is supported, with polynomials up to degree 4. Rational inequalities with x in a denominator and nested absolute values are not handled, and roots of cubic and quartic expressions are found numerically, so they are shown as decimals rather than exact forms.
Worked example
|2x − 3| ≤ 5 gives [−1, 4]. |x + 1| > 3 gives (−∞, −4) ∪ (2, ∞). x² − 5x + 6 ≥ 0 gives (−∞, 2] ∪ [3, ∞).
Quick facts
- Category: Math & Science
- Works in your browser, no sign-up, no upload.
- Your input stays on your device.
- Available in English.
- Content last reviewed:
- Official source: OpenStax Intermediate Algebra 2e, section 2.7 Solve Absolute Value Inequalities
Frequently asked questions
Why does the inequality sign flip when I divide by a negative?
Multiplying or dividing by a negative number reverses the order of numbers on the line: 2 < 3, but −2 > −3. The sign must flip to stay true.
What is the difference between ( and [ in interval notation?
A square bracket means the endpoint is included (≤ or ≥) and is drawn as a filled dot. A round bracket means it is excluded (< or >) and is drawn as an open dot. Infinity always takes a round bracket.
When is an absolute value inequality one interval and when is it two?
|u| < k (less than) gives one interval between −k and k. |u| > k (greater than) gives two separate rays pointing outwards.
What if the right side is negative, as in |x| < −1?
An absolute value is never negative, so |x| < −1 has no solution, while |x| > −1 is true for every real number.
How should I type my practice answers?
Either interval notation, such as (-inf, 3] U (5, inf), or inequalities joined with "or", such as x <= 3 or x > 5. Both are compared exactly, including the type of each endpoint.
Can I solve an equation instead of an inequality?
Yes. Use = and the solver lists the solutions as single points, for example |x − 2| = 5 gives x = −3 or x = 7.
