2

I want to porve the triangle inequality:

$x, y \in \mathbb{R} \text { Then } |x+y| \leq |x| + |y|$

I figured out that probably the cases:

  1. $x\geq0$ and $y \geq 0$
  2. $x<0$ and $y < 0$
  3. $x\geq0$ and $y < 0$
  4. $x<0$ and $y \geq 0$ <- Here I am not sure...

have to be proven. However, I do not figured out a concrete method. Are my assumptions true? How to finish the prove with these assumptions. I really appreciate your answer!!!

Le Chifre
  • 1,297

5 Answers5

13

You can use the following

For any $x,a\in\Bbb R$, we have that $|x|\leq a$ if and only if $-a\leq x\leq a$

Then since we have $-|x|\leq x\leq |x|$ and $-|y|\leq y\leq |y|$ for any pair $x,y$, this gives $$-(|x|+|y|)\leq x+y\leq |x|+|y|$$

which by the claim is equivalent to $|x+y|\leq |x|+|y|$, which is the triangle inequality.

Pedro
  • 125,149
  • 19
  • 236
  • 403
3

Hint: If both $x,y \geq 0$ or both $x,y \leq 0$ then we just have,

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

If one is greater than zero and one is less than zero, then it should be obvious that if it does not matter which one I prove it for.

3

My favorite way to deal with absolute values is to use the definition I learned from Edsger W. Dijkstra's writings probably learned from either Wim Feijen or Jeremy Weissmann, viz. $$|x| = x \:\max\: -x$$ (see Wim Feijen and Netty van Gasteren's WF228 [PDF] for the earliest reference I could find) and then use the nice properties of $\;\max\;$ instead of the less nice properties of $\;|\cdot|\;$. Here this helps me a lot, since it prevents a proof by cases.

Working from the right of the left of the equation, the proof becomes a straightforward calculation: \begin{align} & |x|+|y| \\ = & \;\;\;\;\;\text{"the above definition of $\;|\cdot|\;$, twice"} \\ & (x \:\max\: -x) + (y \:\max\: -y) \\ = & \;\;\;\;\;\text{"$\;+\;$ distributes over $\;\max\;$, three times"} \\ & (x + y) \:\max\: (x-y) \:\max\: (-x+y) \:\max\: (-x-y) \\ = & \;\;\;\;\;\text{"reintroduce $\;|\cdot|\;$ using the above definition, twice"} \\ & |x+y| \:\max\: |x-y| \\ \geq & \;\;\;\;\;\text{"basic property of $\;\max\;$"} \\ & |x+y| \\ \end{align} Note that in the middle steps I have implicitly used the fact that $\;\max\;$ is associative and symmetric.

2

If both $x$ and $y$ are $0$ or $x=-y$ then the inequality is clear. Otherwise we note that for $x,y\in\mathbb{R}$ $x\le|x|$ and similarly $y\le|y|$, which follows from the definition of the absolute value.

This tells us that $x+y\le|x|+|y|$ which implies $\frac{x+y}{|x|+|y|}\le1$ since $|x|+|y|>0$.

Thus, $|x+y|=|\frac{x+y}{|x|+|y|}|(|x|+|y|)=\frac{1}{sgn\bigg(\frac{x+y}{|x|+|y|}\bigg)}\frac{x+y}{|x|+|y|}(|x|+|y|)\le|x|+|y|$.

user71352
  • 13,233