Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Linear Inequality Solver

<

Solve linear inequalities step by step

Enter inequality...
Var
Num
Op
Ineq

Select an inequality type or enter your own, then click Solve to see the step-by-step solution.






Getting Started

The solver shows an inequality display at the top with a blinking yellow caret marking the cursor position. Click anywhere in the display to place the cursor, or use arrow keys, Home, and End for keyboard navigation. Type directly or use the button panel below.

Three quick experiments:

&bull; Type 2x+3<112x + 3 < 11 and press Enter &mdash; the right panel shows the isolation steps and the answer x<4x < 4 together with the interval (,4)(-\infty, 4).
&bull; Click the &quot;Negative Coefficient&quot; example template &mdash; an inequality with a negative coefficient on the variable loads. Watch the solver flip the inequality sign during the divide-by-negative step.
&bull; Try the &quot;Always True&quot; template to see the case where the variable cancels and the inequality reduces to a true statement, giving all real numbers as the solution.

The Solve button is disabled until you enter something. Pressing Enter on the display is equivalent to clicking Solve. The dedicated &quot;Ineq&quot; row in the button panel inserts the four inequality symbols: <<, >>, \leq, \geq.

Building Inequalities with Buttons and Keyboard

The button panel groups inputs by type. All inputs can be made either by clicking or typing on the keyboard.

&bull; Variable row &mdash; xx, yy, nn.
&bull; Number row &mdash; digits 0 through 9 and the decimal point.
&bull; Operator row &mdash; multiplication, division, plus, minus.
&bull; Ineq row &mdash; the four inequality symbols, highlighted in amber to distinguish them from the binary operators.
&bull; Bracket row &mdash; parentheses for grouping subexpressions.

Keyboard shortcuts: type letters and digits directly, use star or slash for multiplication and division, type << and >> directly, type <=<= or >=>= to insert the combined symbols \leq and \geq, and press Enter to solve. Ctrl+Z undoes up to fifty edits back; Backspace deletes the character before the cursor; Delete removes the one after it.

The Clear button empties the display entirely; the curved-arrow button steps through the undo stack one edit at a time. The backspace icon on the action row deletes one character to the left of the cursor.

Try an Example — Eight Form Templates

Click the &quot;Try an Example&quot; header to expand the template panel. Each card generates a random inequality of that form. Clicking again produces a new random version.

&bull; One Step &mdash; x+a<bx + a < b. Single addition or subtraction move to isolate.
&bull; Two Step &mdash; ax+b>cax + b > c. Two moves: subtract the constant, then divide by the coefficient.
&bull; Negative Coefficient &mdash; ax+bc-ax + b \leq c. Exercises the direction-flip rule during the divide step.
&bull; Variables Both Sides &mdash; ax+bcx+dax + b \geq cx + d. Requires first collecting the variable terms on one side.
&bull; Distributive &mdash; a(x+b)<ca(x + b) < c. Tests distribution before isolation.
&bull; Negative Distributive &mdash; a(x+b)>c-a(x + b) > c. Both distribution and direction-flip together.
&bull; Fraction Coefficient &mdash; x/a+bcx/a + b \leq c. The coefficient appears as a division by aa, but division by a positive constant does not flip direction.
&bull; Always True &mdash; ax+b<ax+cax + b < ax + c with b<cb < c. The variable cancels and the inequality reduces to a true constant statement.

Roughly 80 percent of generated inequalities produce clean integer solutions; the remaining 20 percent exercise unusual or decimal cases.

Reading the Step-by-Step Solution

The solution panel shows each algebraic move as a labeled step. The labels reflect what the solver did, not just what the result is.

&bull; Identify Terms &mdash; restates the inequality with the variable coefficient and the constant on each side called out explicitly.
&bull; Move Variable Terms to Left (when both sides contain the variable) &mdash; collects the variable on the left side.
&bull; Move Constants to Right &mdash; isolates the variable term on the left and the constant on the right.
&bull; Divide by Negative Coefficient (when applicable) &mdash; explicitly notes that the inequality direction flips because the coefficient is negative.
&bull; Divide by Coefficient (when positive and not 1) &mdash; standard division with no flip.
&bull; Always True or Never True (when applicable) &mdash; the variable cancels and the remaining statement determines whether all real numbers or no values satisfy the inequality.

The final-answer card at the bottom shows the answer in three forms: the inequality form (x<cx < c), a plain-language note (&quot;xx is less than cc&quot;), and the interval notation (such as (,c)(-\infty, c)). For empty solution sets the interval is the empty set \emptyset; for all reals it is (,)(-\infty, \infty).

The Direction-Flip Rule — Why It Works

Inequalities behave like equations under addition and subtraction but differently under multiplication and division by a negative number.

The principle. Negation reverses order on the number line. If a<ba < b then a>b-a > -b. The smaller number, once negated, becomes the larger. Multiplying or dividing both sides of an inequality by a negative number applies this negation, so the comparison direction must flip to preserve truth.

Example. Start with 3<53 < 5 &mdash; clearly true. Multiply both sides by 2-2. Without flipping: 6<10-6 < -10, false. With flipping: 6>10-6 > -10, true. The flip is required for the inequality to remain valid.

In linear inequality solving the rule applies whenever you divide by the coefficient of the variable and that coefficient is negative. For 3x+7<16-3x + 7 < 16, subtract 7 to get 3x<9-3x < 9, then divide by 3-3 and flip: x>3x > -3. The solver shows this step explicitly so the flip is never missed.

What does not flip. Adding or subtracting any number on both sides preserves direction. Multiplying or dividing by a positive number preserves direction. So the only operation that flips direction is multiplication or division by a negative number.

Special case &mdash; multiplication by zero. Multiplying both sides by zero collapses both sides to zero and produces 0=00 = 0, which is true but uninformative. Avoid this move entirely; the solver never inserts it.

For deeper coverage see linear inequality and inequality properties.

What is a Linear Inequality?

A linear inequality is a comparison between two linear expressions using one of the four symbols <<, >>, \leq, \geq. The general form in one variable is

ax+b    cax + b \;\square\; c


where \square is one of the four symbols and aa, bb, cc are real numbers with a0a \neq 0. The variable xx appears only to the first power, never squared, cubed, in a denominator, or inside an absolute value.

Solution form. Every linear inequality has one of three solution shapes:

&bull; A ray &mdash; the most common case. The solution is everything to one side of a boundary point, like x<4x < 4 or x2x \geq -2.
&bull; All real numbers &mdash; the variable cancels and the remaining statement is true (an identity).
&bull; No solution &mdash; the variable cancels and the remaining statement is false (a contradiction).

Strict versus non-strict. The strict inequalities << and >> exclude the boundary point; the non-strict \leq and \geq include it. In interval notation the boundary is shown with a parenthesis (excluded) or a bracket (included).

Compound forms. Two linear inequalities can be joined by AND (both must hold &mdash; the solution is an intersection) or by OR (either may hold &mdash; the solution is a union). This solver handles single inequalities; chained or compound forms are covered separately.

For deeper coverage see linear inequality, interval notation, and compound inequality.

The Solving Process Explained

Four moves solve any linear inequality. The first three are identical to linear-equation moves; the fourth is the inequality-specific step.

&bull; Move 1: Distribute brackets. Expand any parenthesized terms. 2(x3)<82(x - 3) < 8 becomes 2x6<82x - 6 < 8.

&bull; Move 2: Collect variable terms on one side. Add or subtract the variable term to put all xx terms on the left (or right; either works). 3x1x+53x - 1 \geq x + 5 becomes 2x152x - 1 \geq 5 after subtracting xx.

&bull; Move 3: Collect constant terms on the other side. Add or subtract to leave only the variable term on one side. 2x152x - 1 \geq 5 becomes 2x62x \geq 6 after adding 1.

&bull; Move 4: Divide by the coefficient of the variable. This is where the flip rule may apply. 2x62x \geq 6 becomes x3x \geq 3 (no flip because 2 is positive). But 2x6-2x \geq 6 becomes x3x \leq -3 (flip because 2-2 is negative).

The solver implementation. Internally, the solver collects coefficients linearly: left side becomes coeffLx+constL\text{coeff}_L \cdot x + \text{const}_L and right side becomes coeffRx+constR\text{coeff}_R \cdot x + \text{const}_R. The net coefficient is coeffLcoeffR\text{coeff}_L - \text{coeff}_R and the net constant is constRconstL\text{const}_R - \text{const}_L. The boundary value is the net constant divided by the net coefficient, with the direction flipping if and only if the net coefficient is negative.

Edge cases the solver handles automatically.

&bull; Net coefficient is zero, net constant satisfies the inequality &mdash; all real numbers.
&bull; Net coefficient is zero, net constant violates the inequality &mdash; no solution.

For comprehensive treatment see solving linear inequalities and algebraic manipulation.

Related Concepts

Linear Equation &mdash; the equality counterpart. Same isolation moves apply, but no direction-flip step exists because equations have no direction to flip.

Compound Inequality &mdash; two linear inequalities joined by AND or OR. The solution to an AND compound is the intersection of the individual solution sets; the solution to an OR compound is the union.

Interval Notation &mdash; the standard way to express the solution set of an inequality. Open parentheses for strict, square brackets for non-strict, infinity always with parentheses, the empty set written as \emptyset, and the full real line as (,)(-\infty, \infty).

Quadratic Inequality &mdash; the next degree up. The variable appears squared and the solution set can be one or two intervals, requiring sign analysis on a parabola. Compare with quadratic equations.

Absolute Value Inequality &mdash; inequalities containing x|x| or ax+b|ax + b|. They split into compound forms: A<c|A| < c becomes c<A<c-c < A < c (an AND compound), while A>c|A| > c becomes A<cA < -c or A>cA > c (an OR compound).

Number Line &mdash; the geometric representation of the solution set. A ray drawn on the number line corresponds exactly to a one-variable linear inequality solution.

Sign Chart &mdash; the technique used for polynomial and rational inequalities. For linear inequalities the sign chart has only one critical point and reduces to the direct division approach used here.

Solution Set &mdash; the formal name for the collection of values that make the inequality true. For linear inequalities the solution set is always a ray, the empty set, or all of R\mathbb{R}.

Linear Function &mdash; the function f(x)=ax+bf(x) = ax + b whose comparison with a constant produces a linear inequality. The boundary of the solution is the xx-intercept of the line y=ax+bcy = ax + b - c.