TITLE: Is $d(x,y) = (x-y)^2$ a metric on $\Bbb R$?
QUESTION [6 upvotes]: For $x,y,z \in \Bbb R$, define $d(x,y):= (x-y)^2$
Is this a metric on $\Bbb R$?
It's clear that $d(x,x)=0$ and $d(x,y)=d(y,x)$ for all $x,y \in \Bbb R$. 
The triangle inequality seems to have a contradiction [$d(x,z) \leq d(x,y) +d(y,z)$]
If I let $x=1$, $y=0$ and $z=-1$, then I will have $(1+1)^2 = 4 > (1-0)^2 + (0+1)^2 = 2$.
So is this $d$ a metric? If it's, how can I prove it?

REPLY [3 votes]: The function $d$ defined is not a metric. The triangle inequality fails, and you showed a counter-example yourself. Good job.