# Prove triangle inequality using the properties of absolute value

So I was given the task of proving the following variant of the triangle inequality using only the properties of the absolute value:

$\vert\lvert x\rvert -\lvert y \rvert \rvert \leq \lvert x+y\rvert$

Now my initial instinct was to divide it to four cases based on the possible values of x and y, and show that in each case I get a truth expression, but it seems a bit "brute force" to me and I'm not sure this is what my instructor meant. Since I'm not allowed to use the actual triangle inequality and must adhere to absolute value properties, is there any other solution?

(Of course he'll accept this answer if it's correct, but I want to learn what it is I'm missing).

• Without the use of the triangle inequality, brute force is looking to me like a good candidate. – graydad Mar 19 '15 at 16:59

This is more difficult without the use of the triangle inequality, but I have a way of doing this proof with two cases instead of four. The only property of absolute value I use is: $|a|^2 = a^2$ for all $a \in \Bbb{R}$. So, \begin{align}\vert\lvert x\rvert -\lvert y \rvert \rvert^2 = \left(\lvert x\rvert -\lvert y \rvert \right)^2 \\ =\lvert x\rvert^2 -2\lvert x\rvert\lvert y \rvert+|y|^2 \end{align} It should be clear that $-2\lvert x\rvert\lvert y \rvert \leq 0$, and it is this observation that both cases will be based on.

Case 1: x and y have the same sign. Then $2xy \geq 0$, so $2xy \geq -2\lvert x\rvert\lvert y \rvert$ and we see that \begin{align}\lvert x\rvert^2 -2\lvert x\rvert\lvert y \rvert+|y|^2 \leq \lvert x\rvert^2 +2xy+|y|^2 \\ = x^2 +2xy+y^2 \end{align}

Case 2: x and y do not have the same sign. Then $2xy = -2\lvert x\rvert\lvert y \rvert$ and we see that \begin{align}\lvert x\rvert^2 -2\lvert x\rvert\lvert y \rvert+|y|^2 = \lvert x\rvert^2 +2xy+|y|^2 \\ = x^2 +2xy+y^2 \end{align}

For all cases, we conclude that $$\lvert x\rvert^2 -2\lvert x\rvert\lvert y \rvert+|y|^2 \leq x^2 +2xy+y^2 \\ \implies \left(\lvert x\rvert -\lvert y \rvert \right)^2 \leq (x+y)^2 \\ \implies \left|\lvert x\rvert -\lvert y \rvert \right|\leq |x+y|$$

The proof of triangle inequality

As you know $xy\le |xy|=|x||y|$ $$(x+y)^2 = |x+y|^2=x^2+2xy+y^2\le |x|^2+2|x||y|+|y|^2$$ taking square root of both sides gives $|x+y|\le |x|+|y|$

The proof of the given inequality $$|x|=|x+y-y|\le |x+y|+|y|\implies |x|-|y|\le|x+y|$$ changing the role of $x$ and $y$ gives $$|y|-|x|\le |x+y|$$ if multiply both sides by $-1$ we get $-|x+y|\le |x|-|y|$ Now $$-|x+y|\le |x|-|y|\le |x+y|$$ which holds iff $$||x|-|y||\le |x+y|$$

• Yes. the given inequality is not triangle inequality but it is a consequence of it. To prove triangle inequality itself write (you know $xy\le |xy|=|x||y|$) $$(x+y)^2 = |x+y|^2=x^2+2xy+y^2\le |x|^2+2|x||y|+|y|^2$$ taking square root of both sides gives $|x+y|\le |x|+|y|$ – Fermat Mar 19 '15 at 17:02