Prove that $\mathbb{R}^2\setminus\mathbb{Q}^2$ is connected without path connectedness

Hint:

Suppose there are two disjoint open sets $U$ and $V$ whose union is all of $\mathbb{R}^2\setminus\mathbb{Q}^2$.

Consider any line $L$ of the form $\{p\} \times \mathbb{R}$ or $\mathbb{R} \times \{p\}$ for $p \in \mathbb{R}\setminus\mathbb{Q}$.

Show that $L \subset U$ or $L \subset V$.

(Hint: $U \cap L$ and $V \cap L$ are open subsets of $L$ in the subspace topology.)


Hint: Assume $T := \mathbb R^2\setminus \mathbb Q^2 = U \cup V$ is a disjoint union of nonempty open subsets.

Since $\mathbb R \times \{\pi\} \subset T$ is connected, it must be a subset of either $U$ or $V$. Say it's contained in $U$. Now show that $\{r\} \times \mathbb R \subset U$ for every irrational $r$, and that $\mathbb R \times \{r\} \subset U$ as well.