Inequality Solver
Solve linear and quadratic inequalities with step-by-step solutions, interval notation, and visual number line graphs. Enter any inequality using natural notation and get an instant, detailed answer.
- Inequality Solver Calculator
- What Is an Inequality
- Types of Inequalities
- How to Solve Linear Inequalities
- How to Solve Quadratic Inequalities
- Understanding Interval Notation
- Graphing Inequalities on a Number Line
- Compound and Absolute Value Inequalities
- Properties of Inequalities
- Real-World Applications
- Common Mistakes to Avoid
- Frequently Asked Questions
- Related Math Tools
Inequality Solver Calculator
Enter a linear or quadratic inequality using x as the variable. Supported operators: <, >, <=, >=, !=
What Is an Inequality
An inequality is a mathematical statement that compares two expressions using a relational operator other than the equals sign. While an equation such as 2x + 3 = 7 states that two quantities are identical, an inequality such as 2x + 3 > 7 states that one quantity is larger or smaller than the other. Inequalities are fundamental to mathematics because they describe ranges of values rather than isolated points, making them essential for modeling constraints, boundaries, and optimization problems across every quantitative discipline.
The solution to an inequality is not a single number but a set of numbers, often infinitely many, that make the statement true. For example, the solution to x > 2 includes every real number greater than 2. This solution set can be expressed in several ways: inequality notation (x > 2), interval notation ((2, ∞)), or graphically on a number line where a shaded region extends rightward from an open circle at 2.
Recognizing the difference between equations and inequalities is the first step toward working with them effectively. An equation pins down a specific value. An inequality defines a region. Both are indispensable tools in algebra, but they require different solving techniques and produce fundamentally different types of answers.
Types of Inequalities
Inequalities come in several forms, each defined by its operator, degree, or structure. Recognizing the type of inequality you are working with determines which solving strategy to apply.
| Symbol | Name | Meaning | Example |
|---|---|---|---|
| < | Less than | Left side is strictly smaller than right side | x < 5 |
| > | Greater than | Left side is strictly larger than right side | x > -3 |
| ≤ | Less than or equal to | Left side is smaller than or equal to right side | x ≤ 10 |
| ≥ | Greater than or equal to | Left side is larger than or equal to right side | x ≥ 0 |
| ≠ | Not equal to | Left side is different from right side | x ≠ 4 |
Linear Inequalities
A linear inequality involves a polynomial of degree one. It takes the general form ax + b < c, where a, b, and c are constants and the inequality symbol can be any of the five operators listed above. Linear inequalities always produce a solution that is a single interval, either bounded on one side and extending toward infinity, or encompassing all real numbers. Solving them requires only addition, subtraction, multiplication, and division, with the critical caveat that multiplying or dividing both sides by a negative number reverses the direction of the inequality.
Quadratic Inequalities
A quadratic inequality involves a polynomial of degree two, typically written as ax² + bx + c < 0 or compared to zero. The parabola defined by the quadratic expression can open upward or downward and may cross the x-axis at zero, one, or two points. The solution to a quadratic inequality usually consists of one or two intervals determined by sign analysis across the regions created by the roots. Quadratic inequalities are more involved than linear ones because the sign of the expression can change direction.
Rational and Higher-Degree Inequalities
Beyond quadratics, rational inequalities involve fractions with variables in the denominator (such as (x + 1)/(x - 2) > 0), and higher-degree polynomial inequalities involve cubic or higher terms. The same sign-analysis method used for quadratics extends to these cases, with additional critical points wherever the expression is zero or undefined. Absolute value inequalities, which use the |x| notation, convert into compound inequalities and are solved by splitting into cases.
How to Solve Linear Inequalities
Solving a linear inequality follows nearly the same procedure as solving a linear equation. You simplify both sides, isolate the variable term, and divide by the coefficient. The one critical difference is the sign-reversal rule: whenever you multiply or divide both sides of an inequality by a negative number, you must flip the inequality direction. This single rule is the source of more errors than any other aspect of inequality solving.
Step-by-Step Method
- Simplify both sides. Distribute any products and combine like terms on each side of the inequality independently.
- Collect variable terms on one side. Add or subtract to move all terms containing x to one side and all constant terms to the other.
- Isolate the variable. Divide both sides by the coefficient of x. If that coefficient is negative, reverse the inequality symbol.
- Express the solution. Write the answer in interval notation, inequality notation, or display it on a number line.
Subtract 3 from both sides: 2x > 4.
Divide both sides by 2 (positive, so the inequality direction stays the same): x > 2.
Solution in interval notation: (2, ∞). The boundary value 2 is not included because the operator is strict (>).
When the Coefficient Is Negative
Consider the inequality -3x + 9 ≥ 0. Subtract 9 from both sides to get -3x ≥ -9. Now divide both sides by -3. Because -3 is negative, the inequality must be flipped: x ≤ 3. The solution is (-∞, 3]. Forgetting this flip is the most common error in linear inequality problems, so it warrants deliberate attention every time a negative divisor appears.
To understand why the flip is necessary, consider the true statement 3 < 5. Multiply both sides by -1: -3 and -5. On the number line, -3 is to the right of -5, meaning -3 > -5. The ordering reversed because multiplying by a negative number mirrors the positions of all values across zero.
Variables on Both Sides
When x appears on both sides of the inequality, collect all variable terms on one side first. For instance, to solve 5x - 2 < 3x + 6, subtract 3x from both sides: 2x - 2 < 6. Add 2: 2x < 8. Divide by 2: x < 4. The solution is (-∞, 4). The process is identical to solving a linear equation, with the same sign-flip rule if a negative division occurs.
Special Cases
Occasionally, all variable terms cancel out, leaving a pure constant comparison. If 3x + 5 < 3x + 8 simplifies to 5 < 8, which is always true, the solution is all real numbers: (-∞, ∞). If it simplifies to 5 < 2, which is always false, the solution is the empty set. These cases are easy to overlook but important to recognize.
How to Solve Quadratic Inequalities
Quadratic inequalities require a fundamentally different approach from linear ones. Because a quadratic expression can change sign at its roots, the solving process centers on identifying those roots and testing the sign of the expression in each resulting interval.
Step-by-Step Method
- Rearrange to standard form. Move all terms to one side so the inequality compares to zero: ax² + bx + c < 0 (or >, ≤, ≥).
- Find the roots. Solve ax² + bx + c = 0 using factoring, completing the square, or the quadratic formula. These roots are the critical points where the expression equals zero.
- Determine the sign in each interval. The roots divide the number line into two or three regions. Select a test value from each region and evaluate the sign of the quadratic at that point.
- Select the correct intervals. If the inequality requires the expression to be negative (< 0 or ≤ 0), select intervals where the test value yields a negative result. If it requires positive (> 0 or ≥ 0), select intervals with a positive result.
- Handle endpoints. For non-strict inequalities (≤ or ≥), include the roots in the solution. For strict inequalities (< or >), exclude them.
Factor: (x - 1)(x - 3) ≤ 0. The roots are x = 1 and x = 3.
Test x = 0 (left of 1): (0-1)(0-3) = 3 > 0. Not in the solution.
Test x = 2 (between 1 and 3): (2-1)(2-3) = -1 < 0. In the solution.
Test x = 4 (right of 3): (4-1)(4-3) = 3 > 0. Not in the solution.
The expression is non-positive between the roots. Since the inequality is non-strict (≤), the endpoints are included.
Solution: [1, 3].
The Role of the Discriminant
The discriminant, calculated as b² - 4ac, determines how many real roots the quadratic has and therefore how the solution behaves:
- Positive discriminant (two distinct roots): The parabola crosses the x-axis at two points, creating three intervals to test. The solution will be one or two of these intervals depending on the inequality direction and the sign of the leading coefficient.
- Zero discriminant (one repeated root): The parabola touches the x-axis at exactly one point. The expression is zero only at the vertex and has the same sign everywhere else. A strict inequality excludes the single root; a non-strict inequality may include only that single point as the solution.
- Negative discriminant (no real roots): The parabola does not cross the x-axis at all. The expression is either always positive (if a > 0) or always negative (if a < 0). The inequality is either satisfied for all real numbers or for none.
Parabola Orientation
Whether the parabola opens upward (leading coefficient a > 0) or downward (a < 0) determines the sign pattern across the intervals. For an upward-opening parabola with two roots, the expression is negative between the roots and positive outside them. For a downward-opening parabola, the pattern is reversed: positive between the roots and negative outside. This orientation, combined with the inequality direction, determines which intervals belong in the solution set.
Understanding Interval Notation
Interval notation is a compact system for describing sets of real numbers that satisfy an inequality. It uses parentheses, brackets, and the infinity symbol to define continuous ranges of values along the number line.
| Notation | Meaning | Inequality Equivalent |
|---|---|---|
| (a, b) | All x where a < x < b | a < x < b |
| [a, b] | All x where a ≤ x ≤ b | a ≤ x ≤ b |
| (a, b] | All x where a < x ≤ b | a < x ≤ b |
| [a, b) | All x where a ≤ x < b | a ≤ x < b |
| (-∞, b) | All x where x < b | x < b |
| (a, ∞) | All x where x > a | x > a |
| (-∞, ∞) | All real numbers | Always true |
When a solution set contains two or more separate intervals, they are joined with the union operator, written as U (or the formal symbol ∪). For example, the solution to x² - 9 > 0 is (-∞, -3) U (3, ∞), which represents all numbers less than -3 combined with all numbers greater than 3. The union indicates these are two distinct, non-overlapping pieces of the total solution.
Set-builder notation offers yet another way to express solutions. The inequality x > 2 can be written as {x ∈ R | x > 2}, read as "the set of all real x such that x is greater than 2." While more verbose than interval notation, set-builder notation can express conditions that intervals handle less gracefully, such as x ≠ 0, which in interval notation requires the union (-∞, 0) U (0, ∞).
Graphing Inequalities on a Number Line
A number line graph translates the algebraic solution set into a visual form. It provides an immediate, intuitive understanding of which values satisfy the inequality and is especially helpful for verifying whether a solution makes sense at a glance.
Standard Conventions
- Open circle: Drawn as an unfilled ring at a boundary point. Indicates the point is not part of the solution. Used for strict inequalities (< or >).
- Closed circle: Drawn as a filled dot at a boundary point. Indicates the point is included in the solution. Used for non-strict inequalities (≤ or ≥).
- Shaded region: A highlighted segment of the number line showing all values that satisfy the inequality. The shading can cover a bounded segment between two points or extend indefinitely toward an end of the number line.
- Arrow: Placed at the end of a shaded region when the solution extends toward positive or negative infinity, indicating the set continues without bound.
For a simple linear inequality like x > 2, the graph shows an open circle at 2 with shading and an arrow extending to the right. For a quadratic inequality solved as [1, 3], the graph shows closed circles at 1 and 3 with shading between them. For a disjoint solution like (-∞, -3) U (3, ∞), two separate shaded regions appear with arrows pointing outward from their respective boundary points.
This solver automatically generates a number line visualization beneath every solution. Critical points are labeled with their numeric values, the solution region is shaded in green, and open or closed circles clearly mark whether each boundary point is included or excluded from the solution set.
Compound and Absolute Value Inequalities
Compound inequalities combine two or more inequality conditions into a single mathematical statement. They arise naturally whenever a quantity must satisfy multiple constraints at the same time, which is common in real-world scenarios ranging from engineering tolerances to statistical confidence intervals.
Conjunction (AND) Inequalities
A conjunction requires both conditions to hold simultaneously. The notation 1 < 2x + 3 < 9 is shorthand for 1 < 2x + 3 AND 2x + 3 < 9. To solve, apply the same algebraic operation to all three parts at once. Subtract 3: -2 < 2x < 6. Divide by 2: -1 < x < 3. The solution is (-1, 3), which represents the intersection (overlap) of the two individual solution sets. The result is always a single, bounded interval or the empty set.
Disjunction (OR) Inequalities
A disjunction requires at least one of the conditions to hold. For example, x < -2 OR x > 5 means any value that satisfies either condition (or both) is part of the solution. The solution set is (-∞, -2) U (5, ∞), the union of two separate intervals. Disjunctions commonly arise when solving quadratic inequalities that produce two non-adjacent solution regions on the number line.
Absolute Value Inequalities
Absolute value inequalities use the |f(x)| notation, which measures the distance of the expression from zero. They convert into compound inequalities using two fundamental rules:
- Less-than form: |f(x)| < a (where a > 0) becomes -a < f(x) < a. This is a conjunction that produces a bounded interval.
- Greater-than form: |f(x)| > a (where a > 0) becomes f(x) < -a OR f(x) > a. This is a disjunction that produces two unbounded intervals.
- If a is zero or negative, |f(x)| < a has no solution (absolute value cannot be negative), while |f(x)| > a is true for all values where f(x) is nonzero (or all values entirely if a is strictly negative).
Convert to a conjunction: -3 ≤ 2x - 5 ≤ 3.
Add 5 to all parts: 2 ≤ 2x ≤ 8.
Divide all parts by 2: 1 ≤ x ≤ 4.
Solution: [1, 4].
Convert to a disjunction: x + 1 < -4 OR x + 1 > 4.
Solve each part: x < -5 or x > 3.
Solution: (-∞, -5) U (3, ∞).
Properties of Inequalities
Inequalities follow a specific set of algebraic rules that govern how they can be manipulated. Understanding these properties prevents common errors and provides the foundation for all inequality-solving techniques.
| Property | Statement | Condition |
|---|---|---|
| Addition | If a < b, then a + c < b + c | Works for any real number c |
| Subtraction | If a < b, then a - c < b - c | Works for any real number c |
| Positive multiplication | If a < b and c > 0, then ac < bc | Inequality direction preserved |
| Negative multiplication | If a < b and c < 0, then ac > bc | Inequality direction reversed |
| Positive division | If a < b and c > 0, then a/c < b/c | Inequality direction preserved |
| Negative division | If a < b and c < 0, then a/c > b/c | Inequality direction reversed |
| Transitive | If a < b and b < c, then a < c | Allows chaining inequalities through a shared value |
| Squaring | If 0 ≤ a < b, then a² < b² | Both sides must be non-negative |
The sign-reversal property is the most important rule for practical problem-solving. It applies exclusively to multiplication and division by a negative value and never to addition or subtraction. When working through a multi-step inequality problem, checking whether the divisor or multiplier is negative should become an automatic habit.
The transitive property enables chaining: if x > 3 and 3 > y, then x > y. This property underpins double inequalities like a < x < b, which implicitly use two chained comparisons linked by the middle term x. Without transitivity, compound inequalities would not be well-defined.
Squaring both sides of an inequality is valid only when both sides are known to be non-negative. If either side could be negative, squaring may introduce extraneous solutions or eliminate valid ones. As a general rule, avoid squaring unless you have established the sign of both expressions first.
Real-World Applications of Inequalities
Inequalities are far more than classroom exercises. They model constraints, thresholds, and acceptable ranges in virtually every field that relies on quantitative reasoning. Any time a problem involves a limit, a minimum, a maximum, or a range of acceptable values, inequalities provide the mathematical framework.
Business and Economics
Break-even analysis is a textbook inequality application. If a company has a cost function C(x) = 500 + 12x and a revenue function R(x) = 20x, the profit condition R(x) > C(x) yields 20x > 500 + 12x, which simplifies to x > 62.5. The company must sell at least 63 units to be profitable. Pricing strategies, budget constraints, and minimum return on investment targets are all formulated and solved using linear inequalities.
Engineering and Physics
Structural engineers calculate load limits using quadratic inequalities. If the stress on a component is modeled by S(x) = 3x² + 2x and the maximum safe stress is 100 units, the safety constraint 3x² + 2x ≤ 100 defines the permissible operating range. Manufacturing tolerances are inherently inequality-based: a part specified at 2.500 cm with a tolerance of 0.005 cm must satisfy 2.495 ≤ x ≤ 2.505. In physics, the Heisenberg uncertainty principle is a fundamental inequality: the product of position and momentum uncertainties has a strict lower bound.
Health and Medicine
Therapeutic drug windows are modeled as compound inequalities. A medication may be effective only when the blood concentration stays between 10 and 25 micrograms per milliliter, represented as 10 ≤ C(t) ≤ 25 where C(t) describes concentration as a function of time. Body mass index ranges, blood pressure thresholds, and safe dosage levels are all inequality constraints that guide clinical decisions daily.
Computer Science
Algorithm analysis uses inequalities to express computational complexity bounds. Stating that an algorithm runs in O(n log n) time is formally an inequality: T(n) ≤ c * n * log(n) for some constant c and all sufficiently large n. Constraint satisfaction problems in artificial intelligence, resource allocation in operating systems, and quality-of-service guarantees in networking all use systems of inequalities as their mathematical backbone.
Education and Daily Life
A student needs an average of at least 80 across four exams to earn a B grade. If the first three scores are 75, 82, and 88, the inequality (75 + 82 + 88 + x) / 4 ≥ 80 determines the minimum fourth-exam score. Simplifying: 245 + x ≥ 320, so x ≥ 75. Budget planning, dietary restrictions, speed limits, and temperature settings are all everyday scenarios naturally expressed as inequalities.
Common Mistakes to Avoid
Inequality problems are conceptually straightforward, but several recurring errors catch both students and working professionals. Awareness of these pitfalls is the most effective defense against them.
- Forgetting the sign flip. When multiplying or dividing both sides by a negative number, the inequality direction must reverse. This is the most common error across all levels. Always verify the sign of the divisor before dividing.
- Treating an inequality as an equation. The solution to an inequality is a set of values, not a single number. Writing x = 3 as the answer to 2x + 1 > 7 is wrong. The correct answer is x > 3, representing infinitely many values.
- Selecting the wrong intervals for quadratics. The solution to x² - 9 > 0 is (-∞, -3) U (3, ∞), not (-3, 3). For an upward-opening parabola, the expression is positive outside the roots. Always confirm your interval selection with a test value.
- Confusing open and closed endpoints. Strict inequalities (<, >) require open circles and parentheses. Non-strict (≤, ≥) require closed circles and brackets. Mismatching these changes the solution set.
- Using brackets with infinity. Infinity is not a number. It is never reached and never included in the set. Write (-∞, a] or (a, ∞), never [-∞, a].
- Ignoring the no-solution and all-reals cases. A quadratic with no real roots might satisfy the inequality everywhere or nowhere. Always compute the discriminant and handle these edge cases rather than assuming two roots exist.
- Dividing by a variable expression. If you divide both sides of an inequality by an expression containing x, the sign of that expression depends on x and could be positive or negative. This can silently drop solutions or introduce false ones. Use factoring and sign analysis instead.