Show that the set \((x, y) \in \RR^2\) such that at least one of \(x, y\) is rational with the subspace topology is a connected space.
Solution
1. Let\[X=(\mathbb Q\times\mathbb R)\cup(\mathbb R\times\mathbb Q).\]For each \(q\in\mathbb Q\), the horizontal line \(H_q=\mathbb R\times\{q\}\) and vertical line \(V_q=\{q\}\times\mathbb R\) are connected.
Each is homeomorphic to \(\mathbb R\).
2. The union\[Y=V_0\cup\bigcup_{q\in\mathbb Q}H_q\]is connected.
Every \(H_q\) meets the connected set \(V_0\) at \((0,q)\). A union of connected sets all meeting a fixed connected set is connected.
3. Every vertical line \(V_q\) meets \(Y\) at \((q,0)\), since \(H_0\subseteq Y\).
Both coordinates \(q,0\) are rational where needed, so the point lies in the indicated sets.
4. Hence\[X=Y\cup\bigcup_{q\in\mathbb Q}V_q\]is connected.
Again use that adjoining connected sets each meeting an already connected set preserves connectedness.