# $\mathbb{Q}$ in metric space $(\mathbb{R},d)$ neither open nor closed

Show that $\mathbb{Q}\subset\mathbb{R}$ with metric space $(\mathbb{R}, d)$ is neither open nor closed in $\mathbb{R}$.

Attempt: So I need to prove two parts.

(a) $\mathbb{Q}$ not open: Take $q\in\mathbb{Q}$. Note that $\frac{\sqrt{2}}{n}$, $n\in\mathbb{N}$ is arbitrarily small for arbitrarily large $n$, so $q\pm \frac{\sqrt{2}}{n}\in\mathbb{I}$. Thus for any $r>0$, $B_r(q)$ will contain irrational numbers so $B_r(q)\not\subseteq \mathbb{Q}$.

(b) $\mathbb{Q}$ not closed: We want to show $\mathbb{Q}$ does not contain all its accumulation points. $q+ \frac{\sqrt{2}}{n}\in\mathbb{I}$ for $n\rightarrow\infty$ is a limit point of $\mathbb{Q}$ but $q+ \frac{\sqrt{2}}{n}\not\in\mathbb{Q}$.

-
Recall a closed set is one that contains all of its limit points. Now why does $\mathbb{Q}$ not fit this definition? Because there are cauchy sequences that...... –  user38268 Jan 31 '12 at 9:27
Revising an earlier comment: Show that the irrationals are dense in the reals, and use the same argument that you used in (a). –  Brian M. Scott Jan 31 '12 at 9:45
@BenjaminLim But a set in which every Cauchy sequence has a limit in it is called compact. If you take $(0,1)$ as the whole space then this set will have Cauchy sequences (with respect to the standard metric) that converge to $0$ or $1$ and yet this set is closed. –  Matt N. Jan 31 '12 at 9:46
@MattN: No, a metric space in which every Cauchy sequence converges is a complete space; in order to be compact, it must be totally bounded as well as complete. $\mathbb{R}$ is complete in the usual metric but is not compact. –  Brian M. Scott Jan 31 '12 at 9:53
@Arthur: I took Benjamin simply to be suggesting that there are convergent sequences of rationals whose limits aren’t rational; I don’t know whether describing them as Cauchy sequences was inadvertent overcomplication or a deliberate attempt not to say too much. –  Brian M. Scott Jan 31 '12 at 9:57

The basic fact to use is that every open interval in $\mathbb{R}$ contains both rational and irrational numbers (this is just reformulating that both sets are dense, essentially). This means no open set can be contained in just $\mathbb{Q}$ or $\mathbb{P}$ (the irrationals), so both sets have empty interior, and thus are far from being open.

-
Does the fact that no open set can be contained in just $\mathbb{Q}$ imply that $\mathbb{Q}$ cannot be open because given any point in $\mathbb{Q}$ an open ball around that point is not a subset of $\mathbb{Q}$? –  Emir Jan 31 '12 at 10:23
"both sets have empty interior, and thus are far from being closed" $\{0\}$ has empty interior and is closed. Did you mean "far from being open"? –  Najib Idrissi Jan 31 '12 at 10:45
@zulon: is $\mathbb{R}\setminus \{0\}$ also a set with empty interioir? I think he meant: $\mathbb{Q}$ and $\mathbb{P}$ both have empty interiors and are complements of each other $\Rightarrow$ both are far from being open and closed. –  Thomas E. Jan 31 '12 at 16:30
@Emir: I did mean open, yes, I was too fast.... thx –  Henno Brandsma Jan 31 '12 at 18:12
@Emir: yes, that was the argument: there are no interior points at all, because no non-empty open subset is a subset of the rationals or the irrationals. –  Henno Brandsma Jan 31 '12 at 18:13

The ball inside Q doesn't fulfill the open set property B(x,r) subset of Q, because of dense property (It has Irrationals inside too)

-