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}$.

3 Answers3

4

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
  • 100,827
  • 4
  • 86
  • 159
4

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*}

1

Yes, it is. Here is how we can show this. The first three properties are easily verified. To prove the triangle inequality, let $z \in R$. Then,

$$d(x, y) \leq d(x, z) + d(y, z)$$ $$\sqrt{|x - y|} \leq \sqrt{|x - z|} + \sqrt{|y - z|}$$

Squaring both sides,

$$|x - y| \leq (|x - z| + |y - z|)^2$$ $$|x - y| \leq |x - z| + |y - z| + 2|x - z||y - z|$$

Since $2|x - z||y - z|$ is a non-negative value, the above inequality holds, which implies that the original triangular inequality holds as well.

Therefore, $(R, d)$ is a metric space.

  • I think it's different than the other answer (and to be honest I'm a bit surprised that no-one suggested this approach 10 years ago). It's more specific to this particular metric and much easier. However the other answers are more general and stronger and more useful. I'm not sure how useful it is to answer a 10 year old question that is this specific but I'm not going to criticize if a new member does so correctly and in a method not covered in the other answers. – fleablood Oct 03 '24 at 16:47
  • Is it complete metric space? – Mathguide Nov 21 '24 at 12:44