Is the set $S={\left\{ x \in \mathbb{Q}:-\sqrt2 < x < \sqrt2 \right\}}$ open in $\mathbb{R}$? I was reading Pubg's book on real analysis and in the second chapter while introducing clopen sets he gave an example that the set $S={\left\{ x \in\mathbb{Q}:-\sqrt2 < x < \sqrt2 \right\}}$ is both open and close in $\mathbb{Q}$ but neither open nor close in $\mathbb{R}$.
So the reason it seems to me that it is an open set is that, we can always find a small open ball near the edge of two end point which include all the points of that set. And we can not find any point in the region $ -\sqrt2 < x < \sqrt2$ for which it's neighborhood does not contain any points of the set $S$. So it is an open set.
While typing it another thing I remembered is that an open set have to contain all the points around its neighborhood and because the element of the set $S$ is in $\mathbb{Q}$ and there are many points in the region $ -\sqrt2 < x < \sqrt2$ (in $\mathbb{R}$) that $S$ does not contain so there would be some $x$ for which $N_r(x)$ does not contain all the neighborhood points. Is that the reason $S$ is not open in $\mathbb{R}$?
 A: Your "proof" that $S$ is open is strange and confusingly written. You write the sentence

And we can not find any point in the set that does not contain any points of that set.

which makes no sense at all. How could a point contain points? What does that sentence even mean?

There is a reason why mathematical proofs are written in a rigorous manner, and that reason is traceability. A mathematical proof needs to have steps which are verifiably correct. Basically, a proof is just a series of statements, where each statement either follows from previous statements, or is an assumption. Your argument is of no such shape, and is therefore not a proof at all.
In fact, the set $S$ is not open in $\mathbb R$, and it is easy to prove that.
In order for the set to be open in $\mathbb R$, the following would need to hold:

For every $x\in S$, there exists some $\epsilon > 0$ such that $(x-\epsilon, x+\epsilon)\subseteq \S$.

The above statement can easily be disproven. Take $x=0\in S$. Then let $\epsilon >0$ be arbitrary. Then, take $x_0 = \frac{\pi}{n}$, where $n$ is some integer bigger than $\frac\pi\epsilon$. Because $n>\frac\pi\epsilon$, we know that $\epsilon > \frac\pi n$, which means that $\frac\pi n\in(-\epsilon, \epsilon)$.
However, we also know that $\frac\pi n$ is not a rational number, and therefore, $\frac\pi n$ is not an element of $S$. Therefore, $(0-\epsilon,0+\epsilon)$ is not a subset of $S$, and because $\epsilon$ was arbitrary, we know that the same is true for all $\epsilon > 0$, which means $S$ is not open.
A: We show that $S$ is not open in $\mathbb{R}$. This is equivalent to showing that $\mathbb{R}\setminus S$ is not closed in $\mathbb{R}$. Now set
$$\Omega=\mathbb{R}\setminus S=\mathbb{R}\setminus((-\sqrt{2},\sqrt{2})\cap\mathbb{Q})=(-\infty,-\sqrt{2}]\cup I \cup[\sqrt{2},\infty),$$
where $I=(-\sqrt{2},\sqrt{2})\cap(\mathbb{R}\setminus\mathbb{Q})$, i.e. the irrationals in $(-\sqrt{2},\sqrt{2})$. Now as the irrationals are dense in $\mathbb{R}$, $I$ is dense in $(-\sqrt{2},\sqrt{2})$. We can thus choose a sequence $\{x_n\}_{n\in\mathbb{N}}$ in $I$ with limit $x\in S$. Then $x\notin\Omega$, and as $\{x_n\}_{n\in\mathbb{N}}$ was in $\Omega$, it follows that $\Omega$ is not closed in $\mathbb{R}$. Thus $S=\mathbb{R}\setminus\Omega$ is not open in $\mathbb{R}$.
