$|x-z| \leq |x-y|+|y-z|$
We know that both LHS and RHS are non negatives. So, I thought of proving this by comparing the squares of both sides but can't advance beyond that step. Any help would be appreciated.
$|x-z| \leq |x-y|+|y-z|$
We know that both LHS and RHS are non negatives. So, I thought of proving this by comparing the squares of both sides but can't advance beyond that step. Any help would be appreciated.
If two of the variables are equal, it is easy. If they are not, there are six orderings. Each order gives you a way to resolve the absolute value signs. You can check them all.
If you know that $|a+b|\le|a|+|b|$ holds for any real numbers $a$, $b$, $c$ (this is triangle inequality), then you can simply plug in $b=x-y$ and $c=y-z$.
You get $a+b=x-z$ and $$|x-z|\le|x-y|+y-z|.$$
Another way, as we are concerned only with distances between points on the real line WLOG we can shift the origin, so set $y=0$, to simplify the inequality. Now easy to check cases or use your squaring argument.