Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

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

$d_2(x,y) = \sqrt{|x-y|}$

$d_3(x,y) = |f(x)-g(x)|$ where $f:\mathbb{R}\rightarrow \mathbb{R}$ is strictly monotonic increasing function.

Here is my attempt:

$d_1(x,y)$ satisfies all the three conditions.

$d_2(x,y)$ may fail to satisfy triangle inequality.

$d_3(x,y)$ is not a well defined function.

I am not sure whether i am correct or not? I need a proper justifications.

Thanks for giving me time.

share|cite|improve this question
Note that $d_{1}(-1,1)=0$. – T. Eskin May 17 '12 at 10:55
@ThomasE. Great comment. Simple and elegant. – srijan May 17 '12 at 11:20
up vote 2 down vote accepted

You’re certainly right about $d_3$, since we’re told absolutely nothing about $g$.

To show that $d_2$ may fail to satisfy the triangle inequality, you need to produce an actual example of such a failure. What if $x=0,y=1/2$, and $z=1$?

You need to take another look at $d_1$: what if $|x|<|y|$?

share|cite|improve this answer
if we have $d_1(x,y) = \frac{|x-y|} {1+|x||y|}$ , can we say that it will form metric space? – srijan May 17 '12 at 10:16
@srijan: What happens if $x=0,y=1,z=2$? Does the triangle inequality hold for all permutations of those three points? – Brian M. Scott May 17 '12 at 10:22
Certainly it will not satisfy triangle inequality for $x = 0$, $y = 2$, $z = 1$. Heartily thanks to you sir. – srijan May 17 '12 at 10:27
One last question sir: What if g is also strictly monotonically increasing function? – srijan May 17 '12 at 10:30
@srijan: And $d_3(x,y)=|f(x)-g(y)|$? It won’t satisfy $d_3(x,x)=0$ for all $x$ unless $f=g$. – Brian M. Scott May 17 '12 at 10:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.