TITLE: Closure of $\{ (x, y) \in \mathbb{R}^2 \mid \ \text{x is rational}\}$
QUESTION [2 upvotes]: I want to find the closure of $$\{ (x, y) \in \mathbb{R}^2 \mid \ \text{x is rational}\}$$
My ATTEMPT:
Let $(x, y) \in \mathbb{R}^2$ be any point and $r>0$. Let   $q \in (x-r, x+r) \cap \mathbb{Q}$, then $(q,y) \in B_d((x,y),r) \cap D$. Hence, $(x,y) \in \overline{D}$, which proves that $\overline{D} = \mathbb{R}^2$.
Please check my solution. Is it correct?

REPLY [1 votes]: Looks good! I would just add one more sentence mentioning why we know that $q$ exist, in other words, why we know that $(x-r, x+r)\cap \mathbb Q$ is non-empty.
Note, we know that because we know that $\mathbb Q$ is dense in $\mathbb R$.

An equivalent alternative proof would be to find a sequence $\{q_n\}_{n=1}^\infty$ that converges to $x$, then show that the sequence $\{(q_n, y)\}_{n=1}^\infty$ converges to $(x,y)$.
Just like in your proof, the existence of the sequence  $\{q_n\}_{n=1}^\infty$ is guaranteed by the fact that $\mathbb Q$ is dense in $\mathbb R$.
{"set_name": "stack_exchange", "score": 2, "question_id": 4203870}