# How to show that the only connected subsets of $\mathbb{Q}$ are the one-point sets? [duplicate]

I need to show that the only connected subsets of $\mathbb{Q}$ are the one-point sets. $\mathbb{Q}$ is given the relative topology of $\mathbb{R}$

-

## marked as duplicate by MJD, Brandon Carter, Grumpy Parsnip, 5pm, Erick WongFeb 26 '13 at 3:51

– jim Feb 26 '13 at 2:16

HINT: Suppose that $x,y\in A\subseteq\Bbb Q$ with $x<y$; there is an irrational number $\alpha$ such that $x<\alpha<y$.

-

Hints:

1) Show that a topological space $\,X\,$ is disconnected iff there is a continuous surjective function $\,f:X\to \{0,1\}\,\,\,\,,\,\,\{0,1\}\subset\Bbb R\,$ with the inherited euclidean topology (i.e., it is a discrete space).

2) Show that for any $\,A\subset\Bbb Q\,\;\;,\;\;|A|>1\,$ , if say $\,a\in A\,$ , then the function

$$f:A\to\{0,1\}\;\;,\;\;f(x):=\begin{cases}0&,\;x=a\\{}\\1&,\;x\neq a\end{cases}$$

is continuous and surjective.

Of course, Brian's answer is way more expedite...

-