Set Theory – Are There More Rational Numbers Than Integers?

elementary-set-theoryinfinity

I've been told that there are precisely the same number of rationals as there are of integers. The set of rationals is countably infinite, therefore every rational can be associated with a positive integer, therefore there are the same number of rationals as integers. I've ignored sign-related issues, but these are easily handled.

To count the rationals, consider sets of rationals where the denominator and numerator are positive and sum to some constant. If the constant is 2 there's 1/1. If the constant is 3, there's 1/2 and 2/1. If the constant is 4 there's 1/3, 2/2 and 3/1. So far we have counted out 6 rationals, and if we continue long enough, we will eventually count to any specific rational you care to mention.

The trouble is, I find this very hard to accept. I have two reasons. First, this logic seems to assume that infinity is a finite number. You can count to and number any rational, but you cannot number all rationals. You can't even count all positive integers. Infinity is code for "no matter how far you count, you have never counted enough". If it were possible to count to infinity, it would be possible to count one step less and stop at count infinity-1 which must be different to infinity.

The second reason is that it's very easy to construct alternative mappings. Between zero and one there are infinitely many rational numbers, between one and two there are infinitely many rational numbers, and so on. To me, this seems a much more reasonable approach, implying that there are infinite rational numbers for every integer.

But even then, this is just one of many alternative ways to map between ranges of rationals and ranges of integers. Since you can count the rationals, you can equally count stepping by any amount for each rational. You can use 1..10 for the first rational and 11..20 for the second etc. Or 1..100 and 101..200 etc, or 1..1000 and 1001..2000 etc. You can map finite range of integers of any size to each rational this way and, since there is no finite upper bound to the stepping amount, you could argue there are potentially infinite integers for every single rational.

So… can anyone convince me that there is a single unambiguous correct answer to this question? Are there more rational numbers than integers, or not?

EDIT

Although I've already accepted an answer, I'll just add some extra context.

My reason for questioning this relates to the Hilbert space-filling curve. I find this interesting because of applications to multi-dimensional indexing data structures in software. However, I found Hilberts claim that the Hilbert curve literally filled a multi-dimensional space hard to accept.

As mentioned in a comment below, a one meter line segment and a two meter line segment can both be seen as sets of points and, but (by the logic in answers below), those two sets are both the same size (cardinality). Yet we would not claim the two line segments are both the same size. The lengths are finite and different. Going beyond this, we most certainly wouldn't claim that the size of any finite straight line segment is equal to the size of a one-meter-by-one-meter square.

The Hilbert curve reasoning makes sense now – the set of points in the curve is equal to the set of points in the space it fills. Previously, I was thinking too much about basic geometry, and couldn't accept the size of a curve as being equal to the size of a space. However, this isn't based on a fallacious counting-to-infinity argument – it's a necessary consequence of an alternative line of reasoning. The two constructs are equal because they both represent the same set of points. The area/volume/etc of the curve follows from that.

Best Answer

Mathematicians have very precise definitions for terms like "infinite" and "same size". The single unambiguous correct answer to this question is that using the standard mathematical definitions, the rationals have the "same size" as the integers.

First, here are the definitions:

  1. Define "$0$" = emptyset, "$1$" $= \{0\}$, "$2$" $= \{0,1\}$, "$3$" $= \{0,1,2\}$, etc. So, the number "n" is really a set with $n$ elements in it.

  2. A set $A$ is called "finite" iff there is some $n$ and a function $f:A\to n$ which is bijective.

  3. A set $A$ is called "infinite" iff it is not finite. (Note that this notion says nothing about "counting never stops" or anything like that.)

  4. Two sets $A$ and $B$ are said to have the "same size" if there is a function $f:A\to B$ which is a bijection. Note that we do NOT require that ALL functions be bijections, just that there is SOME bijection.

Once one accepts these definitions, one can prove that the rationals and integers have the same size. One just needs to find a particular bijection between the two sets. If you don't like the one you mentioned in your post, may I suggest the Calkin-Wilf enumeration of the rationals?

Of course, these give bijections between the naturals (without $0$) and the rationals, but once you have a bijection like this, it's easy to construct a bijection from the integers to the rationals by composing with a bijection from the integers to the positive natural numbers.