# Distance function is in fact a metric

I know I should be able to show this, but for some reason I am having trouble. I need to show that $$d(x,y) = \frac{|x-y|}{1+|x-y|}$$ is a metric on $\Bbb R$ where $|*|$ is the absolute value metric. I am getting confused trying to show that the triangle inequality holds for this function. My friend also said that he proved that this distance function defines a metric even if you replace $|*|$ with any other metric. So I'd like to try and show both, but I cannot even get the specific case down first. Please help.

• Look at the function $t \mapsto \frac{t}{1+t}$. One of its properties is important to see that $d$ is a metric. Can you guess which? Oct 19 '14 at 23:32
• You'll never use the fact that $|x-y|$ is the expression in question, just that it satisfies the triangle inequality. Replace your expression by $$\bar{d}(x,y) = \frac{d(x,y)}{1 + d(x,y)}$$ where $d$ is any given metric. You gotta prove that $\bar{d}$ is a metric. You'll have to look at the function $1/(1+t)$ like everyone is saying. Just check that it is increasing using the definition instead of calculus, then. Oct 19 '14 at 23:47
• @MatthewLevy: Many times, working the abstract case is easier than the specific case because a lot of unnecessary details that would distract you have been removed and it is easier to focus to what matters. Oct 20 '14 at 0:25

Hint:

Put $f(t) = \frac{t}{1+t}$. Verify yourself that

$$f'(t) = \frac{1}{(1+t)^2 }$$

Hence, $f'(t) \geq 0$ for all $t$. In particular $f$ is an increasing function. In other words, we have

$$|x+y| \leq |x| + |y| \implies f(|x+y|) \leq f(|x|+|y|) \implies .....$$

• I cannot use any calculus, it was not proven yet. Oct 19 '14 at 23:40
• @Horacio, $f$ is increasing is not good enough to get $f(|x|+|y|)\leq f(|x|)+f(|y|)$... did you have something else in mind? Oct 19 '14 at 23:41
• @MatthewLevy If you write it in the form $f(t) = 1 - \frac{1}{1+t}$, you can prove the monotonicity without calculus. Oct 19 '14 at 23:47

Suppose that $d(\cdot,\cdot)$ is a arbitrary metric and $\bar{d}(x,y)=\frac{d(x,y)}{1+d(x,y)}$, then we prove the triangle inequality for $\bar{d}(\cdot,\cdot)$ as following:

$\bar{d}(x,y)+\bar{d}(y,z)=\frac{d(x,y)}{1+d(x,y)}+\frac{d(y,z)}{1+d(y,z)}\geq \frac{d(x,y)+d(y,z)}{1+d(x,y)+d(y,z)}\geq\frac{d(x,z)}{1+d(x,z)}=\bar{d}(x,z)$

• I dont see why the last inequality is true, without using calculus.
– aram
Oct 25 '14 at 22:24
• Closer to 1/1? How would you prove that is increasing? Oct 27 '14 at 22:52
• @Aram: Note that $d(x,y)+d(y,z)\geq d(x,z)$ since $d(\cdot,\cdot)$ is a metric. Oct 28 '14 at 2:31
• @MatthewLevy: The function $f(x)=\frac{x}{1+x}$ is an increasing function in $[0,+\infty)$. Oct 28 '14 at 2:33
• @Aram: Well, $A\geq B\geq0\Rightarrow 1+A\geq 1+B\geq 1\Rightarrow\frac{1}{1+A}\leq\frac{1}{1+B}\Rightarrow \frac{A}{1+A}=1-\frac{1}{1+A}\geq1-\frac{1}{1+B}=\frac{B}{1+B}$. Oct 28 '14 at 10:12

Let $f(x)=x/(1+x)$, so $f$ is continuous on $[0,\infty)$, maps $[0,\infty)$ into itself, is non-decreasing since$f(x)=1-1/(x+1)$, $f(0)=0$ and subadditive, since $f''=-2/(1+x)^3<0$ for $x>0$.

It's easy to show that if a function satisfies the above properties, for any metric $d$ then $f\circ d$ is a metric.

To verify that $f''<0$ give us subbaditivity. $f'$ is decreasing so we can use the following result click