# Why is $[0, 1] \cap \mathbb{Q}$ not compact in $\mathbb{Q}$? [duplicate]

Statement: $[a, b] \cap \mathbb{Q}$ in $\mathbb{Q}$ is not compact. Thus the interior of all compact subsets of $\mathbb{Q}$ is $\emptyset$.

I am trying to understand the first sentence. I read that a closed subspace of a compact space is compact, so for example, consider the unit interval $[0, 1]$ which is a compact space. Take a closed subspace $[0, 1] \cap \mathbb{Q}$ of $[0, 1]$. This set is closed since it just consists of all the rational numbers in between $0$ and $1$, including $0$ and $1$. So it is a closed subspace of a compact space. But why isn't this compact?

• A closed subset of a compact space is indeed compact. And $[a,b] \cap \mathbb{Q}$ is ia closed subset of the space $\mathbb{Q}$. BUT the space $\mathbb{Q}$ is not compact, so the theorem you read does not apply. – Lee Mosher Sep 15 '15 at 21:00
• I would like to point out that your question title talks about one space being compact in another. There's no such thing. A space is compact or is not compact, and any "surrounding space" is irrelevant. (This is different from closedness for example, where you always ask about one space being closed in another.) – Daan Michiels Sep 15 '15 at 21:04
• The interval $(a,b)$ viewed as an interval of reals contains an irrational point $\gamma$. Now let $U_0$ be the rational points $\lt \gamma$ and for $n\ge 1$ let $U_n$ be the rational points greater than $\gamma+1/n$. Open cover with no finite subcover. – André Nicolas Sep 15 '15 at 21:16
• It's not closed in $[0,1]$. – Akiva Weinberger Nov 19 '17 at 22:45
• $\mathbb Q$ is not a compact space. And a good example of this would be that the interval $(\sqrt{2},\pi)$ in $\mathbb Q$ is closed in $\mathbb Q$ because it contains all its limit points. ($\sqrt{2}, \pi$ and all irrationals in between do not exist in $\mathbb Q$ so they can not be considered limit points as the "do not exist"). So $(\sqrt{2},\pi)$ is closed and bounded but it isn't compact for the usual reasons. ($\{(\sqrt{2}+\frac 1n,\pi-\frac 1n)|n\in\mathbb N\}$ is an open cover with no finite subcover.) – fleablood Nov 28 '18 at 19:45

Hint: Try finding a sequence in $\mathbb{Q}\cap[0,1]$ that does not have a convergent subsequence in $\mathbb{Q}\cap[0,1]$.

$\mathbb{Q}\cap[0,1]$ is dense in $[0,1]$

• I don't see any relationship between density and compactness. Can you explain – mr eyeglasses Sep 15 '15 at 21:33
• compact set is closed in a Hausdorff Topological space and so in metric spaces. – R.N Sep 16 '15 at 6:29

Hint: Find a sequence of closed, non-empty sets $C_n\subseteq [0, 1]\cap \Bbb Q$ for $n \in \Bbb N$ such that $C_n \subseteq C_{n-1}$ and $\bigcap_{n = 1}^\infty C_n = \emptyset$.

• I'm not sure I understand this. If $C_n \subseteq C_{n-1}$, then $C_n \cap C_{n-1} = C_n$. How can it be possible then that $\bigcap\limits_{n=1}^{\infty} C_n = \emptyset$? – mr eyeglasses Sep 15 '15 at 21:24
• @morphic Because there are infinitely many of them, they get smaller and smaller. For instance, if you let $C_n = [\frac12 - \frac1{2n}, \frac12 + \frac1{2n}]\cap \Bbb Q$, then $\bigcap C_n = \frac12$. However, in some other cases, there is no such element left at the end. You just have to construct it carefully. – Arthur Sep 16 '15 at 5:22

You can cover it with infinite number of open sets such that no open set overlaps (open intervals with irrational endpoints). If $\bigcup U_j = X$, but $U_j\cap U_k = \emptyset$ if $k\ne j$ you can't reduce the sets to a finite covering.

You said, "A closed subspace of a compact space is compact." and then you tried using $[0,1]$ as the compact space. But $[0,1]$ is compact as a subset of the reals, as a subset of $\mathbb{Q}$, it's what you are trying to understand. The countable covering of $[0,1]$ in $\mathbb{Q}$ by point sets in $[0,1] \cap \mathbb{Q}$ has no finite subcover in $\mathbb{Q}$ which covers the whole set, because none of the sets in the cover overlap.

• Specifically, take the countable cover, $\cup {F_i}$ of singleton sets ${F_i}$ where $F_i$ is the ith entry in the Farey sequence on $[0,1]$. There are no overlapping sets in the cover, each is a point, and a unique point, and their union is $[0,1]\cap \mathbb{q}$. So there is no finite subcover. – hkr Sep 15 '15 at 22:48
• Meant singletons $\{ F_i \} \subset \mathbb{Q}$ – hkr Sep 15 '15 at 22:50

The mistake in your argumentation is that the set $[0,1]\cap\mathbb Q$ is not closed in $[0,1]$. Rather, the closure of $[0,1]\cap\mathbb Q$ in $[0,1]$ is the complete interval $[0,1]$.

As non-closed set in a Hausdorff space, it cannot be compact.

Note that $[0,1]\cap\mathbb Q$ is closed in $\mathbb Q$, but then, $\mathbb Q$ is not a compact space, so again you don't get a closed subspace of a compact space.