# Are all rational numbers integers?

##### 1 Answer

No, but all integers are rational numbers (that is,

#### Explanation:

The set of all integers, written as

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

The set of all rational numbers, written as *ratio* of two integers, as long as the denominator is not zero:

#QQ={a/b | a,b in ZZ," "b != 0}#

From this, it is easy to see that a lot of rational numbers will be integers: as long as **not** an integer.

## Bonus:

An interesting side note is that, while there are infinitely many rational numbers between any two consecutive integers *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.