Is $\mathbb{Q} \times \mathbb{Q} \cup \mathbb{I} \times \mathbb{I}$ disconnected?
Let $\mathbb{I}$ be the set of all irrational real numbers and $\mathbb{Q}$ be the set of all rational numbers as usual. As a subspace of the Euclidean plane $\mathbb{R}^2$, is the set $\mathbb{Q} \times \mathbb{Q} \cup \mathbb{I} \times \mathbb{I}$ disconnected?
The story is the following.
I was making a typical undergraduate level topology problem which concerns connectedness. The question which I concerned is the following. As a subspace of the Euclidean plane $\mathbb{R}^2$, is the set $\mathbb{Q} \times \mathbb{I} \cup \mathbb{I} \times \mathbb{Q}$ connected? What about the set $\mathbb{Q} \times \mathbb{Q} \cup \mathbb{I} \times \mathbb{I}$ ?
The former is relatively well known. For second, the solution which I had in mind turned out to be wrong. I guess lines of the form $y=qx$ where $q$ is some positive rationals will connect the set which is apparently wrong. Now I have no solution. Please give some help to resolve this problem.
The set is connected.
Suppose that the set is disconnected by disjoint open sets $U$ and $V$. So, we assume that $\mathbb{Q}\times\mathbb{Q} \cup \mathbb{I}\times\mathbb{I}\subseteq U\cup V$ and $U\cap V=\phi$.
Find open balls $B_U \subseteq U$ and $B_V\subseteq V$. Then we can find a line of the form $y=q_1x + q_2$ with $q_1\in \mathbb{Q}-\{0\}$, $q_2\in\mathbb{Q}$ such that the line goes through both balls. Note that this line takes rational to rational, irrational to irrational. Thus, $\{(x,y)|y=q_1x+q_2\}\subseteq\mathbb{Q}\times\mathbb{Q} \cup \mathbb{I}\times\mathbb{I}$.
However, since $U$ and $V$ disconnects the set $\mathbb{Q}\times\mathbb{Q} \cup \mathbb{I}\times\mathbb{I}$, so we can find a point on the line that does not belong to any of $U$ or $V$. This is a contradiction.
Here's a slightly different way to think about it in terms of components:
Suppose $(a,b), (c,d) \in \mathbb{Q}^2.$ Then the lines $$x+y = a+b \\ x-y = c-d$$ are continuous paths in $\mathbb{Q}^2 \cup \mathbb{I}^2 \subset \mathbb{R}^2$ containing $(a,b), (c,d)$ respectively and intersecting at $\left(\frac{1}{2}(a+b+c-d), \frac{1}{2}(a+b-c+d)\right).$ In particular, this shows that $\mathbb{Q}^2$ lies in a single path-component of $\mathbb{Q}^2 \cup \mathbb{I}^2.$ Therefore (since path components refine connected components) there is a connected component $C \subseteq \mathbb{Q}^2 \cup \mathbb{I}^2$ such that $\mathbb{Q}^2 \subseteq C.$
Finally, since $\mathbb{Q}^2$ is dense in $\mathbb{R}^2,$ it is also dense in any subspace containing it, showing that $$C \subseteq \mathbb{Q}^2 \cup \mathbb{I}^2 = \text{cl}(\mathbb{Q}^2) \subseteq \text{cl}(C) = C$$ so $\mathbb{Q}^2 \cup \mathbb{I}^2 = C$ is connected.
Let $S = \mathbb{Q}^2 \cup \mathbb{I}^2$. For each nonzero rationals $q$, let $L_q$ be the line through the origin with slope $q$. Then $L_q \subseteq S$. Let $T=\bigcup_{q \in \mathbb{Q}\setminus \left\{0 \right\}} L_q$. Then $T$ is connected in $S$. Moreover $\overline{T}$ relative to $S$ itself is equal to $S$. Therefore $S$ is connected.