# Rational Numbers form Metric Space

## Theorem

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

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

$\map d {x_1, x_2} = \size {x_1 - x_2}$

where $\size x$ is the absolute value of $x$.

Then $d$ is a metric on $\Q$ and so $\struct {\Q, d}$ is a metric space.

## Proof

From the definition of absolute value:

$\size {x_1 - x_2} = \sqrt {\paren {x_1 - x_2}^2}$

This is the same as the Euclidean metric.

This is shown in Euclidean Metric on Real Vector Space is Metric to be a metric.

From Rational Numbers form Vector Space, it follows that the set of all rational numbers is a 1-dimensional Euclidean space.

$\blacksquare$