By definition, $\mathbb{Q}$ is closed iff $\mathbb{R}\setminus\mathbb{Q}$ -- the set of irrational real numbers, is an open set in $\mathbb{R}$.
If $\mathbb{R}\setminus\mathbb{Q}$ is open, then it has to be a union of open intervals (by definition).
Therefore, if $\mathbb{R}\setminus\mathbb{Q}$ is open, it must have some open interval $(a, b)$ as a subset.
The question is to show that every open interval $(a, b)$ must contain rational numbers.
Can anyone give me some hints on this problem? I was trying to use the definition of $\mathbb{Q}$ which is a number is rational if it can be written as $\frac{p}{q}$ for integers $p, q \in \mathbb{Z}$ and $q \neq 0$. But I don't think there's $\mathbb{Z}$ in $(a, b)$ since it's a subset of irrational real numbers? Am I thinking it wrong...
Assume that $\mathbb{Q}$ is closed. Then $\mathbb{R}-\mathbb{Q}$ is open.
That implies that for each irrational a there is a neighborhood
$S(a,\epsilon)$ contained in $\mathbb{R}-\mathbb{Q}$.
But this is a clear contradiction because there are rationals in every
open neighborhood of any point in $\mathbb{R}$.
This comes from the construction of the real numbers.