Skip to content

Inequality Solver with Steps and Interval Notation

Solve linear, compound, quadratic and rational inequalities, with interval notation, a sign chart and steps.

Your details

Inequality sign (?)

Results update as you type

Solution (interval notation)

(−∞, 2)

Set-builder notation
{x ∈ ℝ | x < 2}
On a number line
Open circle at 2, shaded to the left
Inequality solved
−2x + 5 > 1

Step-by-step solution
  1. Start: −2x + 5 > 1
  2. Move the x terms to the left and the constants to the right: −2x > −4
  3. Divide both sides by −2. Dividing by a negative number reverses the inequality sign: x < 2
  4. Solution: (−∞, 2)

An inequality compares two expressions with <<, ≤\le, >> or ≥\ge, 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 ax+b<cx+dax + b < cx + d, compound (double) inequalities p<ax+b≤qp < ax + b \le q, quadratic inequalities ax2+bx+c≥0ax^2 + bx + c \ge 0 and rational inequalities ax+bcx+d>0\frac{ax + b}{cx + d} > 0.

The answer comes in interval notation (with ∪\cup 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 1−21 - \sqrt{2} 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

  1. Pick the type of inequality: linear, compound, quadratic or rational.
  2. Choose the sign: <<, ≤\le, >> or ≥\ge. For a compound inequality, choose the left and right signs.
  3. Enter the coefficients. For 3−x≥2x3 - x \ge 2x, use the linear form with a=−1a = -1, b=3b = 3, c=2c = 2, d=0d = 0.
  4. Read the solution in interval notation, then the set-builder form and the number-line description.
  5. Open the steps and the sign chart to follow the reasoning, or to copy it into your work.

The formula

Linear. ax+b<cx+d  ⟺  (a−c) x<d−bax + b < cx + d \iff (a - c)\,x < d - b. Divide by k=a−ck = a - c: if k>0k > 0 the sign stays, if k<0k < 0 it reverses. If k=0k = 0 the inequality is either always true or never true.

Compound. Apply each operation to all three parts. From p<ax+b≤qp < ax + b \le q: subtract bb, then divide by aa; when a<0a < 0 both signs reverse and the bounds swap:

p−ba<x≤q−ba(a>0)\frac{p - b}{a} < x \le \frac{q - b}{a} \quad (a > 0)

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:

f(x)g(x)≥0  ⇒  keep intervals with sign +, plus the zeros of f\frac{f(x)}{g(x)} \ge 0 \;\Rightarrow\; \text{keep intervals with sign } +,\ \text{plus the zeros of } f

For ax2+bx+cax^2 + bx + c the zeros come from x=−b±b2−4ac2ax = \frac{-b \pm \sqrt{b^2 - 4ac}}{2a}. With a negative discriminant the sign never changes: it is the sign of aa everywhere.

Worked example

Linear. −2x+5>1⇒−2x>−4-2x + 5 > 1 \Rightarrow -2x > -4. Dividing by −2-2 reverses the sign: x<2x < 2, so the solution is (−∞,2)(-\infty, 2).

Compound. −3<2x+1≤7-3 < 2x + 1 \le 7. Subtract 1 everywhere: −4<2x≤6-4 < 2x \le 6; divide by 2: −2<x≤3-2 < x \le 3, i.e. (−2,3](-2, 3].

Quadratic. x2−5x+6≤0x^2 - 5x + 6 \le 0 factors as (x−2)(x−3)≤0(x - 2)(x - 3) \le 0. Test values give ++ on (−∞,2)(-\infty, 2), −- on (2,3)(2, 3) and ++ on (3,∞)(3, \infty); the roots are included, so the answer is [2,3][2, 3].

Rational. x−1x+2≥0\frac{x - 1}{x + 2} \ge 0. Critical points are x=1x = 1 (numerator) and x=−2x = -2 (excluded). The quotient is positive left of −2-2 and right of 11, so the answer is (−∞,−2)∪[1,∞)(-\infty, -2) \cup [1, \infty).

Solving compound inequalities

A compound inequality such as −3<2x+1≤7-3 < 2x + 1 \le 7 is two inequalities joined by "and": −3<2x+1-3 < 2x + 1 and 2x+1≤72x + 1 \le 7. 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 x<−1x < -1 or x>4x > 4, 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
x<ax < a (−∞,a)(-\infty, a) Open circle at aa, shade left
x≥ax \ge a [a,∞)[a, \infty) Closed dot at aa, shade right
a<x≤ba < x \le b (a,b](a, b] Open at aa, closed at bb
x<ax < a or x>bx > b (−∞,a)∪(b,∞)(-\infty, a) \cup (b, \infty) Two rays
every real xx (−∞,∞)(-\infty, \infty) 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

Last updated:

More Math calculators

People also use