1

is $|a-b| = \bigg||a|-|b|\bigg|$ ?

I have tried a few examples and they seems to come out true, but I can't find any rule stating it.

Is it true for all $a$ and $b$? Or am I missing something?

Please notice I'm not talking about $|a-b| = |a| - |b|$, I know this one does not hold.

Tom Klino
  • 187
  • The last line is unnecessary, I believe. –  Mar 25 '15 at 13:57
  • $\left|\left|a\right|-\left|b\right|\right|\leq\left|a-b\right|$ This is true for every $a,b\in\mathbb{R}$ – Charles Carmichael Mar 25 '15 at 13:57
  • You didn't try any negative number, did you ? Actually, there is no point trying positive values, as $a=|a|$ and $b=|b|$ will trivially make the equality true. –  Mar 25 '15 at 14:30

4 Answers4

7

No, it's not. Take $a=1$, $b=-1$. Then $\lvert a-b\rvert = 2$ but $\lvert\lvert a\rvert-\lvert b\rvert\rvert = 0$.

(You only have an inequality, the reverse triangle inequality: $\lvert a-b\rvert \geq \lvert\lvert a\rvert-\lvert b\rvert\rvert $.)

Clement C.
  • 67,323
  • 4
    To generalize, when one of $a$ or $b$ is positive and the other is negative, then $|a - b| \ne ||a| - |b||$. – LaBird Mar 25 '15 at 13:58
  • Indeed -- see Fermat's answer (above, or below, depending on what Math.SE will eventually decide). – Clement C. Mar 25 '15 at 13:59
5

It is true if and only if $ab\ge 0$.

Fermat
  • 5,230
1

Squaring, you get

$$(a-b)^2=(|a|-|b|)^2,$$ which simplifies to $$ab=|a||b|,$$ not a valid identity.

  • This proves the fact that $ab\geq 0$ for the equation to hold since the equation you found holds iff $a,b$ have the same sign which automatically implies $ab\geq 0$. This concludes Fermat's answer below. – Prasun Biswas Mar 25 '15 at 14:10
0

if we take $a=2$ and $b=-1$ I get: $$|2-(-1)|=3$$ and $$ ||2|-|-1||=1 $$

Karl
  • 710