Proving the equality case in triangle inequality Background
When plotted on a real number line, it may be deduced that if 
$$a,b,c \in \mathbb{R} $$
$$a < b < c$$
then 
$$\left| {a - c} \right| = \left| {a - b} \right| + \left| {b - c} \right|$$
Problem
But the problem is with the proof. How can the above statement be proven true from the properties of order structure and the definition of absolute value? 
 A: Recall that $$|x| = \left\{\begin{matrix}+x & \text{if } x\ge 0;\\-x & \text{otherwise}.\end{matrix}\right.$$
Using the above-mentioned definition and $a < b < c$, we get
$|a-b|=b-a$, $|b-c|=c-b$, and $|a-c|=c-a$. Consequently, .....
A: To prove it you do cases
$|a-c| = \pm (a-c)$ and $|a-b| + |b- c| = \pm(a-b) + \pm (b-c)$.
consider the ways that $a,b,c$ may be ordered:
(your case is a subcase of case 6: so you can skip to the very last case if you want.)
1:  Assume $a \ge b \ge c$ then
$|a-c| = a-c$ and $|a-b| + |b-c| = (a-b) + (b-c) = a-c = |a-c|$.
2:  Assume $a \ge c \ge b$ then 
$|a-c| = a-c$ and $|a-b| + |b-c| = (a-b) -(b-c) = a-2b + c$.  Now $2b \le 2c$ so $-2b \ge -2c$ and $a-2b + c\ge a -2c +c = a-c = |a-c|$.
3: Assume $b \ge a \ge c$ then
$|a-c| = a-c$ and $|a-b| + |b-c| = -(a-b) +(b-c) = -a+2b - c$.  Now $2b \ge 2a$ so  $-a+2b - c \ge  -a +2a -c = a-c = |a-c|$.
4: Assume $b \ge c \ge a$
$|a-c| = -(a-c) = c-a$ and $|a-b| + |b-c| = -(a-b) +(b-c) = -a+2b - c$.  Now $2b \ge 2c$ so  $-a+2b - c \ge  -a +2c -c = -a+c = |a-c|$.
5: Assume $c \ge a \ge b$
$|a-c| = -(a-c) = c-a$ and $|a-b| + |b-c| = (a-b) -(b-c) = a-2b + c$.  Now $2b \le 2a$ so $-2b \ge -2a$ and $a-2b + c\ge a -2a +c = -a+c = |a-c|$.
6: Assume $c \ge b \ge a$
$|a-c| = -(a-c) = c-a$ and $|a-b| + |b-c| = -(a-b) - (b-c) = (b-a) + (c-b) = -a + c = |a-c|$.
===
The "equality cases are 1) and 6) and they are very straightforward.
A: Since $a<b<c$ we have
$|a-c|=c-a, |a-b|=b-a$ and $|b-c|=c-b$.
This gives:
$$\left| {a - b} \right| + \left| {b - c} \right|=b-a+c-b=c-a=|a-c|.$$
A: Since both sides of the equality are nonnegative, we can square it:
\begin{align}
|a-c| = |a-b| + |b-c| &\iff |a-c|^2 = (|a-b| + |b-c|)^2\\
&\iff a^2-2ac+c^2 = a^2-2ab+b^2+b^2-2bc+c^2 + 2|a-b||b-c|\\
&\iff 0 = b^2 - ab - bc + ac + |a-b||b-c|\\
&\iff 0 = -(a-b)(b-c) + |a-b||b-c|\\
&\iff  (a-b)(b-c) = |a-b||b-c|\\
&\iff a-b \,\text{ and } \,b-c \text{ have the same sign}\\
&\iff a \ge b \ge c \,\text{ or }\,a \le b \le c 
\end{align}
A: Alternatively, equality in the triangle inequality
$$|x+y|\leq |x|+|y|$$
holds if and only if $x$ and $y$ have the same sign; that is if and only if $x\cdot y\geq0$.
Therefore, equality holds in
$$|x-z|\leq |x-y|+|y-z|$$
if and only if
$$(x-y)(y-z)\geq 0\,.$$
This is quite easy to show if $x<y<z$.
