# Connectedness of points with both rational or irrational coordinates in the plane?

Is the set of points in the plane whose coordinates are either both irrational, or both rational connected?

• What is the question? Apr 23 '12 at 6:08
• @copper, I imagine the question is, consider the set of all points in the plane such that the coordinates are both rational, or both irrational. Is this set connected? But it would be nice if OP wrote it that way, instead of making us guess. Apr 23 '12 at 6:33
• Sorry for ambiguous in the question. I edited it. Apr 23 '12 at 6:59
• Can you mention the source/reference to the problem,it would be great! Oct 22 '17 at 9:49
• @BAYMAX It has been a long time.. I forgot where I found this problem Oct 22 '17 at 12:05

Let $S$ be your set, and suppose $S = U \cup V$ where $U$ and $V$ are disjoint, and are both closed and open in $S$. Note that if $x$ and $y$ are both rational, then the diagonal lines $\{(x+t, y+t): t \in {\mathbb R}\}$ and $\{(x+t,y-t): t \in {\mathbb R}\}$ are subsets of $S$. Using a path of diagonal line segments, it is possible to get from any point of ${\mathbb Q} \times {\mathbb Q}$ to any other while staying in $S$. Therefore one of $U$ and $V$, let's say $U$, contains all of ${\mathbb Q} \times {\mathbb Q}$. But ${\mathbb Q} \times {\mathbb Q}$ is dense in $S$, and $U$ is closed in $S$ so $U = S$.
For extra credit, show that $S$ is path-connected. In fact, if $a < b$ and $c < d$ with $(a,c)$ and $(c,d)$ in $S$, there is a continuous increasing function $f: [a,b] \to [c,d]$ such that $f(x)$ is rational if and only if $x$ is rational.
• Can anyone prove the part about path-connectedness? Why does such a function $f(x)$ exist? Jan 7 '18 at 11:46
• Take two-sided increasing sequences of rationals $x_n$ and $y_n$ with $x_n \to a$ and $y_n \to b$ as $n \to -\infty$, $x_n \to c$ and $y_n \to d$ as $n \to +\infty$, and join $(x_n, y_n)$ to $(x_{n+1},y_{n+1})$ with straight line segments. Jan 8 '18 at 2:21