How to prove closure of $\mathbb{Q}$ is $\mathbb{R}$
Solution 1:
Presumably, you mean the closure of $\mathbb{Q}$ in $\mathbb{R}$ under the usual topology.
It suffices to show that for every real number $r$ and every $\epsilon\gt 0$, there is at least one rational $q$ which is "$\epsilon$-close" to $r$ (that is, $|r-q|\leq \epsilon$), since this will show that every open ball around $r$ contains a rational. This shows that the complement of $\mathbb{Q}$ has empty interior, so the closure of $\mathbb{Q}$ is all of $\mathbb{R}$.
To prove that, let $r$ be a real number, and let $\epsilon\gt 0$. Then there exists a natural number $n$ such that $\frac{1}{10^n}\lt \epsilon$. Write $r$ in decimal expansion, and let $q$ be the rational that has the same decimal expansion as $r$ up to the $n$th digit after the decimal point, and terminates there. This is a rational number, since its decimal expansion terminates.
Now note that $|r-q|\leq \frac{1}{10^n} \lt \epsilon$, proving that there is a rational that is $\epsilon$-close to $r$.
Solution 2:
This question really does not make a whole lot of sense. In topology closures only makes sense in some ambient space. Some examples will probably make this clear.
- $\mathbb{Q}$'s closure in $\mathbb{Q}$ is $\mathbb{Q}$ itself.
- $\mathbb{Q}$'s closure in $\mathbb{R}$ is $\mathbb{R}$.
- $\mathbb{Q}$'s closure in $\mathbb{Q}(\sqrt{2})$ is $\mathbb{Q}(\sqrt{2})$.
And this doesn't even go into embeddings of $\mathbb{Q}$ in e.g. the unit circle. What you probably meant to ask was how to prove that the completion of $\mathbb{Q}$ is $\mathbb{R}$. For that you should take a look at this question.