$\forall x,y \in \mathbb R$ if distance $d(x,y) = \sqrt { |(x - y)|}$,

How can I prove this distance to be metric? I am stuck at triangular equality.

i.e. $ \sqrt{ |x - y| } \leq \sqrt{ | x - z|} + \sqrt{|z - y|} $

I arrived at the relation

$\sqrt x + \sqrt y \geq \sqrt{x+y} $

But how the another variable $z$ comes into the picture remains question to me. Any help appreciated.


First, note that $|x-y|$ is the usual Euclidean distance between two points $x,y\in\mathbb{R}$. Then $\lvert x-y\rvert\le \lvert x-z\rvert+\lvert z-y\rvert$, which is the standard triangle inequality. Using this, $$ \sqrt{\lvert x-y\rvert}\le \sqrt{\lvert x-z\rvert+\lvert z-y\rvert}\le \sqrt{\lvert x-z\rvert}+\sqrt{\lvert z-y\rvert}$$ by the relation you stated. This is the triangle inequality you desire.


In general you can prove that if $(X,d)$ is a metric space, and $f:\mathbb R_{>0}\to\mathbb R_{>0}$ satisfies the conditions

  • $f(x)=0$ if and only if $x=0$.
  • $f$ is (weakly) concave.

then $f\circ d$ is a metric.

The triangle inequality follows from the triangle inequality for $d$ because $f(p)+f(q)\geq f(p+q)$.

In your case, take $f(x)=\sqrt x$.


By squaring we have $$\sqrt {|x-y|}\leq \sqrt {|x-z|}+\sqrt {|z-x|}\iff$$ $$ |x-y|\leq |x-z|+|z-y|+2\sqrt {|x-z|} \sqrt {|z-y|}$$ which is immediate from $|x-y|=|(x-z)+(z-y)|\leq |x-z|+|z-x|.$


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.