Distance on Real Numbers is Metric

Theorem
Let $x, y \in \R$ be real numbers.

Let $d \left({x, y}\right)$ be the distance between $x$ and $y$. That is, $d(x,y) = |x-y|$.

Then $d \left({x, y}\right)$ is a metric on $\R$.

Thus it follows that $\left({\R, d}\right)$ is a metric space.

Proof
We check the metric space axioms in turn.


 * M1: $\forall x \in X: \left|{x - x}\right| = 0$

This follows from the definition of absolute value.


 * M2: $\forall x, y, z \in X: \left|{x - y}\right| + \left|{y - z}\right| \ge \left|{x - z}\right|$

We have $\left({x - y}\right) + \left({y - z}\right) = \left({x - z}\right)$.

The result follows from the Triangle Inequality.


 * M3: $\forall x, y \in X: \left|{x - y}\right| = \left|{y - x}\right|$

As $x - y = - \left({y - x}\right)$, it follows from the definition of absolute value that $\left|{x - y}\right| = \left|{y - x}\right|$.


 * M4: $\forall x, y \in X: x \ne y \implies \left|{x - y}\right| > 0$

This follows from the definition of absolute value.