Distance on Real Numbers is Metric

Real Number Line
Let $$x, y \in \mathbb{R}$$ be real numbers.

Let $$\left|{x - y}\right|$$ be the absolute value of $$x - y$$.

Then the function $$d \left({x, y}\right) = \left|{x - y}\right|$$ is a metric on $$\mathbb{R}$$.

The real number $$\left|{x - y}\right|$$ is called the distance between $$x$$ and $$y$$.

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

Proof for Real Number Line
We check the criteria for $$d$$ being a metric space in turn.


 * M0: $$\forall x, y \in X: \left|{x - y}\right| \ge 0$$:

This follows from the definition of absolute value.


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

Again, this follows from the definition of absolute value.


 * M2: $$\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|$$.


 * M3: $$\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.