Where can I read more about that? Because, both are infinite, but there still should be more rational numbers, than natural numbers?
Where can I read more about that? Because, both are infinite, but there still should be more rational numbers, than natural numbers?
Your intuition about there being more rational numbers might be based on viewing the rationals as a proper superset of the natural numbers. You might similarly consider that there are more natural numbers than even natural numbers. However, by "renaming" every even number, and that shouldn't change how many there are, to half its value, we obtain the natural numbers. Formally, there exists a bijection between N and 2N, as between N and Q, and this is what mathematicians mean when they say that sets have the same size, or cardinality.
In this case, at most one of these two a priori quite reasonable statements can be true:
- if set B is a strict superset of A, B is larger than A.
- if you can map the times in A to the items in B in 1:1 fashion, A and B have the same size.
Giving up the first is deemed less problematic than giving up the second (probably because that means giving up comparing sizes of infinite sets at all, but I’m not familiar enough with that to be sure about that)
for a in range(1, Infinity):
for b in range(a):
print(a-b, "/" , b+1)
Will print out: 1/1, 2/1, 1/2, 3/1, 2/2, 1/3, 4/1, 3/2, 2/3, 1/4, ...
Hence, we've just mapped all rationals (with duplicates) to a single linear list. Since any linear list can always be mapped to the naturals (1, 2, 3, ...), they have the same cardinality.QED
Google ”counting rational numbers” and ”different sizes of infinity” to learn more.