# do the following define a metric on $R$?

Let $d(x,y) = (x-y)^2$ and $d(x,y) = \sqrt{|x-y|}$. MY claims is that the first one does not define a metric on $\mathbb{R}$ since $d(-1,1) = 4$ while $d(-1,0) = d(0,1) = 1$ and hence the triangle inequality is violated. For the second one, my intuition tell me that it is indeed a metric. The first axioms are obvious. We still need to show the triangle inequality holds. But, notice

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

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

I am still unsure about the last inequality. Does it hold? I think it follows because

$$(\sqrt{x} + \sqrt{y})^2 = x + y + \sqrt{xy} \geq x + y = (\sqrt{x+y})^2$$

is this correct? Any feedback would be appreciated. thanks

-
yes................ – user124140 Jan 31 '14 at 8:51
Yeah, the last statement is (almost) correct for positive $x, y$ (it’s $2\sqrt{xy}$ really) which justifies your inequality. – k.stm Jan 31 '14 at 8:52
how about the first part? is it correct? – user124140 Jan 31 '14 at 8:54
@Learner, yes it is. – Nameless Jan 31 '14 at 8:55

Indeed, for $x,y\geq0$, you correctly showed that $\sqrt x + \sqrt y \geq \sqrt{x+y}$. $d$ is indeed a metric. In fact, square-rooting any metric is still a metric, as you have shown.