# Explain why $|x - y|^2$ is not a metric.

Define $d(x,y) = |x - y|^2$ . Explain why d is not a metric.

I have seen that the first two properties of a metric hold, so naturally it's left to prove that the triangle inequality does not hold. But after some algebra, I get stuck at the following:

$2|y|(|x| + |z|)-2|x||z|- 2|y|^2<= 0$

Am I missing something obvious here? I am not sure how to prove that this inequality doesn't hold from here.

• On what space.? – Nosrati Feb 21 '17 at 5:39
• Its R x R. Sorry I couldn't figure out how to format that part on this site @MyGlasses – Hoodtingz Feb 21 '17 at 5:39
• Give an counterexample. – Nosrati Feb 21 '17 at 5:40
• For what it's worth, on $\Bbb{R}$, we have $d(0,4)=16$ and $d(0,2)=d(2,4)=4$, so we don't have $d(0,4)\le d(0,2)+d(2,4)$. Probably works on $\Bbb{R}^2$ too: just look at $(0,0)$, $(0,2)$, and $(0,4)\in \Bbb{R}^2$. – ForgotALot Feb 21 '17 at 5:40

On $\mathbb{R}$ we have: $$d(0,1)=1$$ and $$d(0,\frac{1}{2})=d(\frac{1}{2},1)=\frac{1}{4}$$ under your proposed metric. Hence $$d(0,1)>d(0,\frac{1}{2}) +d(\frac{1}{2},1).$$
Note that this extends to $\mathbb{R}^2$ by simply taking the second coordinate zero.