Show the set $\{x \in \Bbb Q : x>0, 2
Show that in the metric space $\Bbb Q$, with the usual metric (given by the absolute value), the set $$S=\{x \in\Bbb Q : x>0, 2<x^2<3\}$$ is both open and closed.
My attempt:
I need to show that no limit point of the set $S$ lies outside of $S$ and I also need to show that every point of this set is an interior point.
How should I proceed?
 A: Hint:
$S=(\sqrt2,\sqrt3)\cap\mathbb Q=[\sqrt2,\sqrt3]\cap\mathbb Q$
A: We have
$$S=(\sqrt{2},\sqrt{3}) \cap \mathbb Q=[\sqrt{2},\sqrt{3}] \cap \mathbb Q.$$
So $S$ is the intersection of an open set in $\mathbb R$ with $\mathbb Q$. That are precisely the open sets of $\mathbb Q$.
To prove that let $A\subset \mathbb R$ be open in $\mathbb R$. Then for every $x\in A$ there is an $r>0$ with $B_r(x)\subset A$. So we have
$$B_r^{\mathbb Q}(x) = B_r(x) \cap \mathbb Q \subset A \cap \mathbb Q.$$
Hence $A\cap\mathbb Q$ is open in $\mathbb Q$.
A: Hint: Recall that the topology on $\Bbb Q$ is the induced topology as a subspace of $\Bbb R$. In a subspace, a set is open if it is the intersection of the subspace with an open set in the ambient space (and analogously for closed sets). If you can show $\sqrt{2},\sqrt{3}\notin\Bbb Q$, you will be done (why?).
A: All the other answers take for granted that the topology on $\mathbb{Q}$ is the subspace topology of $\mathbb{Q} \subset \mathbb{R}$, and that $(\sqrt 2, \sqrt 3)$ (resp. $[\sqrt 2, \sqrt 3]$) is open (resp. closed) in $\mathbb{R}$.
Let $x$ be a limit point of $S$, i.e. there is a sequence $\{x_n\} \subset S$ such that $\lim x_n = x$. Then $\forall n, x_n > 0 \implies x \ge 0$, and $\forall n, 2 < x_n^2 < 3 \implies 2 \le x^2 \le 3$. Both $x \ge 0$ and $x^2 \ge 2$, therefore $x > 0$. And since there is no rational number such that either $x^2 = 2$ or $x^2 = 3$, it follows that actually $2 < x^2 < 3$, therefore $x \in S$. So all the accumulation points of $S$ are in $S$.
Similarly, suppose $x = \lim x_n$ with $\forall n, x_n \not\in S$. If $x \le 0$ we're done. Otherwise ($x > 0$), for big enough $n$, $x_n > 0$. Assume  that $2 < x^2 < 3$. Then for big enough $n$, $2 < x_n^2 < 3$ too, a contradiction. Therefore $x \not\in S$.
