# Show that $||x|-|y||≤|x-y|$ [duplicate]

Can anyone help me show that:

$||x|-|y||≤|x-y|$

I am new to proofs and I am not sure how I can show something as trivial as this!

You should prove the fact that for all $a,b \in \mathbb{R}$, $|a-b| = |b-a|$. Then:

By the triangle inequality, for all $a,b \in \mathbb{R}$, we have $|a+b| \leq |a| + |b|$.

Let $a=y$ and $b=x-y$. Those are in $\mathbb{R}$ because addition is closed. Then we have $|x| = |y+x-y|$ and $|y+x-y| \leq |y| + |x-y|$, i.e. $|x| \leq |y| + |x-y|$.

So $|x| - |y| \leq |x-y|$.

Now let $a=x$ and $b=y-x$. Then we have $|y| = |x+y-x|$ and $|x+y-x| \leq |x| + |y-x|$, i.e. $|y| \leq |x| + |x-y|$, i.e. $|y| - |x| \leq |x-y|$.

It follows that $-|x-y| \leq |x|-|y|$. Therefore, $-|x-y| \leq |x|-|y| \leq |x-y|$, which is equivalent to $||x|-|y|| \leq |x-y|$.

• Warning: I am incredibly tired and may have made typoes or other such mistakes. The form of the proof is perfectly correct, but I may have switched around $x$s and $y$s. Please read carefully and make sure everything makes sense. – Newb Nov 25 '13 at 9:49

Hint: consider four cases, (1) $x > 0$ and $y > 0$, (2) $x < 0$ and $y > 0$, (3) $x > 0$ and $y < 0$, (4) $x < 0$ and $y < 0$.

• Those $>$ signs should be $\ge$ signs, to cover the cases $x=0$ and/or $y=0$. – TonyK Nov 25 '13 at 8:58