# Is the following space connected [duplicate]

Is the space $$(\mathbb Q\times\mathbb Q)\cup(\mathbb R- \mathbb Q\times \mathbb R-\mathbb Q)$$ connected?

I am really stuck at it. Any hints?

• Can you show that the space is path-connected?
– Zuy
Aug 12 '20 at 12:16

Let $$A:=(\mathbb{Q} \times \mathbb{Q}) \cup(\mathbb{Q}^C \times \mathbb{Q}^C)$$ be the space we're interested in. We can show that $$A$$ is path-connected.
Let $$(a,b), (c,d)\in A$$. We want to find a continuous map $$\varphi:[0,1]\to A$$ satisfying $$\varphi(0)=(a,b)$$ and $$\varphi(1)=(c,d)$$.
For this, connect the points $$(a,b), \left(a+\frac{d-b}{2},b+\frac{d-b}{2}\right),(a,d),\left(a+\frac{c-a}{2},d+\frac{c-a}{2}\right),(c,d)$$ via straight line sigments (in the order written down). Let $$L$$ be the union of those line segments. Choose $$\varphi$$ moving through $$L$$ from $$(a,b)$$ to $$(c,d)$$.
It remains to show that $$L\subseteq A$$. Can you prove this? Note that the line segments in $$L$$ are all parallel to the lines given by $$y=x$$ and $$y=-x$$.