Interactive · 1 question
Density of Rationals and Irrationals
As you probably know, a rational number is defined to be any number of the form , where and are integers and . It can also be shown that for any two rational numbers and where , an irrational number such that (and likewise, for any two irrationals , where , a rational such that ).
To compare the densities of the two sets, we need to define what a countable set is. A countable set has the same cardinality (number of elements) as the set of natural numbers. Now, obviously, the "number of elements" is a difficult concept to grasp at first if the set is infinitely large, so therefore we shall provide a different definition: a set is countable if there exists a one-to-one pairing of all elements in with the set of natural numbers. Consider, for example, the set of all integers. That set is countable because we can pair them as follows: with .
Now, consider the set of rational numbers. The positive rationals can be written in a rectangular array:
From here, you may notice that some numbers are the same (for example, all elements on the main diagonal are equal to ). However, that doesn't matter for two reasons: (1) when pairing the sets, the duplicates can be skipped, and (2) if we can show that a set is countable, all subsets of that set will be countable. We can follow a zigzag pattern through our grid: . We can then remove the duplicates from the list, and we have a one-to-one pairing of the positive rationals with the natural numbers (the negative rationals and can be added in the same way that the negative integers were added above).
Now, we will consider the cardinality of the irrational numbers. But first, see if you can answer this question:
What is the density of the rationals within the reals?
This might seem strange at first. However, we shall prove that the cardinality of the irrationals is larger than that of the rationals, or that the irrationals are an uncountable set.
First, we can claim that any set containing an uncountable set is itself uncountable. This is true since if you have an uncountable set, inserting additional elements into it doesn't make it countable. We shall, for simpiclity, consider the set . Assume, temporarily, that the set is countable, so therefore we have found a one-to-one pairing of the set of irrational numbers between 0 and 1 and the integers. So we have a first irrational number, a second, etc. For example, let the first few numbers (in the list, not necessarily in increasing order) be as follows:
You get the idea. Now, consider a number formed as follows: for the th digit after the decimal point, put if the th digit in the th number is nonzero, and if it is zero. So our new number would be . Now, obviously, the number we just formed is not the first number in the set, as its first digit differs from the first number's first digit. Likewise, it is not the second because the secnd digits don't match. In general, for all the number differs from the th by the th digit. Thus we have found that we cannot create a one-to-one pairing of the irrationals with the natural numbers, and thus the set is uncountable. Since the set of irrationals is uncountable while the set of rationals is countable, it is now cear that the density of rationals is .
Note: the proof that the irrationals are uncountable is called Cantor's diagonal (or diagonalization) argument.