Prove: Use the triangle inequality to prove that for all $x, y, z, |x-z|≤|x−y|+|y−z|$
Is my proof correct?
Proof:
Let $a = x-y$, and $b=y-z$.
We can say that $|a+b| = |(x-y) + (y-z)| = |x - z|$.
Further more we can say:
$$|a| + |b -a| \ge |a + b -a| = |b|$$
$$|b| + |a -b| \ge |b + a -b| = |a|$$
Move |a| to the right side in the first inequality and |b| to the second inequality. We get:
$$|b +a| \ge |b| + |a|$$
$$|a +b| \ge |a| +|b|$$
From absolute value properties we know that $|b+a|=|a+b|$
Combining these two facts together we get:
$$|a+b| \le |a|+|b|$$
Which implies
$$|x − z | ≤ | x − y | + | y − z |$$
Or applying the triangle inequality directly we can also prove it this way:
Proof:
Let $a = x-y$, and $b=y-z$.
We can say that $|a+b| = |(x-y) + (y-z)| = |x - z|$.
Substituting $a$ and $b$ into given inequality we get
$$|a+b| \le |a|+|b|$$
which by claim is equivalent to the triangle inequality. QED.