# a question about connected set, how to know whether A is connected or not?

In the Euclidean plane $R^2$,consider the subset $$A=\{(x,y)\in \Bbb R^2|\text{Either x or y, but not both, is a rational number}\}$$ Is $A$ connected? Is $\Bbb R^2$\A connected?

I have tried many methods, but I still have no idea how to solve it. Can someone tell me about how to prove it? I try to prove given any continuous function two valued function $f :A\to\{0,1\}$, the $f$ function will be one-valued function, but still don't know how to finish it. Maybe my thoughts are wrong. Hope someone can help me! Thank you

• Path-connectedness may be of help – Ilya Nov 28 '14 at 7:30

The line $y=x$ is disjoint to $A$, that is you can consider the disjoint open sets $U=\{\,(x,y)\mid y>x\,\}$ and $V=\{\,(x,y)\mid y<x\,\}$ that cover $A$ (or use $f(x,y)=\begin{cases}1&\text{if$y>x$}\\0&\text{if$y<x$}\end{cases}$ as your continuous function).
In fact you can find rational $a\ne 0$, $b$, such that $y=ax+b$ separates any two given points of $A$, i.e., $A$ is totally disconnected.
The set $$B:=\{\,(x,y)\mid x+y\in\mathbb Q\lor x-y\in\mathbb Q\,\}$$ is disjoint from $A$ and is path connected (for any two points in $B$ you can combine a northeast/southwest and a northwest/souteast line to a path). Since $B$ contains $\mathbb Q^2$, it is also dense in $\mathbb R^2\setminus A$. We conclude that $\mathbb R^2\setminus A$ is connected.
$$f \colon \mathbb{R}^2 \longrightarrow \mathbb R ~~\text{as}~~ f(x,y) = x+y$$
Notice that $f(\mathbb{R}^2-A)=\mathbb{Q} \subset \mathbb{R}$ so by continuity $\mathbb{R}^2-A$ can't be connected, etc.