# Prove that $d$ is a metric

It is given that $d$ is a real-valued function on $X \times X$ which for all x, y and z in X satisfies $d(x,y)=0$ iff x=y and $$d(x,y)+d(x,z)\geq d(y,z)$$

In order to show that $d$ is a metric is left for me to show that $d(x,y)=d(y,x)$. I guess I cannot wrap my head around it at the time. I am working on it now. Thank you for your help! Now $$d(y,x)\leq d(z,y)+d(z,x)$$

-
Is the property $d(x,y)+d(x,z)\geq d(y,z)$ or $d(x,y)+d(y,z)\geq d(x,z)$? – Asaf Karagila Jan 30 '13 at 23:46
Don't you also need to show that $d(x,y) \ge 0$? I don't see it specified anywhere. – Erick Wong Jan 30 '13 at 23:47
@ Erick you probably right, I think i need to show that as well, I dont know why I keep thinking thats irrelevant, but it not.. you are right – Klara Jan 30 '13 at 23:48
@Asaf I wrote it right – Klara Jan 30 '13 at 23:49

$$\underline{d(x,y)}=d(x,y) + d(x,x)+d(y,y)\underline{\geq d(y,x)}+d(y,y)\underline{\geq d(x,y)}.$$

For non-negativity a similar argument applies: $$2d(x,y)=d(x,y)+d(x,y)\geq d(y,y)=0\implies d(x,y)\geq 0.$$

-
Do you have any ideas about showing non-negativity of $d$? – Amr Jan 30 '13 at 23:54
@Amr: Yes.${}{}$ – Asaf Karagila Jan 30 '13 at 23:56
Ah. I see. ${}{}$ (+1) – Amr Jan 30 '13 at 23:57
@ Asaph, so you show that d(x,y)>=d(x,y)? what does this prove? – Klara Jan 31 '13 at 0:00
@Klara: No, I show that $d(x,y)\geq d(y,x)\geq d(x,y)$. Also, it's Asaf. – Asaf Karagila Jan 31 '13 at 0:01

$d(x,y)=d(x,y)+d(x,x) \geq d(y,x)$ and $d(y,x)=d(y,x)+d(y,y)\geq d(x,y)$

So $d(x,y) = d(y,x)$

-
Do you have any ideas about showing non-negativity of d? – Amr Jan 30 '13 at 23:55