# Do these define metrics on $\mathbb{R}$?

Which of the following define a metric on $\mathbb{R}$?

1. $$d_1(x,y) = \frac{\bigl||x|-|y|\bigr|} {1+|x||y|},$$

2. $$d_2(x,y) = \frac{\bigl||x|+|y|\bigr|} {1+|x||y|}.$$

I think that both option 1 and option 2 are true as both satisfy the triangle inequality and symmetry property. Am I right?

• What about the distance between points being zero if and only if they are the same?Clearly one of these metrics does not have that property. – астон вілла олоф мэллбэрг Jan 1 '18 at 10:35
• Note (2) fails that $d(x,x)=0.$ – coffeemath Jan 1 '18 at 10:35
• happy new year @астонвіллаолофмэллбэрг – lomber Jan 1 '18 at 10:42
• happy new year@coffeemath – lomber Jan 1 '18 at 10:42
• im doubting in option as as it satisfies syymmetric properties and triangle properties – lomber Jan 1 '18 at 10:43

None of them is a metric:

1. $d(1,-1)=0$, but $1\neq-1$;
2. $d(1,1)\neq0$.
• thanks a lots @ jose carlos santos and wish u a very happy new year and ur family – lomber Jan 1 '18 at 11:12

We'll try to prove that $d_1$ is a metric.

Let $|x|=\tan\alpha$, $|y|=\tan\beta$ and $|z|=\tan\gamma$, where $\{\alpha\beta,\gamma\}\subset\left[0,\frac{\pi}{2}\right)$ and $\alpha\geq\beta\geq \gamma$.

Thus, $$\tan(\alpha-\gamma)=\max\{\tan(\alpha-\gamma),\tan(\beta-\gamma),\tan(\alpha-\beta)\}$$ and it's enough to prove that $$\tan(\alpha-\beta)+\tan(\beta-\gamma)\geq\tan(\alpha-\gamma)$$ or $$\frac{\sin(\alpha-\gamma)}{\cos(\alpha-\beta)\cos(\beta-\gamma)}\geq\frac{\sin(\alpha-\gamma)}{\cos(\alpha-\gamma)}$$ or $$\cos(\alpha-\beta+\beta-\gamma)\geq\cos(\alpha-\beta)\cos(\beta-\gamma)$$ or $$-\sin(\alpha-\beta)\sin(\beta-\gamma)\geq0,$$ which is wrong.

• thanks a michael Rozenberg and wush u very happy new year – lomber Jan 1 '18 at 11:12
• You are welcome! Happy new year! – Michael Rozenberg Jan 1 '18 at 11:16

The first one $$d_1(x,y) = \frac{||x|-|y||} {1+|x||y|}$$is a metric. The second one$$d_2(x,y) = \frac{||x|+|y||} {1+|x||y|}$$is not a metric because $d(x,x)=0$ fails to be true for all x in $R$ for example d(1,1) = 1.

• thanks Mohammnad ,,,wish u happy new year – lomber Jan 1 '18 at 11:13
• Thanks. Same to you. – Mohammad Riazi-Kermani Jan 1 '18 at 11:14