Rational Numbers form Metric Space

Theorem
Let $$\Q$$ be the set of all rational numbers.

Let $$d: \Q \times \Q \to \Q$$ be defined as:


 * $$d \left({x_1, x_2}\right) = \left|{x_1 - x_2}\right|$$

where $$\left|{x}\right|$$ is the absolute value of $$x$$.

Then $$d$$ is a metric on $$\Q$$ and so $$\left({\Q, d}\right)$$ is a metric space.

Proof
From the definition of absolute value:


 * $$\left|{x_1 - x_2}\right| = \sqrt {\left({x_1 - x_2}\right)^2}$$.

It is clear that this is the same as the euclidean metric, which is shown in Euclidean Metric is a Metric to be a metric.

As the rational numbers form a vector space, it follows that the set of all rational numbers is a 1-dimensional Euclidean space.