TITLE: Show that $\Bbb Q^n \cup (\Bbb R-\Bbb Q)^n$ is connected
QUESTION [7 upvotes]: I have difficulty with this problem and I have not idea to show this. How can I show that  $\Bbb Q^n \cup (\Bbb R-\Bbb Q)^n$ is connected? If $n=1$ it's obvious because the sum is $\Bbb R$
is connected. But in general?

REPLY [2 votes]: Hint: Let $E = \mathbb Q^n \cup (\mathbb R\setminus \mathbb Q)^n.$ For $x\in \mathbb R^n,$ let $L(x) = \{tx: t\in \mathbb R\}.$ ($L(x)$ is the line in $\mathbb R^n$ through the origin and $x.$) Verify that if $q = (q_1,\dots ,q_n)\in \mathbb  Q^n$ and each $q_k \ne 0,$ then $L(q)\subset E.$ Consider the union of all of such lines.