[Math] Proof that a discrete metric is indeed a metric space

analysisgeneral-topologymetric-spacesreal-analysis

QUESTION

Let X be any set and $d : X \times X \to \mathbf{R}$ be given by $$ d(x,y) = \begin{cases}
0, & \text{if $x = y$} \\
1, & \text{if $x \neq y$} \\
\end{cases}$$

Show that $d$ is a metric on $X$.

REMARKS

I'm interested in getting to understand this question. First, I assume we're discussing what is known as the Discrete Metric here. But I'm finding it a bit "too easy" to prove the axioms. And so I get the impression that I'm doing it wrong.

For example; when looking at the axioms:

  1. $d(x,y) \ge 0$
  2. $d(x,y) = 0 ,\text{iff}: x=y$
  3. $d(x,y) = d(y,x)$

Both appear to be self-explanatory. The definition of the metric space does make it clear and I find myself doing nothing more than re-stating the definition of the metric to "prove" these points.

$4.$ Triangle Inequality: $d(x,y) \le d(x,z) + d(z,y)$
This I showed by considering a number of different cases (but not all of them – should I do all possible computations of the $x=/\neq y = /\neq z$ combination?) and find this to be true in each case.

I guess all I want to know – is, is the proof of this as simple as it looks?

Thanks

Best Answer

This already has an answer, but I'd still like to share this method! Often we feel it is "necessary" to give a direct proof of the properties which define a metric, however sometimes it is far easier and less painful to simply prove by contradiction!

Assume that $$d(x,y) > d(x,z) + d(y,z)$$ If $x = y$ the we have an immediate contradiction. If $x \not = y$ then $d(x,y) = 1$ then we must have $d(x,z) = 0$ and $d(y,z) = 0$ but now $x = y$ so we have a contradiction.

Related Question