# the rationals as a metric space, closed and open sets

If we consider the rationals, $\mathbb{Q}$, as a metric space with the usual metric of the real line, then is the set $B=\{q\in\mathbb{Q} \mid {q^2}\lt 2\}$ a closed set? I know the definition of a closed set is a set that contains all its limit points. And I understand that here $\sqrt{2}$ is a limit point but it's not in our set but it's also not in the rationals so it's not in our metric space at all. Then, does $B$ contain all its limit points?

Alternatively, we can say $B$ every point in $B$ is an interior point (has a neighbourhood contained in $B$) so that makes $B$ open.

So then is $B$ both open and closed?

Thanks

• Yes, $[-\sqrt2,\sqrt2]\cap\Bbb Q$ is both an open and closed set, considered as a subset of $\Bbb Q$. Oct 18 '15 at 15:47

Since we have that $B=[-\sqrt2, \sqrt 2] \cap \mathbb{Q}=(-\sqrt{2}, \sqrt{2}) \cap \mathbb{Q}$, it follows that $B$ is closed (by the first equality) and open (by the last).
let $x$ in the complementary of the set, $x^2\geq 2$, thus $x\geq \sqrt(2)$, since $x\in Q$, $x>\sqrt(2)$ and there exist $\sqrt(2)<y<x$ since $Q$ is dense in $R$, $]y,+\infty[$ is in the complementary of $\{q^2<2\}$ and is an open neighborhood of $x$ in the complementary of $\{q^2<2\}$. Thus this complementary is henceforth open.
If $\sqrt 2$ doesn't exist in our metric space, it doesn't exist in our metric space. $\sqrt 2$ is not a limit point because it doesn't exist in our metric space any more.