The Triangle Inequality for Real Numbers and Its Proof
See why |a + b| ≤ |a| + |b| for all real numbers, with two proofs, the equality case, and ways the result is used.
Key takeaways
- For all real a and b, |a + b| ≤ |a| + |b|.
- Equality holds exactly when ab ≥ 0, meaning the numbers share a sign or at least one is zero.
- The quickest proof adds the two chains -|a| ≤ a ≤ |a| and -|b| ≤ b ≤ |b|.
- The reverse form, ||a| - |b|| ≤ |a - b|, gives a lower bound.
- In distance language, going from x to z by way of y is never shorter than going directly.
The triangle inequality says that for any real numbers a and b,
|a + b| ≤ |a| + |b| The size of a sum is never bigger than the sum of the sizes. The two sides are equal when a and b do not pull in opposite directions, and the left side is strictly smaller when one is positive and the other negative, because they partly cancel.
This short statement is one of the most used tools in algebra and analysis. Below you will see how to prove it, when it is sharp, and what follows from it.
Trying numbers first
Before proving anything, test the claim with each combination of signs.
| a | b | |a + b| | |a| + |b| | Relationship |
|---|---|---|---|---|
| 5 | 3 | 8 | 8 | equal |
| -5 | -3 | 8 | 8 | equal |
| 5 | -3 | 2 | 8 | strictly less |
| -5 | 3 | 2 | 8 | strictly less |
| 5 | 0 | 5 | 5 | equal |
| 4 | -4 | 0 | 8 | strictly less |
The pattern is clear, but a table is not a proof. Six examples say nothing certain about the infinitely many other pairs. For that you need an argument using letters. If you are unsure what the bars mean, review absolute value as distance from zero.
The proof by adding two chains
Every real number lies between the negative of its absolute value and its absolute value, because it equals one of them. So:
-|a| ≤ a ≤ |a|
-|b| ≤ b ≤ |b| Inequalities that point the same way may be added.
-(|a| + |b|) ≤ a + b ≤ |a| + |b| Now use a basic fact: if k ≥ 0, then -k ≤ u ≤ k means exactly |u| ≤ k. This is the pattern explained in the less than pattern for absolute values. Take u = a + b and k = |a| + |b|, which is not negative. The conclusion is
|a + b| ≤ |a| + |b| That completes the proof. It needs no cases, and every step holds for all real numbers.
The proof by squaring
A second proof compares squares. It uses two facts: |u|² = u², and ab ≤ |ab| = |a| · |b|.
|a + b|² = (a + b)²
= a² + 2ab + b²
≤ a² + 2|a||b| + b² since ab ≤ |a||b|
= |a|² + 2|a||b| + |b|²
= (|a| + |b|)² So |a + b|² ≤ (|a| + |b|)². Both |a + b| and |a| + |b| are zero or positive, and for such numbers a smaller or equal square means a smaller or equal number. Therefore |a + b| ≤ |a| + |b|.
The condition about signs matters. From (-5)² > 3² you cannot conclude that -5 > 3. Squaring preserves order only when both quantities are nonnegative.
Notice also the direction of the argument. It starts from facts already known and arrives at the target. Starting with the target and working to something true proves nothing unless each step can be reversed, a trap discussed in proving inequalities without working backward illegally.
Exactly when the two sides are equal
The squaring proof shows where equality comes from. Only one step could be strict: replacing ab by |a||b|. The two sides of the final result are equal precisely when ab = |a||b| = |ab|, and a number equals its own absolute value exactly when it is zero or positive.
So |a + b| = |a| + |b| if and only if ab ≥ 0.
This lets you solve some equations on sight. For which x is |x - 2| + |7 - x| = 5? Set a = x - 2 and b = 7 - x. Their sum is 5, so the equation says |a| + |b| = |a + b|. That holds when (x - 2)(7 - x) ≥ 0, which means 2 ≤ x ≤ 7.
When ab < 0, you can even say how large the shortfall is. The left side equals the difference of the sizes, so the gap between the two sides is twice the smaller of |a| and |b|. For a = 5 and b = -3 the gap is 8 - 2 = 6.
The reverse triangle inequality
The inequality also gives a floor. Write a as (a - b) + b and apply the theorem to those two pieces.
|a| = |(a - b) + b| ≤ |a - b| + |b|
so |a| - |b| ≤ |a - b| Swapping the names a and b gives |b| - |a| ≤ |b - a| = |a - b|. The number ||a| - |b|| equals one of those two differences, so
||a| - |b|| ≤ |a - b| Replacing b with -b gives a companion: ||a| - |b|| ≤ |a + b|. Combined with the original theorem, you have both ends:
||a| - |b|| ≤ |a + b| ≤ |a| + |b|
For instance, if |a| = 10 and |b| = 3, then |a + b| is somewhere from 7 to 13. For real numbers it is in fact one of those two values.
A third proof by cases
You can also argue straight from the definition. This proof is longer, but it shows exactly where cancellation happens.
If a and b are both zero or positive, then a + b is too, and |a + b| = a + b = |a| + |b|. If both are negative, then |a + b| = -(a + b) = (-a) + (-b) = |a| + |b|. These two cases give equality.
Now suppose one number is positive or zero and the other negative. Because the statement does not change when a and b trade places, you may assume a ≥ 0 and b < 0. There are two possibilities for the sum.
If a + b ≥ 0: |a + b| = a + b < a - b = |a| + |b| since b < -b
If a + b < 0: |a + b| = -a - b ≤ a - b = |a| + |b| since -a ≤ a In the second line, equality happens only when a = 0. Every pair of real numbers falls into one of the cases, so the inequality is proved. Notice how much shorter the first two proofs are. A well chosen general fact, such as -|a| ≤ a ≤ |a|, can absorb a whole list of cases.
A minimum you get for free
The theorem can find smallest values without any case work. Consider |x - 2| + |x - 9|. Because |x - 9| = |9 - x|, you can pair 9 - x with x - 2, so that x cancels in the sum:
7 = |(x - 2) + (9 - x)| ≤ |x - 2| + |9 - x| So the sum is at least 7 for every x. Equality needs (x - 2)(9 - x) ≥ 0, which is the interval [2, 9]. You have found the minimum value and every place where it occurs in two lines.
The method works for any two centers p and q: |x - p| + |x - q| ≥ |p - q|. When you add more terms, pair the outermost centers first, then the next pair inward. The case-by-case route to the same answers is shown in solving sums of absolute values by region.
Why the name mentions triangles
Put a = x - y and b = y - z. Then a + b = x - z, and the theorem becomes
|x - z| ≤ |x - y| + |y - z| The distance from x to z is at most the distance from x to y plus the distance from y to z. A detour never saves length. On a number line the "triangle" is squashed flat, and equality holds when y lies between x and z, endpoints included.
In the plane, the same statement says that one side of a triangle is no longer than the other two together. It remains true for lengths of vectors, as described in vector length and the idea of a norm, and for the modulus of a complex number. The adding-chains proof does not carry over to those settings, since complex numbers and vectors have no order, but a version of the squaring proof does.
Using it to control errors
The theorem shines when you know that quantities are close to targets. Suppose |x - 2| < 0.1 and |y - 3| < 0.2. How far can x + y be from 5?
|x + y - 5| = |(x - 2) + (y - 3)|
≤ |x - 2| + |y - 3|
< 0.3 Now bound |x² - 4| when |x - 2| < 0.5. Factor first: |x² - 4| = |x - 2| · |x + 2|. The second factor needs a limit, and the triangle inequality supplies it: |x + 2| = |(x - 2) + 4| ≤ |x - 2| + 4 < 4.5. So |x² - 4| < 0.5 × 4.5 = 2.25.
The trick of adding and subtracting a convenient number is the heart of many limit proofs in calculus.
More than two numbers
Apply the theorem twice to handle three terms: |a + b + c| ≤ |a + b| + |c| ≤ |a| + |b| + |c|. Repeating the step, which is formally a proof by induction, gives the result for any finite list:
|a₁ + a₂ + ... + aₙ| ≤ |a₁| + |a₂| + ... + |aₙ|
Equality holds exactly when no two of the numbers have opposite signs.
Mistakes to avoid
- Treating it as an equation. |a + b| = |a| + |b| fails whenever a and b have opposite signs.
- Copying the pattern to subtraction. |a - b| ≤ |a| - |b| is false: with a = 1 and b = 5 the left side is 4 and the right side is -4. The correct upper bound is |a - b| ≤ |a| + |b|.
- Reversing the symbol. The sum of the sizes is the larger side.
- Subtracting inequalities. You may add two inequalities that point the same way, but subtracting one from another is not a valid step.