0

The time to submit this optional question has passed but I'm curious as to what the answer is. We haven't learned what a metric is yet, which is why its a challenge question.

Show that the function $d$ is a metric where

$$d(x,y) = \frac{\left|x-y\right|}{1+\left|x-y\right|}$$

1 Answers1

1

I assume you're working in $\mathbb{R}$, though the same works in $\mathbb{R}^n$ replacing the absolute values with norms. The only tricky part is the triangle inequality. Note that for $x\not=y$:

$$d(x,y) = \frac{|x-y|}{1+|x-y|} = \frac{1}{1+\frac{1}{|x-y|}}$$

The latter is a monotonously increasing function in $|x-y|$, therefore using the triangle inequality in the real numbers, which says that $$|x-y|\le |x-z|+|z-y|$$ for all $x,y,z$, we obtain

$$d(x,y) \le \frac{1}{1+\frac{1}{|x-z|+|z-y|}} = \frac{|x-z|+|z-y|}{1+|x-z|+|z-y|} = \frac{|x-z|}{1+|x-z|+|z-y|} +\frac{|z-y|}{1+|x-z|+|z-y|} \le \frac{|x-z|}{1+|x-z|}+\frac{|z-y|}{1+|z-y|}=d(x,z)+d(z,y).$$

J.R.
  • 17,904
  • 1
    Another way to prove the triangle inequality is to note that $$ \frac{|x - y|}{1 + |x-y|} = 1 - \frac{1}{1+|x-y|} , .$$ – Viktor Vaughn Jan 22 '14 at 18:33