Prove that if ($d(x,y)=0$ iff $x=y$) and if $d(x,z)\leq d(x,y)+d(z,y)$ then $d$ is a metric Let S be a set and d a function from $S \times S$ into $\mathbb{R}$ such that $d(x,y)=0$ if and only if $x=y$ and $d(x,z) \leq d(x,y) + d(z,y)$ for all $x,y,z \in S$. Show that d is a metric.
Here, we are (seemingly) given only 2 of the axioms necessary to show that d is a metric, but are asked to make the conclusion anyway. I suppose that $d(x,y)=d(y,x)$ is hidden within the second given (Wikipedia backs that up), but I can't see how to get to it.
 A: We actually need to show two things: $d(x,y)=d(y,x)$ and $d(x,y)\ge0$. For the first statement, we have $d(x,y)\le d(x,x)+d(y,x)=d(y,x)$, and by interchanging $x$ and $y$ we get $d(y,x)\le d(x,y)$. Hence $d(x,y)=d(y,x)$. For the second statement, $0=d(x,x)\le d(x,y)+d(x,y)=2d(x,y)$, so $d(x,y)\ge0$.
A: Try to show that $d(x, y) \le d(y, x)$ and $d(y, x) \le d(x, y)$.
A: Fix two arbitrary $a,b \in S$. For all $x,y,z \in S$,
$$d(x,z) \leq d(x,y)+d(z,y)$$
In particular, following, Simon's hint, we can let $x=y=a$ and $z=b$ to get
$$d(a,b) \leq d(a,a)+d(b,a)$$
$$d(a,b) \leq d(b,a)$$
Similarly we can let $x=y=b$ and $z=a$ to get
$$d(b,a) \leq d(b,b) + d(a,b)$$
$$d(b,a) \leq d(a,b)$$
If two real numbers are less than or equal to each other, they are equal (by trichotomy).

We've shown symmetry, but we need to show that $d(a,b) \geq 0$. Suppose, for contradiction, that $d(a,b) <0$. Then the first equation in this answer can be used once again, but with $x=z=a$ and $y=b$, to get
$$d(a,a) \leq d(a,b)+d(a,b)$$
Dividing by two and using our assumption towards a contradiction, we get following ridiculous statement:
$$0 \leq d(a,b) <0$$
This concludes the proof.
