An inequality compares two expressions with , , or , and its solution is usually a whole range of numbers rather than a single value. This inequality solver handles the four types met in algebra courses: linear inequalities , compound (double) inequalities , quadratic inequalities and rational inequalities .
The answer comes in interval notation (with for unions), in set-builder notation, and as a plain description of how to draw it on a number line: open circles for excluded endpoints, closed dots for included ones. Irrational endpoints such as are kept exact, with decimal values beside them.
It works as an inequality calculator with steps. You see each move: collecting terms, the sign flip when dividing by a negative number, the operations applied to all three parts of a compound inequality, and for quadratic and rational inequalities a full sign chart with a test value in every interval and the points that must be excluded because the denominator vanishes.
How to use this calculator
- Pick the type of inequality: linear, compound, quadratic or rational.
- Choose the sign: , , or . For a compound inequality, choose the left and right signs.
- Enter the coefficients. For , use the linear form with , , , .
- Read the solution in interval notation, then the set-builder form and the number-line description.
- Open the steps and the sign chart to follow the reasoning, or to copy it into your work.
The formula
Linear. . Divide by : if the sign stays, if it reverses. If the inequality is either always true or never true.
Compound. Apply each operation to all three parts. From : subtract , then divide by ; when both signs reverse and the bounds swap:
Quadratic and rational. Put everything on one side and compare with 0. Find the critical points: zeros of the numerator, and zeros of the denominator, which are always excluded. Between consecutive critical points the sign cannot change, so one test value per interval decides it:
For the zeros come from . With a negative discriminant the sign never changes: it is the sign of everywhere.
Worked example
Linear. . Dividing by reverses the sign: , so the solution is .
Compound. . Subtract 1 everywhere: ; divide by 2: , i.e. .
Quadratic. factors as . Test values give on , on and on ; the roots are included, so the answer is .
Rational. . Critical points are (numerator) and (excluded). The quotient is positive left of and right of , so the answer is .
Solving compound inequalities
A compound inequality such as is two inequalities joined by "and": and . When solving compound inequalities, keep the three parts together and apply each operation to all of them. The result is a single bounded interval, or the empty set if the lower bound ends up above the upper one.
Inequalities joined by "or", such as or , give a union of intervals instead. That is the kind of answer quadratic and rational inequalities often produce.
From inequality to interval notation
| Inequality | Interval notation | Number line |
|---|---|---|
| Open circle at , shade left | ||
| Closed dot at , shade right | ||
| Open at , closed at | ||
| or | Two rays | |
| every real | Whole line |
Infinity always gets a parenthesis, because it is never reached. To compare two given numbers instead, see the greater than or less than calculator.
Frequently asked questions
Why does the inequality sign flip when I divide by a negative number?
Multiplying or dividing by a negative number reverses the order of the number line: 2 < 3 but −2 > −3. To keep the statement true, the sign must reverse too.
How do I solve a rational inequality?
Move everything to one side so it is compared with 0, find where the numerator and the denominator are zero, and test one value in each interval between those points. Zeros of the denominator are always excluded, even with ≤ or ≥.
Can I multiply both sides of a rational inequality by the denominator?
Only if you know its sign. Since cx + d changes sign, multiplying by it would require splitting into cases; the sign chart method avoids that mistake.
What if a quadratic has no real roots?
Then it never crosses zero and keeps the sign of a for every x. For example x² + 1 > 0 is true for all real numbers, while x² + 1 < 0 has no solution.
What is the difference between ( and [ in interval notation?
A parenthesis means the endpoint is excluded (strict < or >); a square bracket means it is included (≤ or ≥). Infinity always takes a parenthesis.
Sources
- OpenStax, College Algebra 2e — §2.7 Linear Inequalities and Absolute Value Inequalities
- OpenStax, Intermediate Algebra 2e — §2.6 Solve Compound Inequalities
- OpenStax, Intermediate Algebra 2e — §9.8 Solve Quadratic Inequalities
- OpenStax, Intermediate Algebra 2e — §7.6 Solve Rational Inequalities
- Weisstein, Interval Notation — Wolfram MathWorld
Last updated: