# Example of closed and bounded in $\mathbb Q$ set that is not compact

Consider the metric space $Q$ of rational numbers with the Euclidean metric of $R$. Let $S$ consist of all rational numbers in the open interval ($a, b$), where $a$ and $b$ are irrational. Then $S$ is a closed and bounded subset of $Q$ which is not compact.

I am trying to prove this statement. It's easy to show that $S$ is closed and bounded but I'm having trouble showing that it is not compact. I think I need to find an example of an open covering of $S$ which doesn't have any finite subcover, but I can't think of such an example. Any help? Thanks.

• You can use the fact that for metric spaces, compact is equivalent to sequentially compact. Finding sequences in $S$ without accumulation point (in $S$) is not difficult. But having found such a sequence, you can probably easily construct an open cover without finite subcover. – Daniel Fischer Apr 27 '14 at 17:53

HINT: Pick a sequence $a_n$ converging to $a$ from above, and consider $(a_n,b)$ as the open cover.
Another approach would be to prove that $(a,b)\cap\Bbb Q$ is not complete and that a compact metric space is always complete.
• For example. You can also insist on the intervals not to be clopen, by picking $a_n\to a$ and $b_n\to b$ of rational numbers (assuming $a_i<b_j$ for all $i,j$ and consider $(a_n,b_n)$. But the principle's the same. In fact, you can even take $(a+\frac1n,b)$. – Asaf Karagila Apr 27 '14 at 18:09
Consider $S=(a,b) \cap \mathbb Q$ as a subset of $\mathbb R$. Then $S$ is compact relatively to $\mathbb Q$ if and only if $S$ is compact relatively to $\mathbb R$. Clearly $S$ is not compact in $\mathbb R$, then $S$ is not compact in $\mathbb Q$.