Let $X$ be a metric space with metric defined by $$d(x,y)=\sqrt{|x-y|}$$
where $x, y\in X$.
How do I prove the triangle inequality for the metric $d(x,y)=\sqrt{|x-y|}$?
Let $X$ be a metric space with metric defined by $$d(x,y)=\sqrt{|x-y|}$$
where $x, y\in X$.
How do I prove the triangle inequality for the metric $d(x,y)=\sqrt{|x-y|}$?
We can appeal to properties of square roots in $\mathbb{R}$, namely for all positive $x$ and $y$, $\sqrt{x + y} \leq \sqrt{x} + \sqrt{y}$.
It follows then that, for $x,y,z \in X$,
$\begin{align*} (|x - z|)^{1/2} &= (|x-y + y-z|)^{1/2} \\ &\leq (|x-y| + |y-z|)^{1/2} \\ &\leq (|x-y|)^{1/2} + (|y-z|)^{1/2}. \end{align*}$
$$ d(x,y) \leq d(y,z) + d(x, z) \iff \text{ (square both sides) } \\ |x-y| \leq |y-z| + |x - z| + 2\sqrt{|x - z||y-z|} $$
which is true since $|x-y|$ satisfies the triangle inequality and $2 \sqrt{|x-z||y-z|}$ is a positive number. So you're done.