# Set of all rational points in unit ball

Consider the set $A\subset \mathbb{R}^2$ of all rational points in the unit ball, that is $$A = \{(x,y)\in \mathbb{Q}^2: x^2+y^2<1\}.$$ It's easily seen that $A$ is not path-connected (since every continuous curve must pass through a point with at least one irrational coordinate, by the intermediate value theorem), so $A$ is not connected as well. Now consider the definition of connected subset:

A subset S of a topological space $X$ is connected if and only if there are no open sets $U$ and $V$ in $X$ such that $$S\subset U\cup V, S\cap U \neq \varnothing, S\cap V\neq \varnothing \text{ and } S\cap U\cap V = \varnothing.$$

Since $A$ is disconnected, there must be some open sets $U$ and $V$ in $\mathbb{R}^2$ such that $$A\subset U\cup V, A\cap U = \varnothing, A\cap V = \varnothing \text{ and } A\cap U \cap V = \varnothing.$$

Can we write specifically what $U$ and $V$ are?

Thank you very much.

• Note that a not path-connected space does not have to be also not connected. See here: en.wikipedia.org/wiki/Connected_space#Path_connectedness. It may work in your example, but your reasoning is flawed for the general case. Feb 23 '17 at 14:42
• Thank you very much, I forgot the condition for $A$ to be open. Feb 23 '17 at 14:52

There are many examples of such a $U$ and $V$. One working example is $$U = \{(x,y) \in \Bbb Q^2 : x^2 + y^2 < \frac 1{\sqrt{2}} \}\\ V = \{(x,y) \in \Bbb Q^2 : \frac 1{\sqrt{2}} < x^2 + y^2 < 1\}$$ The only important thing about $1/\sqrt{2}$ here is that it's irrational and less than $1$.