# Proof of triangle inequality

I understand intuitively that this is true, but I'm embarrassed to say I'm having a hard time constructing a rigorous proof that $|a+b| \leq |a|+|b|$. Any help would be appreciated :)

• Isn't this an axiom in metric space? – NECing Feb 18 '13 at 19:11
• There is no addition in metric space. @ShuXiaoLi – k.stm Feb 18 '13 at 19:16
• That a metric must obey the triangle inequality is indeed one of the axioms of a metric space. – user1236 Jul 28 '15 at 1:04
• The shortest distance b/w two points on a plane is along the straight line... – DVD Oct 25 '16 at 23:45
• The question is not well-defined until you say what $a$ and $b$ are: real numbers complex numbers, vectors or something else again. – PJTraill Oct 10 '18 at 20:44

## 9 Answers

Prove $|x| = \max\{x,-x\}$ and $\pm x ≤ |x|$.

Then you can use: \begin{align*} a + b &≤ |a| + b ≤ |a| + |b|,\quad\text{and}\\ -a - b &≤ |a| -b ≤ |a| + |b|. \end{align*}

• Clear and concise, +1. – Julien Feb 18 '13 at 19:18
• Nice. Thanks! I got hung up for a sec on this step:$$-a-b\leq|a|-b$$ but then I put in the intermediate step:$$-a-b\leq|-a|-b=|a|-b$$Thank you! – ivan Feb 18 '13 at 19:28
• Do you need that step though? Because $|x|=max\{x,-x\}$, which is trivially greater than or equal to $-x$. – sodiumnitrate Mar 8 '15 at 3:32

$$a^2+b^2+2|a||b|\geq a^2+b^2+2ab$$ $$(|a|+|b|)^2 \geq |a+b|^2\phantom{a}(\because \forall x\in \mathbb{R};\phantom{;}x^2=|x|^2)$$ $$\therefore |a|+|b|\geq |a+b|$$

If a neat algebraic argument does not suggest itself, we can do a crude argument by cases, guided by the examples $a=7,b=4$, $a=-7,b=-4$, $a=7, b=-4$, and $a=-7, b=4$.

If $a\ge 0$ and $b\ge 0$ then $|a+b|=|a|+|b|$.

If $a\le 0$, and $b\le 0$, then $|a+b|=-(a+b)=(-a)+(-b)=|a|+|b|$.

Now we need to examine the cases where $a$ is positive and $b$ is negative, or the other way around. Without loss of generality we may assume that $|b|\le |a|$.

If $a\gt 0$, then $|a+b|=|a|-|b|$. This is $\lt |a|$, and in particular $\lt |a|+|b|$.

If $a\lt 0$, then again $|a+b|=|a|-|b|$.

A simple proof of the triangle inequality that is complete and easy to understand (there are more cases than strictly necessary; however, my goal is clarity, not conciseness).

Prove the triangle inequality $| x | + | y| ≥ | x + y|$.

Without loss of generality, we need only consider the following cases:

1. $x = 0$
2. $x > 0, y > 0$
3. $x > 0, y < 0$

Case $1$. Suppose $x = 0$. Then we have

$| x| = 0$

$| x| + | y| = 0 + | y| = | y|$

Thus $| x| + | y| = | x + y|$.

Case $2$. Suppose $x > 0, y > 0$. Then, since $x + y > 0$, we have

$| x| = x$

$| y| = y$

$| x| + | y| = x + y$

$| x + y| = x + y$

Thus $| x| + | y| = | x + y|$.

Case $3$. Suppose $x < 0, y < 0$. Then, since $x + y < 0$, we have

$| x| = −x$

$| y| = −y$

$| x| + | y| = (−x) + (−y)$

$| x + y| = −(x + y) = (−x) + (−y)$

Thus $| x| + | y| = | x + y|$.

Case $4$. Suppose $x > 0, y < 0$. Then we have

$| x| = x$

$| y| = −y$

$| x| + | y| = x + (−y)$

We must now consider three cases:

a. $x + y = 0$

b. $x + y > 0$

c. $x + y < 0$

Case $4a$. Suppose $x + y = 0$. Then we have

$| x + y | = |0| = 0$

Since $y < 0$, it follows that $−y > 0$ and thus $x + (−y) > 0 + (-y) = -y > 0$.

Therefore, since $| x| + | y| = x + (−y)$, we must have $| x| + | y| > | x + y|$.

Case $4b$. Suppose $x + y > 0$. Then we have

$| x + y| = x + y$

Since $y < 0$, it follows that $−y > 0 > y$ and thus $x + (−y) > x + y$.

Therefore, since $| x| + | y| = x + (−y)$, we must have $| x| + | y| > | x + y|$.

Case $4c$. Suppose $x + y < 0$. Then we have

$| x + y| = −(x + y) = (−x) + (−y)$

Since $x > 0$, it follows that $x > 0 > −x$ and thus $x + (−y) > (−x) + (−y)$.

Therefore, since $| x| + | y| = x + (−y)$, we must have $| x| + | y| > | x + y|$.

This concludes the proof.

The proof given in Wikipedia / Absolute Value is interesting and the technique can be used for complex numbers:

Choose $\epsilon$ from $\{ -1,1\}$ so that $\epsilon (a+b) \ge 0$. Clearly $\epsilon x \le |x|$ for all real $x$ regardless of the value of $\epsilon$, so

$|a+b|= \epsilon (a+b) = \epsilon a + \epsilon b \le |a|+|b|$

Firstly, observe that $-|x|\leq x\leq|x|$ , and $-|y|\leq y\leq|y|$ follow from the definition of the absolute value function. (Consider the cases $x$ is non-negative and $x$ is negative and what happens to $|x|$, the same goes for $y$ mutatis mutandis).

Since $y\leq|y|$ , then

$$|x|+y\leq|x|+|y|\tag{1}$$

by adding $|x|$ to both sides of $y\leq|y|$ . Likewise, adding $y$ to both sides of $x \leq |x|$ we have: $$y+x \le y+|x|\tag{2}$$

Combining equations $1$ and $2$, and using the transitive property of the relation $\leq$, we have:

$$y+x \le y+|x|\leq |y|+|x|$$ $$y+x\leq |y|+|x|$$

Likewise, since $-|y|\leq y$ , then $-|y|-|x|\leq y-|x|$ by adding $-|x|$ to both sides. But $-|x|\leq x\implies y-|x|\leq y+x$ by adding $y$ to both sides. Thus by the transitive property:

$$-|y|-|x|\leq y-|x|,\text{ and }y-|x|\leq y+x \implies -|y|-|x|\leq y+x \tag{3}$$

By combining equations 2 and 3, we have:

$$-(|y|+|x|)\leq y+x\leq|y|+|x|$$

Now noting that $|b|\leq a\iff-a\leq b\leq a$ , we have:

$$|x+y|\leq|x|+|y|$$

I hope that the following proof is the shortest one and make use of the order in $\mathbb{R}$.

• If $ab\geq 0$ then $$|a+b|= \begin{cases} a-b & if\quad a\geq 0,\; b\geq 0,\\ -a-b & if\quad a\leq 0,\; b\leq 0 \end{cases} =|a|+|b|$$

• If $ab<0$ then $$|a+b|\leq\max\{|a|,|b|\}\leq |a|+|b|.$$

|x+y|^2=(x+y).(x+y) =(x.x)+2(x.Y)+(y.y)
=|x|^2+2(x.Y)+|y|^2 from Cauchy-Schwarz inequality,|x.Y|<=|x||y| |x+y|^2 <=|x|^2+2|x||y|+|y|^2 |x+y|^2 <=(|x|+|y|)^2 taking square root on both sides. |x+y|<=(|x|+|y|)

• Welcome to stackexchange. That said, answering a five year old question with many good answers is not necessarily a good use of your time or ours (since the answer bumps the question to "recently active" so lots of folks look at it. Do pay attention to new questions where you can help. And do use mathjax to format mathematics: math.meta.stackexchange.com/questions/5020/… – Ethan Bolker Dec 27 '18 at 1:23

This proof works alongside the geometric notion that adding numbers on the real line is a 'vector operation'. It also lays out the exact conditions under which the triangle inequality is an equation,

$$\quad |x + y| = |x| + |y|$$.

Recall that in general,

$$\tag 1 a \le b \; \text{ iff } \; \exists \, u \ge 0 \text{ such that } a + u = b$$

It is easy to see that whenever $$x, y \ge 0$$ or $$x, y \le 0$$ the triangle inequality holds since there is
no 'less than' there - $$|x+y| = |x| + |y|$$.

Logically, there are two case left to be dispensed with:

$$\quad \text{Case 1: } \left[x \lt 0 \lt y\right] \text{ and } (-x) \le y$$

$$\quad \text{Case 2: } \left[x \lt 0 \lt y\right] \text{ and } (-x) \ge y$$

Since always $$|z| = |-z|$$, it is only necessary to take care of the first case to prove the triangle inequality.

Case 1

Using $$\text{(1)}$$, we write $$(-x) + u = y$$ for $$u \ge 0$$ and $$(-x) \gt 0$$. Noting that $$u \lt y$$, we have

$$\quad |x + y| = |x + (-x) + u| = |u| = u \lt y \lt (-x) + y = |x| + |y|$$

So only when $$x$$ and $$y$$ 'straddle $$0$$' is the triangle inequality a 'strict less than' relation,

$$\quad |x + y| \lt |x| + |y|$$.