Why are the rational numbers considered countable?

Created from Britannica articles using AI. AI can make mistakes, so verify using Britannica articles.

In mathematics, a set is considered countable (or denumerable) if its elements can be put into a one-to-one correspondence with the set of positive integers (1, 2, 3, …).12

The rational numbers—numbers that can be expressed as a quotient p/q of two integers—are considered countable because they can be systematically paired with the counting numbers. Although it may seem counterintuitive that the set of all fractions is the same size as the set of whole numbers, the German mathematician Georg Cantor rigorously demonstrated this by showing that the rational numbers can be arranged in a sequence that allows every single one to be matched with a unique integer.345

This property distinguishes the rational numbers from the real numbers, which include both rational and irrational numbers. Cantor’s work proved that the infinity of the real numbers is strictly "greater" than the infinity of the rational numbers, as the real numbers cannot be put into a one-to-one correspondence with the integers.64