# Prove that $\left|(|x|-|y|)\right|\leq|x-y|$

Prove that $\left|(|x|-|y|)\right|\leq|x-y|$

Proof:

\begin{align} \left|(|x|-|y|)\right| &\leq|x-y| \\ {\left|\sqrt{x^2}-\sqrt{y^2}\right|}&\leq \sqrt{(x-y)^2} &\text{(\sqrt{a^2}=|a|)}\\ \sqrt{\left(\sqrt{x^2}-\sqrt{y^2}\right)^2}&\leq \sqrt{(x-y)^2} &\text{(\sqrt{a^2}=|a|)} \\ \left(\sqrt{x^2}-\sqrt{y^2}\right)^2 &\leq (x-y)^2&\text{(0\leq a\leq b\implies a^2\leq b^2)}\\ \left(\sqrt{x^2}\right)^2-2\sqrt{x^2}\sqrt{y^2}+\left(\sqrt{y^2}\right)^2&\leq x^2-2xy+y^2 &\text{(Distribution)} \\ |x|^2-2|x||y|+|y|^2&\leq x^2-2xy+y^2 &\text{(\sqrt{a^2}=|a|)}\end{align} \\

From here, we can see that $|x|^2+|y|^2=x^2+y^2$, and it suffices to show that the following holds: $$-2|x||y|\leq -2xy.$$

When $x>0,y>0$ or $x<0,y<0$, the product $xy$ is positive, and so $-2|x||y|=-2xy$ holds.

When $x<0,y>0$ or $x>0,y<0$, the product $xy$ is negative, and so $-2xy>0$, and it follows that:

$$-2|x||y|<0<-2xy.$$

$\square$

Is this proof valid? I am unsure if I overlooked anything, also I have some specific questions about the proof (if it is valid up to this point). From the 3rd to the 4th inequality, it feels like I am making a leap in knowing that $a\leq b$ prior to proving what's to be proved by using the result $a^2\leq b^2$. Is this a problem?

What are some alternative ways of showing this inequality?

• BTW this is called reverse triangle inequality. See here or here. – Martin Sleziak Feb 10 '16 at 7:36

Your proof is valid, but too complicated. The inequality to prove is equivalent to $$(|x|-|y|)^2\le(x-y)^2$$ that, taking into account that $|a|^2=a^2$, can be rewritten as $$x^2-2|x|\,|y|+y^2\le x^2-2xy+y^2$$ which is equivalent to $$-|x|\,|y|\le -xy$$ or $$xy\le|xy|$$ Now, for any real number $a$, the inequality $a\le|a|$ is true.

You are asking for alternative ways of showing this inequality.

Actually, from the triangle inequality

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

it follows $|x|-|y| \leq |x-y|$ and analogously, or by symmetry $|y|-|x| \leq |x-y|$ which together shows

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

Hint for a shortcut:

• $\left|x\right|=\left|y+x-y\right|\leq\left|y\right|+\left|x-y\right|$
• switch $x$ and $y$ in the first hint.

Because of the triangle inequality, there is: $$\left| x+y \right| \le \left| x \right| +\left| y \right|$$. Using this fact:

\begin{align} \left| x \right| &= \left| (x-y)+y \right| \\ &\le \left| x-y \right| +\left| y \right| \\ \left| x \right| -\left| y \right| &\le \left| x-y \right| \tag{1} \end{align}

Proceeding similarly:

\begin{align} \left| y \right| &= \left| (y-x)+x \right| \\ \left| y \right| &\le \left| y-x \right| +\left| x \right| \\ \left| y \right| -\left| x \right| &\le \left| y-x \right| \tag{2} \\ \end{align}

And finally combining $$(1)$$ and $$(2)$$ :$$\left|(|x|-|y|)\right|\leq|x-y|$$