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$:


 * $d \left({x, y}\right) = \left|{x - y}\right|$

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.

Axiom $(M1)$
The statement of this axiom is:


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

This follows from the definition of absolute value.

Axiom $(M2)$
The statement of this axiom is:


 * $(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.

Axiom $(M3)$
The statement of this axiom is:


 * $(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|$.

Axiom $(M4)$
The statement of this axiom is:


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

This follows from the definition of absolute value.

Having verified all the axioms, we conclude $d$ is a metric.