# Let $X = \Bbb{R}$ with the discrete metric. Is $X$ connected?

No. Any nonempty subset $A ≠ X$ is open, as well as its complement. So $X$ is the union of disjoint nonempty open subsets.

Is there a more formal way of doing it? Thanks for your help.

-
That looks perfectly fine to me. – Nate Eldredge Jun 12 '12 at 5:07
It’s fine. If you wanted to get fancy, you could be specific and let $A=\{0\}$, say, and note that $A$ and $\Bbb R\setminus A$ are open and disjoiont and have $\Bbb R$ as their union. – Brian M. Scott Jun 12 '12 at 5:07
No discrete topology can ever be connected. You answer your own question. What do you mean by "formal way"? – Abhishek Parab Jun 12 '12 at 5:08
@Abhishek: The discrete topology on a singleton is connected... – Brandon Carter Jun 12 '12 at 5:21
@BrandonCarter There are stories of Emil Artin hurling a chalk or duster towards a student who'd ask What about the empty set?" – Abhishek Parab Jun 13 '12 at 3:19

First, prove that a topological space $\,X\,$ is disconnected iff there exists a continuous and onto function $\,f:X\to \{0,1\}\,$ , where the latter space inherits its topology from the usual one on the reals (and, thus, it's a discrete space with two elements).
Now, for your case, show that $\,f:\mathbb{R}_{disc}\to \{0,1\}\,$ defined by $$f(x)=\left\{\begin{array}{ll} 0 \,&\,\text{if}\;x=0\\1\,&\,\text{if}\;x\neq 0\end{array}\right.$$is continuous and onto $\,\{0,1\}\,$...