How does the triangle inequality work for $|x-y|$?

37.2k Views Asked by At

I know that $|x+y|\leq |x|+|y|$... But is it similar for $|x-y|$? That is, is $|x-y|\leq |x|+|y|$? I ask because of the following:

$x-y=x+(-y)$, so $|x+(-y)|\leq |x|+|-y|=|x|+|y|$

Is it possible that there is a "better" inequality? For example is $|x-y|\leq |x|-|y|$? My textbook only mentions the fact about $|x+y|$ but nothing about any other form.

2

There are 2 best solutions below

2
On BEST ANSWER

Indeed, you are correct in your intuition. Moreover, we also have $$ |x-y|\ge \left|\; |x|-|y|\; \right| $$

4
On

The proof of the "reverse triangle inequality" requested in the other comments: given the basic TE, $$\def\abs#1{\lvert#1\rvert}\abs{x + y} \leq \abs{x} + \abs{y},$$ subtract $\abs{y}$ from both sides: $$\abs{x + y} - \abs{y} \leq \abs{x}.$$ Now replace $x + y$ with $x$, and thus $x$ with $x - y$ (if you don't get this: use a new variable $z = x + y$, so $x = z - y$, and then replace $z$ with $x$ later because the names are meaningless): $$\abs{x} - \abs{y} \leq \abs{x - y}.$$ By symmetry of $x$ and $y$, we also have $$\abs{y} - \abs{x} \leq \abs{y - x} = \abs{x - y}.$$ Therefore $$\bigl\lvert\abs{x} - \abs{y}\bigr\rvert = \pm(\abs{x} - \abs{y}) \leq \abs{x - y}.$$