# Are all rational numbers integers?

Aug 27, 2017

No, but all integers are rational numbers (that is, $\mathbb{Z} \subset \mathbb{Q}$).

#### Explanation:

The set of all integers, written as $\mathbb{Z}$, is defined as the positive and negative counting numbers, along with 0:

ZZ = {..., –2, –1, 0, 1, 2, ...}

The set of all rational numbers, written as $\mathbb{Q}$, is defined as all numbers that can be expressed as the ratio of two integers, as long as the denominator is not zero:

$\mathbb{Q} = \left\{\frac{a}{b} | a , b \in \mathbb{Z} , \text{ } b \ne 0\right\}$

From this, it is easy to see that a lot of rational numbers will be integers: as long as $b = \pm 1$, any $a$ chosen will yield a rational number $\frac{a}{b}$ that is also an integer. But for any $b \notin \left\{0 , \pm 1\right\}$, if $a$ and $b$ are co-prime, then $\frac{a}{b}$ is a rational number but not an integer.

## Bonus:

An interesting side note is that, while there are infinitely many rational numbers between any two consecutive integers $z$ and $z + 1$, both $\mathbb{Z}$ and $\mathbb{Q}$ have the same cardinality—that is, there are just as many integers as there are rational numbers.

This is because it is possible to order the elements in each set, giving each element a position number (or ordinal number). In doing so, someone could ask for the element in any position (1st, 2nd, 478th, etc.) and we'd be able to retrieve the element in that position from both sets.