# Question about the set of rationals.

1. Jun 12, 2012

### cragar

We know that the rationals are dense in the reals. So between any 2 reals we can find a rational. It seems to me that we have an uncountable number of slots that each contain a rational. Like we have an uncountable number of buckets with a rational inside them.
Now obviously the rationals are countable so I am missing something.

2. Jun 12, 2012

### Skrew

The irrationals are dense in the reals and happen to be uncountable.

The slot analogy doesn't work.

3. Jun 13, 2012

### SteveL27

Yes, but you'd keep finding the same rational for many pairs of reals. There's no guarantee that between each pair of irrationals we'll find a different rational. But I agree with you, this is very counterintuitive.

Here's a similar example that's really crazy.

We know there are countably many rationals, so the rationals have a property called "measure zero." That means we can cover the rationals with a countable collection of open intervals whose total length is less than $\epsilon$, where $\epsilon$ is an arbitrary real greater than zero.

To prove this, take $\epsilon$ really small, say 1/zillion. Doesn't matter, just pick any tiny positive real number.

We can cover the rationals with a countable collection of intervals of total length less than $\epsilon$ as follows. The rationals are countable, so we can enumerate them as r1, r2, r3, ... Now for each rn we let I1 be an interval about rn of length less than $\epsilon$/2n.

Then the sum of the lengths of the intervals is less than $\epsilon$. We have I1 + I2 + ... < $\epsilon$/21 + $\epsilon$/22 + ... = $\epsilon$.

Ok, that just proves the rationals have measure zero.

But now put the rationals back in their usual order on the number line. What we've just shown is that we can put an open interval around every rational; and still miss most of the reals. We can arrange to miss 99% of the reals, or 99.99999% of the reals, just by choosing $\epsilon$ small enough. In other words we visualize the number line with a little open interval around every single rational; yet almost all the reals aren't in any interval.

Personally I find this completely impossible to visualize. But we know it's true.

That's the mystery of countable rationals, dense in the uncountable reals.

Last edited: Jun 13, 2012
4. Jun 13, 2012

### Millennial

Since the rationals are of Lebesgue measure zero (as explained above), we define some operations like supremum and infimum for nontrivial (non-measure zero) sets of the reals. These are called essential supremum and essential infimum. To give an example, take this function:
$$f(x)=\begin{cases}\tan(x), & \text{if }x\in\mathbb{Q} \\ \sin(x), & \text{otherwise.} \end{cases}$$
It is straightforward that, since the tangent function covers the entire reals in its range, $\displaystyle \sup\{f(x)\}=\infty$. However, the function is equal to tangent if and only if x is rational. Now, since f(x) is defined over the reals, and the rationals are of measure zero in reals, this is not essential. But the sine condition covers a set that is not of measure zero and hence is essential. From this, we say that the essential supremum of f(x) is $\displaystyle \mathrm{esssup}\{f(x)\}=1$. What this means is theoretically, with a random x, you have the chance to get any real number, but in practice you can only get those smaller than or equal to 1, and since $\displaystyle \mathrm{essinf}\{f(x)\}=-1$ due to the same logic, greater than or equal to -1. So we just span the real interval $(-1,1)$ in practice.

I hope this gives a better understanding that what "measure zero" means.

5. Jun 18, 2012

### cragar

quote by steveL27 "Yes, but you'd keep finding the same rational for many pairs of reals"
couldn't I make it so this never happened. I might be wrong.
It seems that if i did have the same rational i could just find another one that was in between it and the irrational endpoint.