Is $\Bbb Q$ intersect $[0,1]$ in $\Bbb R$ compact?

4.7k Views Asked by At

A subset is compact iff it is closed and bounded.

I know $[0,1]$ is closed in $\Bbb R$, and the intersection of two closed sets is closed. I don’t know if $\Bbb Q$ is open or closed in $\Bbb R$ and have seen proofs for both.

2

There are 2 best solutions below

0
On

The set $\mathbb{Q}\cap[0,1]$ is bounded, but it is not closed (and therefore not compact). For instance, each number of the form $\left(1-\frac1n\right)^n$ belongs to it, but $\lim_{n\to\infty}\left(1-\frac1n\right)^n=\frac1e\notin\mathbb Q$.

0
On

The set $\mathbb Q\cap [0,1]$ is not compact, because it is not closed.

To see this let $a\in [0,1]\setminus\mathbb Q$, i.e., an irrational in $[0,1]$. Then the sequence $$ a_n=\frac{\lfloor na\rfloor}{n},\,\,n\in\mathbb N, $$ is a sequence of rationals in $[0,1]$, and $a_n\to a$, since $$ na-1<\lfloor na\rfloor\le na \quad\Longrightarrow\quad a-\frac{1}{n}=\frac{na-1}{n}<a_n=\frac{\lfloor na\rfloor}{n}\le \frac{na}{n}=a. $$

Note. $\mathbb Q$ is neither closed nor open.