Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

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

I have a feeling they are neither closed nor open as the $\mathbb{R} \backslash \mathbb{Q}$ cannot be open or closed either...

share|cite|improve this question
$ \mathbb{R}$ is the closure of $ \mathbb{Q}$ ... – The Chaz 2.0 Mar 5 '12 at 16:13
If you know $\mathbb{R} \ \mathbb{Q}$ is not open or closed, then you know all you need. The complement of an open set is closed and the complement of a closed set is open. – Graphth Mar 5 '12 at 16:14
No, they are not. – Kris Harper Mar 5 '12 at 18:59
@AsafKaragila Why did you not vote on this one? – Rudy the Reindeer Apr 21 '12 at 21:44
up vote 23 down vote accepted

In the usual topology of $\mathbb{R}$, $\mathbb{Q}$ is neither open nor closed.

The interior of $\mathbb{Q}$ is empty (any nonempty interval contains irrationals, so no nonempty open set can be contained in $\mathbb{Q}$). Since $\mathbb{Q}$ does not equal its interior, $\mathbb{Q}$ is not open.

The closure of $\mathbb{Q}$ is all of $\mathbb{R}$: every real number is the limit of a sequence of rationals, so every real number lies in the closure of $\mathbb{Q}$. Since $\mathbb{Q}$ does not equal its closure, it is not closed.

Naturally, since $\mathbb{Q}$ is not open, its complement is not closed; since $\mathbb{Q}$ is not closed, its complement is not open.

But this is in the usual topology. $\mathbb{R}$ can be endowed with lots of topologies, and it is certainly possible for $\mathbb{Q}$ to be open (or closed) in some of them. For example, in the discrete topology, where every subset of $\mathbb{R}$ is both open and closed, $\mathbb{Q}$ is both open and closed.

share|cite|improve this answer

If the rationals were an open set, then each rational would be in some open interval containing only rationals. Therefore $\mathbb{Q}$ is not open.

If $\mathbb{Q}$ were closed, the its complement would be open. Then each irrational number would be in some interval containing only irrational numbers. That doesn't happen either. This one is harder to prove: showing that every interval on the line contains some rationals depends on the fact that the ordered field $\mathbb{R}$ is Archimedean.

share|cite|improve this answer

Neither. Their interior is empty and their closure is the entire line.

share|cite|improve this answer

They are neither open nor closed. Note that they cannot be closed since the closure of $\mathbb{Q}$ is $\mathbb{R}\ne \mathbb{Q}$, but they cannot be open either since the same holds for their complement (as you pointed out).

share|cite|improve this answer

Remember that in metric spaces (those with a notion of distance), we can check if a set $A$ is close by checking that the limits of elements in $A$ rest in $A$ (i.e for any convergent sequence $(a_i)_{i\in\mathbb{N}}$, such that $a_i\in A$,then $\lim_{i\to +\infty} a_i \in A$ ).

$\mathbb{R}$ with the usual distance ($d(x,y)=|x-y|$) is probably the typical example of a metric space.

With that in mind, if $\mathbb{Q}$ were closed, then any sequence of rationals will convergen in the rations, which we now is false, for example:

$(1+1/n)^n \to e$

On the other hand, if $\mathbb{Q}$ were open, then its complement ($\mathbb{I}$, the irrationals) will be closed, which again we can easily see that is not (e.g. take any sequence of rationals that converges to an irrational and substract to each element in the sequence this irrational, where will it converge?).

But even though $\mathbb{Q}$ is neither open nor closed, is not that complicated topologically speaking. $\mathbb{Q}$ is what we call an $F_\sigma$ (F from fermé (close in french), and $\sigma$ from sum (meaning union)). This are basically sets that are a countable union of closed sets. A bunch of natural examples of sets are $F_\sigma$, such as the points of discontinuity of a function. The "dual" notion is known as $G_\delta$, the countable intersection of open sets.

share|cite|improve this answer

Your Answer


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