4

For $x,y \in \mathbb{R}$, define $d(x,y) = \sqrt{|x-y|}$.

Is this a metric on $\mathbb{R}$?

It's clear that $d(x,x) = 0$ and $d(x,y) = d(y,x)$ for all $x,y \in \mathbb{R}$. The triangle inequality seems to hold for all values I have tested, but I have not found this function anywhere online as an example of a metric on $\mathbb{R}$.

2 Answers2

3

Sure looks like it. It's translation invariant, so to prove the TE for $x \le y \le z$, adjust everything so that the lowest, $x$, of the three values is at $0$ (i.e., add $-x$ to all three numbers). Then you need to show that $$ \sqrt{y} + \sqrt{z} \ge \sqrt{y+z} $$ for any nonnegative $y$ and $z$, which is true (by just squaring both sides).

John Hughes
  • 93,729
3

In general, if $f:[0, \infty) \to [0, \infty)$ is a non-decreasing, concave function (i.e., $f(u + v) \leq f(u) + f(v)$ for all non-negative $u$ and $v$) vanishing only at $0$, then $d(x, y) = f\bigl(|x - y|\bigr)$ defines a metric on $\mathbf{R}$. Symmetry and positive-definiteness are obvious. The triangle inequality holds since for all real $x$, $y$, and $z$, \begin{align*} d(x, z) &= f\bigl(|x - z|\bigr) \\ &\leq f\bigl(|x - y| + |y - z|\bigr) && \text{ordinary triangle inequality, $f$ non-decreasing,} \\ &\leq f\bigl(|x - y|\bigr) + f\bigl(|y - z|\bigr) && \text{$f$ concave,} \\ &= d(x, y) + d(y, z). \end{align*}