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

Proving that $[0,1]\subset\mathbb{R}$ is compact you make use of completeness and this is a fundamental step in order to characterize compact subsets of $\mathbb{R}$. Trying to state an analogous problem in $\mathbb{Q}$, I asked myself if $[0,1]\cap\mathbb{Q}$ is compact in $\mathbb{Q}$ endowed with the subspace topology but I find it hard to answer. Can you help? In general, how do compact subsets of $\mathbb{Q}$ look like?

share|cite|improve this question
up vote 14 down vote accepted

Compactness is a property of a topological space, which doesn't depend on any ambient space it may be embedded in. If $X$ is a subset of $\mathbb{Q}$, then its topology as a subspace of $\mathbb{Q}$ is the same as its topology as a subspace of $\mathbb{R}$. Thus a subspace of $\mathbb{Q}$ is compact if and only if it is bounded and closed in $\mathbb{R}$. In particular, $[0,1] \cap \mathbb{Q}$ is not compact, because it is not closed in $\mathbb{R}$.

More directly, $( \sqrt {2}/2 , 1] \cap \mathbb{Q}$ and $[0, \sqrt{2}/2-1/n) \cap \mathbb{Q}$ (for $n$ in $\mathbb{N}$) give an open cover of $[0,1] \cap \mathbb{Q}$ with no finite subcover.

share|cite|improve this answer
Perfect, thank you. Only one further question: how can I state, formally, that compactness does not depend on ambient space? Maybe if $X\to Y$ is and embedding and $X$ is compact, then $f(X)$ is compact with subspace topology? It should be the same with connectedness... I'm sorry but I'm a newbie in topology :) – user365 Jul 26 '11 at 21:28
@MarcoCastronovo: You can do it the following way. Let $A\subset X$ and give $A$ the subspace topology of $X$. Show that $A$ is compact if and only if every cover of $A$ in $X$ has a finite subcover. The role of $X$ was arbitrary, as long as the topology of $A$ is the subspace topology from $X$. – T. Eskin Jun 17 '12 at 19:12

First note that compact metric spaces are complete, so $[0,1]\cap\mathbb Q$ will not be compact if it is not completely-metrizable.

One can argue (and it is often the case) that the usual metric is incomplete but can be replaced.

Method I:

We apply the following theorem.

Theorem: Suppose $X$ is a countable, compact metric space then there exists some ordinal $\alpha<\omega_1$ such that $X$ is homeomorphic to $\alpha$ in the order topology.

By this theorem if $X=[0,1]\cap\mathbb Q$ was compact then it was homemorphic to an ordinal in the order topology. However the order of $X$ is dense, and ordinals are scattered. This homemorphism is impossible to have.

Therefore $[a,b]\cap\mathbb Q$ cannot be compact if $a<b$.

Method II:

It is true that a subspace of a complete metric space is completely metrizable if and only if it is $G_\delta$, that is an intersection of countably many open sets.

Since $[0,1]\cap\mathbb Q$ is the intersection of a closed set with an $F_\sigma$ set which is not $G_\delta$ as well, we have that $[0,1]\cap\mathbb Q$ is $F_\sigma$ and not $G_\delta$. Therefore it cannot be completely metrizable, therefore it cannot be compact.

(Utilizing machinery from descriptive set theory, this question becomes somewhat easier to solve. Of course the theorems and definitions have their own difficulties, but just to show you how simple arguments can be replacing explicit open covers.)

share|cite|improve this answer
You may find it interesting to know that the set of compact subsets of $\mathbb{Q}$ is $\Pi_{1}^{1}$-complete in $2^{\mathbb{Q}}$. See here. – t.b. Jul 26 '11 at 16:34
@Theo: Interesting! – Asaf Karagila Jul 26 '11 at 16:44
By the way: one very interesting such set is the set of everywhere differentiable functions $[0,1] \to \mathbb{R}$ (Mazurkiewicz). Usually one proves such things by reducing to the set of well-founded trees (which is itself $\Pi_{1}^{1}$-complete). – t.b. Jul 26 '11 at 16:54
@Theo: I am unfamiliar with the inner works of these objects. I do intend to take a more careful read through the books of Kechris and/or Moschovakis sometime later. I will be sure to include these topics too! – Asaf Karagila Jul 26 '11 at 17:00
Ah, I see now that the big K. uses continuous maps (so the Wadge hierarchy) instead of Borel maps in his book. However, the two notions are equivalent (I don't know where to find a proof of that). [I didn't want to push you in this direction, but I think it's a very interesting measure of "complexity"] – t.b. Jul 26 '11 at 17:02

If $A \subseteq [0,1]\cap \mathbb Q$ is compact iff $A$ is compact in $\mathbb R$, since the compactness is the same for the induced topology. For more information you may be interested in Hunter's Applied Analysis, Chapter 4.

share|cite|improve this answer

In fact, a metric space is compact if and only if it is complete and totally bounded (you have used one direction in the proof for $\mathbb{R}$). Therefore, intersections of intervals with $\mathbb{Q}$ will never be compact, since they are not complete. Compare also with the explicit example that Chris has given, which shows directly how completeness is relevant.

share|cite|improve this answer

Any convergent sequence of rationals gives you a compact subset of $\mathbb Q$; for one thing, as a metric space, it is complete, containing its unique limit point, and it is also totally bounded, since any e-neighborhood about the limit point will contain all-but-finitely many limit points. So, $S_n$:={$q_0+\frac {1}{n}:q_0$ in $\mathbb Q$, n in $\mathbb N$} for a fixed value $q_0$ will give you a compact subset of $\mathbb Q$

share|cite|improve this answer

Your Answer


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