Algebra

Linear Inequality Solver

Enter a linear inequality of the form mx + b OP c. The solver isolates x in the same way as a linear equation, but flips the inequality direction if it divides both sides by a negative number, and returns the solution as an interval.

Linear Inequality Solver

Solve mx + b OP c for x, including the flip when m is negative.

Try:
Answerx < 2 → (−∞, 2)
  1. Inequality2x + 3 < 7
  2. Subtract b2x < 4
  3. Divide by mx < 2
  4. Solution interval(−∞, 2)

The flip, and the two answers

Solving an inequality looks like solving an equation, and for most of the working it is. The same two moves isolate the variable: clear the constant, then divide by the coefficient. One rule, and only one, behaves differently — dividing by a negative number reverses the direction of the relation.

This solver applies that rule visibly. It shows each step, flips the symbol when the coefficient is negative, and reports the answer both as an inequality and as an interval.

The reversal is the single thing that makes inequalities harder than equations, and it is not a difficult rule so much as an easy one to forget. Showing the division as its own labelled step, with the symbol visibly changed, puts it where it cannot be skipped.

The result is given in two notations because different exercises want different ones. The inequality form reads naturally; the interval form is what later work in analysis and calculus expects, and getting used to translating between them is worth the small effort.

How to use this calculator

  1. Enter the coefficient of x Any real number, including negatives and zero. A negative value is the case that triggers the reversal, and zero routes to a degenerate case rather than an error.
  2. Enter the constant and the right-hand side The constant added on the left, and the value being compared against. Both may be negative or fractional.
  3. Choose the relation Strictly less, less or equal, strictly greater, or greater or equal. The choice determines whether the endpoint is included in the interval.
  4. Read the division step, not just the answer That line shows whether the symbol was reversed. If your own working kept the original direction with a negative coefficient, this is where the disagreement starts.

The formula, and where it comes from

mx + b OP c → mx OP c − b → x OP (c − b)/m, with OP reversed when m < 0

Adding or subtracting the same quantity on both sides never changes the direction of an inequality. Two numbers shifted by the same amount keep their order, so the first step is exactly as it would be for an equation.

Multiplication and division are different. Scaling by a positive number preserves order, but scaling by a negative one reverses it: 2 is less than 3, and yet −2 is greater than −3. That is the whole justification for the flip, and it is worth recovering from that example rather than memorising the rule.

The reversal depends only on the sign of the coefficient, not on the sign of the answer or of the constants. A negative right-hand side with a positive coefficient involves no flip at all, which is a common source of unnecessary reversals.

When the coefficient is zero the variable vanishes and what remains is a comparison between two constants — a statement that is either true or false outright. If it is true, every real number satisfies the original inequality; if false, none does. The solver evaluates that comparison directly rather than attempting a division.

What each input means

m Coefficient of x — form field “m (x coefficient)”
The multiplier on the variable. Its sign alone decides whether the relation reverses; zero gives one of the two degenerate outcomes.
b Constant on the left — form field “b (constant on the left)”
Removed first by subtraction, which never affects the direction of the relation.
c Right-hand side — form field “c (right-hand side)”
The value compared against. Only the difference from the constant enters the answer.
OP Relation — form field “Inequality”
One of four. Strict relations give an open endpoint in the interval; inclusive ones give a closed endpoint.

Worked examples

Every number below is produced by the same calculation engine the tool above runs. Nothing here is typed by hand, so the walkthrough cannot drift from what you get when you enter the same values yourself.

A positive coefficient, no reversal

Solve 2x + 3 < 7. The coefficient is positive, so the relation survives both steps unchanged.

Inputs m (x coefficient) = 2, b (constant on the left) = 3, c (right-hand side) = 7, Inequality = lt

  1. Inequality 2x + 3 < 7
  2. Subtract b 2x < 4
  3. Divide by m x < 2
  4. Solution interval (−∞, 2)

Result x < 2 → (−∞, 2)

Subtracting 3 and dividing by 2 leaves x less than 2, with the symbol pointing the same way throughout. This is the case that makes an inequality feel like an equation, which is precisely why the next example is the one to study.

The interval is unbounded below and open at the top, since the relation is strict. The endpoint appears in the notation but is not part of the solution set.

A negative coefficient, with the flip

Solve −3x + 5 ≥ 11. Now the coefficient is negative, so the final division reverses the relation.

Inputs m (x coefficient) = -3, b (constant on the left) = 5, c (right-hand side) = 11, Inequality = ge

  1. Inequality -3x + 5 ≥ 11
  2. Subtract b -3x ≥ 6
  3. Divide by m (negative) Dividing by a negative flips the inequality: x ≤ -2
  4. Solution interval (−∞, -2]

Result x ≤ -2 → (−∞, -2]

The subtraction step leaves −3x ≥ 6 with the symbol untouched, and only the division changes it to less than or equal. Reading the two steps in sequence shows exactly where the reversal belongs — at the division, not before it.

The interval is therefore unbounded below rather than above, the opposite of what the original symbol suggests. Answering with the wrong half of the number line is the characteristic outcome of forgetting the rule.

Reading the result

Reading the interval notation

A round bracket excludes the endpoint and a square bracket includes it, matching the strict and inclusive relations. Infinity always takes a round bracket, since it is a direction rather than a number that could be attained.

The solution is a range, not a value

An inequality is satisfied by infinitely many numbers, so a single answer is never the whole result. Checking one value inside the range and one outside it is the quickest confirmation that the boundary sits in the right place and faces the right way.

Two degenerate outcomes

With a zero coefficient the answer is either every real number or none at all, depending on whether the remaining comparison between constants happens to be true. Neither is an error, and distinguishing them is often the point of such a question.

When you would use this

Expressing a constraint as a range

A budget not to be exceeded, a temperature to stay above, a minimum quantity to meet: each is a linear inequality whose solution is the set of acceptable values rather than a single target.

Preparing a domain restriction

Conditions such as a non-negative radicand or a positive logarithm argument are linear inequalities in disguise. Solving one here gives the interval on which the parent function is defined.

Assumptions and limitations

What this calculator assumes

  • The inequality has been arranged into the form with the variable term and constant on the left and a single value on the right.
  • All three coefficients are finite real numbers, and the coefficient of x may be zero.
  • The reversal is applied on the basis of the coefficient's sign alone.
  • The interval endpoint is open for a strict relation and closed for an inclusive one.

Where it stops being the right tool

  • One variable and one inequality: compound conditions joined by and or or must be solved as separate parts.
  • Coefficients are entered rather than parsed, so an inequality with the variable on both sides has to be collected by hand first.
  • Linear only — a term in x² makes the solution set a union or an interval with two finite ends, which this does not handle.

Common mistakes

Forgetting to reverse after dividing by a negative

Why it happens. The first step behaves exactly like an equation, which builds the expectation that the second will too. The resulting answer looks entirely reasonable, just describing the wrong side of the boundary.

How to avoid it. Test one number from your answer in the original inequality. A value that fails it means the direction was never reversed.

Reversing because a constant is negative

Why it happens. Overcorrection is as common as the original error: once the flip rule is learned, any negative number in sight looks like a trigger for it.

How to avoid it. Look only at the coefficient of the variable. A negative constant or a negative right-hand side changes nothing about the direction.

Using the wrong bracket in the interval

Why it happens. The two bracket shapes are visually similar and the distinction carries no weight in speech, so it survives poorly from working to written answer.

How to avoid it. Match the bracket to the relation: strict gives round, inclusive gives square. The reported interval shows the convention applied correctly.

Frequently asked questions

When does the inequality flip?

Only when both sides are multiplied or divided by a negative number, which here means when the coefficient of x is negative. Adding or subtracting never reverses the relation, and neither does a negative constant elsewhere in the problem.

What if the coefficient is 0?

The variable disappears and the inequality becomes a comparison between two constants. That statement is either true, in which case every real number is a solution, or false, in which case there are none.

What format is the answer in?

Both forms are given: the inequality form, which reads as x compared against a value, and the interval form. Round brackets mark excluded endpoints and square brackets included ones, with infinity always taking a round bracket.

Why does the answer include infinitely many values?

Because a linear inequality bounds the variable on one side only. Its solution is a half-line rather than a point, which is why an interval is the natural way to write it.