# Is this a valid equation for absolute value?

Suppose I have any three numbers $a,b,$ and $c$. I'm wondering if it's true in general that

$$||a - c| - |b - c || = |a - b|$$

I've been testing this out with numbers and thinking about it in terms of length of lines and it seems to hold true. But I haven't been able to prove it using properties of absolute value.

Edit: Assuming $a$,$b$, and $c$ are all constant

• Try $a=1$, $b=-1$, $c=0$. – Bungo Nov 22 '17 at 0:23
• No, but you can say $||a-c| - |b-c|| \le |a-b|$ This is a variant of the triangle inequality. – Doug M Nov 22 '17 at 0:26
• @Bungo what if a,b, and c are restricted to being positive numbers? – Patty Nov 22 '17 at 0:30
• For a positive counterexample, take $a=2$, $b=1$, $c=3/2$. – Bungo Nov 22 '17 at 0:31
• I see, thanks for the counter examples. – Patty Nov 22 '17 at 0:32

What is true, in fact, is that $||a-c| - |b-c|| \leq |a-b|$. This follows from the fact that $|x| \leq |y| + |x-y|$, so $|x-y| \geq |x|-|y|$, and similarly switch $x$ and $y$ to get $|y-x| \geq|y| - |x|$. Since th LHS on both sides are equal, we get $|y-x| \geq ||y|-|x||$. Put $y = a-c,x=b-c$, then $y-x = a-b$.

The other side would not hold trivially i.e. if we choose inequality in the triangle inequality for example. Taking $x=1,y=-2$ would do, so $c = 0,a=-2,b=1$ would not work, since $|a-c| = 2,|b-c| = 1$ but $|a-b| = 3$, so the inequality is strict.

If $a,b,c$ are positive, then with the same $x=1,y=-2$ we could get various values of $a,b,c$ e.g. $a=1,b=4,c=3$, then $|a-c| = 2,|b-c| = 1$ but $|a-b| = 3$.

• Thanks a lot for the explanation. The inequality $||a−c|−|b−c||≤|a−b|$ is just as useful for what I'm trying to do, so I really appreciate the answer. – Patty Nov 22 '17 at 0:49
• You are welcome! – астон вілла олоф мэллбэрг Nov 22 '17 at 0:50