Proof that $|d(x,y) + d(y,z)| \leq d(x,z)$

695 Views Asked by At

Here there is my proof (quite short and easy) of a rather straightforward result.

Still, I would like to know:

  1. if it is sound, because absolute value always creates me some problem, and
  2. if there is a shorter (neater) way to get the result.

Proposition: $|d(x,y) + d(y,z)| \leq d(x,z)$.

Proof:
We proceed by cases.
If $d(x,y) + d(y,z) \geq 0$, then by the triangle inequality the result is established.
If $d(x,y) + d(y,z) <0$, then $$ -d(x,y) - d(y,z) \leq d(x,y)-d(y,z) \leq d(x,z),$$ where the last inequality holds by the triangle inequality again. $\square$


As always, any feedback is welcome.
Thank you for your time.

2

There are 2 best solutions below

2
On

$|d(x,y)+d(y,z)|=d(x,y)+d(y,z)$ since the metric only returns non-negative values.

0
On

First of all, you are using the wrong triangle inequality. Second of all, by the distance function, we know that the distance between two points must be greater than or equal to zero. Here is a my proof of the problem:

From the triangle inequality, we know that $d(x,y)+d(y,z) \geq d(x,z)$. Since $d(x,y)+d(y,z) \geq 0$ (we know this from the definition of distance functions), we know that $|d(x,y)+d(y,z)|=d(x,y)+d(y,z)$. Therefore, $|d(x,y)+d(y,z)| \geq d(x,z)$. $QED$