# What are all of the connected subsets of $\mathbb{Q}$?

The answer are the singletons of $\mathbb{Q}$. I can show that the open intervals of $\mathbb{Q}$ are disconnected by choosing some irrational in the open set and using it to form a separation. But strangely enough, I am having a hard time seeing why the subset $\{p,q \}$ of $\mathbb{Q}$ is disconnected. If say $p < q$ and we choose some irrational $p < x <q$, the separation of $\{p,q \}$ would, I think, be given by $\{p\}$ and $\{q\}$. But these aren't open in $\mathbb{Q}$ ...?

-
Hint $\Bbb Q \subseteq \Bbb R$. What are the connected sets in $\Bbb R?$ – user21436 Mar 16 '12 at 8:02
Also, a set is disconnected if it can be written as a union of two disjoint non-empty closed sets. (for the $\{p,q\}$ case.) The closed can be replaced by clopen/open and the result is still true. – user21436 Mar 16 '12 at 8:12
Dear Peter, to say that a subspace of a space is connected only depends of the induced topology of the subspace. That $\lbrace p \rbrace$ is not open in $\mathbb Q$ is irrelevant. What matters is that this singleton is open in $\lbrace p ,q \rbrace$. – Georges Elencwajg Mar 16 '12 at 8:19
I do believe $\Bbb Q$ is what you would call totally disconnected. – Arthur Mar 16 '12 at 9:27

Let $A\subseteq\mathbb Q$ with at least two elements, thus $x\in A$, $y\in A$, and $x\ne y$. Let $z$ be an irrational such that $x\lt z\lt y$. Then $A=A_+\cup A_-$ with $A_+=A\cap(z,+\infty)$ and $A_-=A\cap(-\infty,z)$. Since $A_+$ and $A_-$ are two disjoint nonempty sets and are open in $A$, $A$ is not connected.
following the remark of @Georges Elencwajg we talk about $A_+$ and $A_-$ being open in $A$ not in $\mathbb Q$ but why $A_+$ is open in $A$ knowing that we can not say that this is an intersection of open sets in $A$ since $(z,\infty)$ is not contained in $A$ – palio Mar 16 '12 at 11:10
@palio: Indeed $(z,+\infty)$ is not contained in $A$... and this fact is irrelevant. To prove that $A_+$ is open in (the relative topology on) $A$, choose any point $x$ in $A_+$ and find a positive $r$ such that $B(x,r)\cap A\subset A_+$. – Did Mar 16 '12 at 11:29