- Introduction
- What is an inequality?
- Number lines and interval notation
- Solving linear inequalities
- Compound inequalities
- Absolute value inequalities
- Quadratic inequalities
- Inequalities in two variables
- Systems and optimisation
- Famous inequalities
- AI and machine learning
- Common mistakes
- Practice problems
- Conclusion
1. Introduction
Equations say two things are exactly equal. Real life is rarely that precise. A lift can carry at most 800 kilograms, a driver must be at least 18, a phone plan must cost less than 30 dollars. These are inequalities, statements that compare quantities instead of equating them. The answer to an inequality is not usually a single number but a whole range of numbers.
This changes how we think about solving. We still isolate the variable, but we must be careful with one new rule, and we describe the solution as a region on a number line or a plane. Inequalities also carry us into practical territory: choosing the best option under limits, which is the subject of optimisation.
This article covers the symbols and the solving rules, compound and absolute-value inequalities, quadratic inequalities, graphing in two variables, optimisation with several constraints, and some famous inequalities. We finish with the many places inequalities decide what machine learning models do, from ReLU to classification boundaries.
2. What is an inequality?
An inequality compares two expressions using one of four symbols. The strict symbols < and > exclude equality, and the non-strict symbols ≤ and ≥ allow it. A solution is any value of the variable that makes the statement true, and the solution set is all of them. For x > 3 the numbers 3.1, 4 and 1,000 are solutions, while 3 and 2 are not.
| Symbol | Read as | Example | True when |
|---|---|---|---|
| < | less than | x < 5 | x is below 5 |
| > | greater than | x > 5 | x is above 5 |
| ≤ | less than or equal to | x ≤ 5 | x is 5 or below |
| ≥ | greater than or equal to | x ≥ 5 | x is 5 or above |
| ≠ | not equal to | x ≠ 5 | x is anything but 5 |
Everyday phrases translate directly: "at least" means ≥, "at most" means ≤, "fewer than" means <, and "more than" means >. A common source of error is mixing up "at least 18" (18 or more) with "more than 18" (above 18, so 18 itself is excluded).
3. Number lines and interval notation
A solution set of one variable is easiest to see on a number line. Draw a circle at each endpoint: an open circle when the endpoint is excluded (strict symbols), and a filled circle when it is included (non-strict symbols). Then shade or draw an arrow in the direction of the solutions.
Interval notation is the compact written form. Round brackets mean "excluded" and square brackets mean "included." The symbols ∞ and −∞ stand for "without end" and always get a round bracket, because infinity is not a number you can reach.
| Inequality | Interval notation | Number line |
|---|---|---|
| x < 3 | (−∞, 3) | open circle at 3, arrow left |
| x ≥ −2 | [−2, ∞) | filled circle at −2, arrow right |
| −2 < x ≤ 3 | (−2, 3] | open at −2, filled at 3 |
| x < −1 or x ≥ 4 | (−∞, −1) ∪ [4, ∞) | two separate rays |
4. Solving linear inequalities
Linear inequalities are solved almost exactly like linear equations. You may add or subtract the same number on both sides, and you may multiply or divide both sides by the same positive number, and the inequality stays true. For example, 3x + 2 < 11 becomes 3x < 9 and then x < 3. A test confirms it: x = 2 gives 8 < 11, true, while x = 3 gives 11 < 11, false.
| Step | Inequality | What we did |
|---|---|---|
| 1 | 3x + 2 < 11 | start |
| 2 | 3x < 9 | subtract 2 from both sides |
| 3 | x < 3 | divide both sides by 3 |
| Check | x = 2: 8 < 11 ✓; x = 3: 11 < 11 ✗ | test inside and at the boundary |
The one new rule is the sign flip. Multiplying or dividing both sides by a negative number reverses the inequality. To see why, start from the true statement 2 < 4 and multiply by −1. The numbers become −2 and −4, and −2 is now greater than −4. The number line reflects, so the order must flip.
Apply it to −2x + 5 ≥ 9. Subtract 5 to get −2x ≥ 4. Now divide by −2 and flip the symbol: x ≤ −2. Check: x = −3 gives 6 + 5 = 11 ≥ 9, true, and x = 0 gives 5 ≥ 9, false.
| Operation on both sides | Effect on the symbol | Example |
|---|---|---|
| add or subtract any number | unchanged | x − 2 < 5 → x < 7 |
| multiply or divide by a positive number | unchanged | 3x > 12 → x > 4 |
| multiply or divide by a negative number | reversed | −3x > 12 → x < −4 |
| take reciprocals (both sides positive) | reversed | 2 < x → 1/x < 1/2 |
Variables on both sides work as with equations: for 5x − 7 ≤ 2x + 8, subtract 2x and add 7 to get 3x ≤ 15, so x ≤ 5.
5. Compound inequalities
A compound inequality joins two conditions. With and, both must hold, so the solution is the overlap of the two sets. With or, at least one must hold, so the solution is the combination of the two sets.
An and condition is often written as one chain, −3 < 2x + 1 ≤ 7. Whatever you do, do it to all three parts. Subtract 1 to get −4 < 2x ≤ 6, then divide by 2 to get −2 < x ≤ 3. An or condition stays as two pieces: 2x − 1 < −5 or 3x ≥ 12 gives x < −2 or x ≥ 4.
| AND (intersection) | OR (union) | |
|---|---|---|
| meaning | both conditions true | at least one true |
| solution set | the overlap | everything covered by either |
| example | −3 < 2x + 1 ≤ 7 → −2 < x ≤ 3 | 2x − 1 < −5 or 3x ≥ 12 → x < −2 or x ≥ 4 |
| shape | one connected interval | usually two separate pieces |
Sometimes the answer is empty or everything. x < 2 and x > 5 has no solution, because no number is both below 2 and above 5. And x < 5 or x > 2 is true for every real number.
6. Absolute value inequalities
The absolute value |x| is the distance of x from zero, and |x − 2| is the distance of x from 2. That distance idea turns absolute-value inequalities into pictures. |x − 2| < 5 says "the distance from 2 is less than 5," so x lies within 5 of 2, between −3 and 7. |x − 2| ≥ 5 says "at least 5 away," so x ≤ −3 or x ≥ 7.
| Form | Becomes | Shape | Example |
|---|---|---|---|
| |u| < c | −c < u < c | one interval (and) | |2x + 1| ≤ 7 → −4 ≤ x ≤ 3 |
| |u| > c | u < −c or u > c | two rays (or) | |x − 2| ≥ 5 → x ≤ −3 or x ≥ 7 |
Two special cases are worth knowing. |x| < −1 has no solution, since a distance is never negative. |x| > −1 is true for every real number, for the same reason.
7. Quadratic inequalities
Quadratic inequalities such as x² − 5x + 6 < 0 ask where a parabola lies below or above the x-axis. The key idea: a continuous curve can change sign only where it crosses zero. So find the roots first, then test the regions between them.
Factor to find the roots: (x − 2)(x − 3) < 0 has roots 2 and 3. These split the number line into three regions. Test one value in each and record the sign.
| Region | Test x | (x − 2)(x − 3) | Sign |
|---|---|---|---|
| x < 2 | 0 | (−2)(−3) = 6 | positive |
| 2 < x < 3 | 2.5 | (0.5)(−0.5) = −0.25 | negative |
| x > 3 | 4 | (2)(1) = 2 | positive |
We wanted the expression to be negative, so the answer is the middle region: 2 < x < 3. The roots themselves give zero, which is not below zero, so they are excluded. For ≤ 0 we would include them.
| Inequality | Roots | Solution |
|---|---|---|
| x² − 5x + 6 < 0 | 2, 3 | 2 < x < 3 |
| x² − 4 ≥ 0 | −2, 2 | x ≤ −2 or x ≥ 2 |
| x² + 2x − 8 > 0 | −4, 2 | x < −4 or x > 2 |
| x² + 1 > 0 | none | all real numbers |
| x² < 0 | 0 only | no solution |
Notice the pattern. For an upward-opening parabola, "below zero" gives the interval between the roots, and "above zero" gives the two outer pieces. If there are no real roots, the parabola never crosses the axis, so the answer is either everything or nothing.
8. Inequalities in two variables
With two variables, an inequality describes a region of the plane. The boundary is the line from the matching equation, and the solution is everything on one side. Graph y > 2x − 1 in three steps: draw the boundary y = 2x − 1, make it dashed for strict symbols and solid for non-strict ones, and shade the correct side.
To choose the side, use a test point, usually the origin. For y > 2x − 1, the point (0, 0) gives 0 > −1, which is true, so shade the side containing the origin, above the line. If the origin lies on the boundary, pick another point.
| Step | y > 2x − 1 | y ≤ −x + 3 |
|---|---|---|
| 1. boundary | y = 2x − 1 | y = −x + 3 |
| 2. line style | dashed (strict) | solid (non-strict) |
| 3. test (0, 0) | 0 > −1 true | 0 ≤ 3 true |
| 4. shade | side with the origin: above | side with the origin: below |
9. Systems and optimisation
A system of inequalities requires all conditions at once, so the solution is the overlap of the shaded regions, called the feasible region. This is the setting of linear programming: choose the best value of some goal while respecting limits.
A workshop makes two products. Each unit of A and B takes 1 hour of cutting, and each unit of A takes 2 hours of assembly against 1 hour for B. With 6 cutting hours and 8 assembly hours, the limits are x + y ≤ 6 and 2x + y ≤ 8, with x ≥ 0 and y ≥ 0. If profit is P = 3x + 2y, how many of each should be made?
The feasible region is a polygon. A key fact of linear programming is that the best value of a linear goal always occurs at a corner of the region. So compute the corners and compare. The corner (2, 4) is where the two limit lines meet, found by solving x + y = 6 and 2x + y = 8.
| Corner (x, y) | Profit 3x + 2y | Result |
|---|---|---|
| (0, 0) | 0 | nothing made |
| (4, 0) | 12 | |
| (2, 4) | 14 | best |
| (0, 6) | 12 |
The answer is to make 2 units of A and 4 of B for a profit of 14. The same pattern, a goal under constraints, appears in scheduling, diet planning, transport and resource allocation.
10. Famous inequalities
Some inequalities are so useful they have names. They hold for every allowed value, and they are tools for proving that one quantity bounds another.
| Name | Statement | Numerical example |
|---|---|---|
| Triangle inequality | |a + b| ≤ |a| + |b| | |−3 + 5| = 2 ≤ 3 + 5 = 8 |
| AM–GM | (a + b)/2 ≥ √(ab) for a, b ≥ 0 | (4 + 9)/2 = 6.5 ≥ √36 = 6 |
| Cauchy–Schwarz | (a · b)² ≤ |a|² |b|² | a = (1, 2), b = (3, 4): 11² = 121 ≤ 5 × 25 = 125 |
| Logarithm bound | ln x ≤ x − 1 for x > 0 | ln 2 ≈ 0.693 ≤ 1 |
AM–GM says an average of two numbers is never smaller than their geometric mean, with equality only when the numbers are equal. It explains, for example, why a square encloses the largest area for a given perimeter. The triangle inequality says a detour is never shorter than the direct route, and it is the reason distances in machine learning behave sensibly.
| a, b | (a + b)/2 | √(ab) | Gap |
|---|---|---|---|
| 4, 9 | 6.5 | 6 | 0.5 |
| 2, 8 | 5 | 4 | 1 |
| 5, 5 | 5 | 5 | 0 |
| 1, 16 | 8.5 | 4 | 4.5 |
11. AI and machine learning
Inequalities quietly decide what machine learning models do. The ReLU activation max(0, x) is defined by an inequality: it outputs 0 when x < 0 and x otherwise. Gradient clipping uses an inequality as a safety limit: if the gradient's size exceeds a threshold c, it is scaled down so that ‖g‖ ≤ c.
| Input | ReLU(x) | clip(x, −1, 1) |
|---|---|---|
| -3 | 0 | -1 |
| -1 | 0 | -1 |
| 0 | 0 | 0 |
| 0.5 | 0.5 | 0.5 |
| 2 | 2 | 1 |
| 5 | 5 | 1 |
A gradient with components 3 and 4 has size 5. With a threshold of 1, the clipped gradient is (3, 4) × 1/5 = (0.6, 0.8), the same direction but a size of exactly 1.
The central idea of classification is an inequality. A linear classifier computes a score w · x + b and predicts class 1 when w · x + b ≥ 0. The boundary w · x + b = 0 is a line, and the inequality picks a side of it, exactly as in section 8. With w = (2, −1) and b = −1, the point (2, 1) scores 4 − 1 − 1 = 2, which is positive, so it lands in class 1, while (0, 2) scores −3 and lands in class 0.
| Point | Score 2x₁ − x₂ − 1 | Class (score ≥ 0 → 1) |
|---|---|---|
| (2, 1) | 2 | 1 |
| (0, 2) | -3 | 0 |
| (1, 1) | 0 | 1 |
| (3, 2) | 3 | 1 |
| (1, 3) | -2 | 0 |
Support vector machines add inequality constraints: every training point must satisfy yᵢ (w · xᵢ + b) ≥ 1, and among all such boundaries the machine picks the one with the widest margin, 2/‖w‖. For w = (3, 4), ‖w‖ = 5 and the margin is 0.4. This is a linear programming style problem, a goal under inequality constraints.
Inequalities also shape how predictions are used. A model that outputs a probability p becomes a yes/no decision by a threshold: predict positive when p ≥ t. Moving t trades precision against recall. Take five cases with model probabilities 0.9, 0.8, 0.6, 0.4, 0.2 and true labels 1, 1, 0, 1, 0.
| Threshold t | Predicted positives | Precision | Recall |
|---|---|---|---|
| 0.3 | 4 | 0.75 | 1.00 |
| 0.5 | 3 | 0.67 | 0.67 |
| 0.7 | 2 | 1.00 | 0.67 |
A low threshold catches every positive but lets a false alarm through. A high threshold is cleaner but misses a true case. Neither is right in general; the choice depends on which error is costlier.
Finally, stopping rules are inequalities. Training loops often stop when the improvement drops below a small tolerance, |Lₜ − Lₜ₋₁| < ε. For the loss Lₜ = 2 + 9 · 0.25ᵗ from earlier articles and a tolerance of 0.001, the change first falls below the tolerance at step 8.
| Step t | Loss Lₜ | Change |Lₜ − Lₜ₋₁| | Change < 0.001? |
|---|---|---|---|
| 5 | 2.00879 | 0.02637 | no |
| 6 | 2.00220 | 0.00659 | no |
| 7 | 2.00055 | 0.00165 | no |
| 8 | 2.00014 | 0.00041 | yes: stop |
| Algebra | Machine learning |
|---|---|
| max(0, x), defined by x < 0 or x ≥ 0 | ReLU activation |
| ‖g‖ ≤ c | gradient clipping |
| w · x + b ≥ 0 | linear classifier, decision boundary |
| yᵢ(w · xᵢ + b) ≥ 1 | support vector machine constraints |
| p ≥ t | classification threshold |
| |change| < ε | convergence and stopping tolerance |
| feasible region, corner optimum | constrained optimisation, linear programming |
12. Common mistakes
| Mistake | Wrong | Right |
|---|---|---|
| Forgetting to flip | −2x ≥ 4 → x ≥ −2 | −2x ≥ 4 → x ≤ −2 |
| Wrong circle at an endpoint | filled circle for x < 3 | open circle: 3 is excluded |
| Writing and instead of or | |x − 2| ≥ 5 → −3 ≥ x ≥ 7 | x ≤ −3 or x ≥ 7 |
| Treating a quadratic like a linear one | x² > 4 → x > 2 | x < −2 or x > 2 |
| Dividing by a variable | x² > 3x → x > 3 | x(x − 3) > 0 → x < 0 or x > 3 |
| Skipping the test point | shading either side | test (0, 0) to choose |
13. Practice problems
Try these before looking at the answers.
- Solve 4x − 3 > 9 and write the answer in interval notation.
- Solve −3x + 2 ≤ 11.
- Solve −5 < 3x + 1 ≤ 10.
- Solve |x + 1| < 4.
- Solve |2x − 3| ≥ 5.
- Solve x² − x − 6 ≤ 0.
- Decide whether (1, 1) satisfies y > 2x − 1.
- A classifier has w = (1, 1) and b = −3. Which class does the point (2, 2) fall in?
Answers.
- 4x > 12, so x > 3, which is (3, ∞).
- −3x ≤ 9, so dividing by −3 flips the sign: x ≥ −3.
- Subtract 1: −6 < 3x ≤ 9. Divide by 3: −2 < x ≤ 3.
- −4 < x + 1 < 4, so −5 < x < 3.
- 2x − 3 ≤ −5 or 2x − 3 ≥ 5, so x ≤ −1 or x ≥ 4.
- (x − 3)(x + 2) ≤ 0, so −2 ≤ x ≤ 3.
- 1 > 2(1) − 1 = 1 is false because 1 is not greater than 1, so no. The point lies on the dashed boundary.
- Score 2 + 2 − 3 = 1, which is ≥ 0, so class 1.
14. Conclusion
An inequality compares instead of equating, and its solution is a range. Solve it like an equation with one new rule: multiplying or dividing by a negative reverses the symbol. Number lines and interval notation describe the answer, compound and absolute-value inequalities combine conditions with and or or, and quadratic inequalities are settled by roots and sign charts.
In two variables an inequality is a region, and several together form a feasible region where an optimum sits at a corner. In machine learning, inequalities define ReLU, clipping, classification boundaries, margins, thresholds and stopping rules. The final article in this series connects algebra and geometry directly: coordinate geometry.