Percentage of rational numbers on an interval

The percentage of rational numbers in any non-trivial interval of the real numbers (so in particular in $[a,b]$) is $0$. Your particular formulation of that statement does not make sense, however. Except in the trivial case $a=b$, both $S_1$ and $S_2$ will be infinite, and so the expression $\frac{|S_1|}{|S_1|+|S_2|}$ is non-sensical. Furthermore, you'll note that this implies that the result has nothing to do with your choices of $a$ and $b$ so long as they are not the same.

The correct way to formulate this statement is using Lebesgue measure. Precisely, let $a<b$. Then, $m(\mathbb{Q}\cap [a,b])=0$, where $m$ is Lebesgue (outer) measure.

To prove this, let $\varepsilon >0$, let $\{ r_k:k\in \mathbb{N}\}$ be an enumeration of the rationals in $[a,b]$, and consider the open balls $B_{\varepsilon /2^k}(r_k)$. Then, the rationals in $\mathbb{Q}$ are contained in these open balls, the sum of whose measures (by definition) is $2\cdot \sum _{k=0}^\infty \frac{\varepsilon}{2^k}=4\varepsilon$. As $\varepsilon$ is arbitrary, this shows that $m(\mathbb{Q}\cap [a,b])=0$.

I guess technically you would need to know the definition of Lebesgue measure to see that this is actually a proof, but at the very least I think this makes the intuition clear that any reasonable definition of measure should have $m(\mathbb{Q})=0$.


The question as you've stated it isn't meaningful, because there is no operation of dividing infinite cardinals.

A sensible alternative question would be to ask about the Lebesgue measure of $A \cap \mathbb{Q}$ and $A$, and those are $0$ and $b-a$, respectively. As long as $b > a$, the ratio will be zero, though this wasn't what you were asking.

Measure in one dimension is analogous to length, although here we're talking about the "length" of a highly irregular subset.