Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Let $\mathscr{G}$ be a compact subset of $\mathbb{R}$. Denote by $\mathbb{Q} ( \mathscr{G})$ the set of all rational numbers in $\mathscr{G}$. Does $| \mathbb{Q} ( \mathscr{G}_1)| = |\mathbb{Q} (\mathscr{G}_2)|$ for $\mu(\mathscr{G}_1) > \mu(\mathscr{G}_2)$ where $\mu$ is the Lebesgue Measure?

i.e. are there more rationals in $[0,2]$ than $[0,1]$?

share|cite|improve this question
All these sets are countably infinite (that is, they all have the same size as the set of natural numbers). – Andrés E. Caicedo Feb 22 '14 at 5:00
The total number of rationals in $[0,1]$ is the same as the cardinality of $\Bbb Q$. Thus by Schroder-Bernstein, there is the same cardinality of rationals in $[0,2]$. For a counter example of where the cardinalities are different, choose an irrational $q$. Then the compact set $\{q\}$ has no rationals. – Bryan Feb 22 '14 at 5:01
Not only are there exactly the same 'number' of rationals, but there's exactly the same order type of rationals - you can find a one-to-one mapping $m$ from $[0,1]$ to $[0, 2]$ that preserves the order (i.e., $i\lt j\implies m(i)\lt m(j)$); you can even find a one-to-one mapping $m$ from $(0,1)$ to $(-\infty, \infty)$ that also preserves order. – Steven Stadnicki Feb 22 '14 at 5:03
up vote 6 down vote accepted

No, there are not more rationals in $[0,2]$ than in $[0,1]$. In fact, there are not even more elements in $[0,2]$ and $[0,1]$, despite the fact that these two sets have different measure, since there exists a bijection between them.

Note that measure and cardinality behave, in some ways, "independently" of one another. Another noteworthy example is that of the Cantor set and the rationals. We note that although the Cantor set has cardinality greater than that of the rationals, both sets have measure $0$.

Also, note that we can have (measurable) sets of any size that contain no (or any finite number of) rational numbers. For example, $\mathscr{G} = [0,2]\setminus\mathbb{Q}$ satisfies $\mu(\mathscr{G}) = 2$ while $|\mathbb{Q}(\mathscr{G})| = 0$.

share|cite|improve this answer

Assuming that $a<b$, and $c<d$ are all rational, one can set up 1-1 correspondence between rational numbers in $[a,b]$ with those in $[c,d]$ by the mapping $$ y = \frac{d-c}{b-a}(x-a) + c, ~~ x \in [a,b], ~~y \in [c,d] \tag1$$

Added in response to OP's question

Note that (1) is invertible: $$ x = \frac{b-a}{d-c}(y-c) + a \tag2 $$

Thus for every $x\in[0,1]$ we can find a $y \in [c,d]$ and vice-versa. Note that if $x$ is irrational then so is $y$ and vice-versa. So the irrationals can also be put in to a 1-1 correspondence. The fact that one is countable infinity and the other uncountable is incidental. The key point is that there is a 1-1 correspondence.

share|cite|improve this answer
why does this work? – Anthony Peter Feb 22 '14 at 5:16

Let $\cal{G}_1=[0,1]$. Let $\cal{G}_2$ be such a compact subset of $[0,2]\setminus Q$ that $\mu(\cal{G}_2)=a>1$. We can construct such a subset $\cal{G}_2$ by virtue of the inner regularity of the linear Lebesgue measure $\mu$. Then we have $$|Q(\cal{G}_1)|=\aleph_0 >0=|Q(\cal{G}_2)|$$(here $\aleph_0$ denotes cardinality of all natural numbers) and $$\mu(\cal{G}_1)=1<a=\mu(\cal{G}_2).$$

This answers negativelly to Anthony Peter's first question.

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.