# Why are clopen sets a union of connected components?

The wikipedia page on clopen sets says "Any clopen set is a union of (possibly infinitely many) connected components."

I thought any topological space is the union of its connected components? Why is this singled out here for clopen sets?

Does it have something to do with it $x\in C$ a clopen subset $C$ of a space $X$, then $C$ actually contains the entire component of $x$ in $X$?

• Any topological space is the union of its connected components, but that doesn't mean that a subset of that space will be a union of some of those connected components. The difference lies in which connected components are being considered. – Hayden Aug 18 '14 at 20:17
• This mean that each connected component of a clopen subset $C$ of a space $X$ is also a connected component of the space $X$. – Hamou Aug 18 '14 at 20:35
• @Hamou How can one prove that? A connected component of $C$ is closed in $C$, hence closed in $X$, and then...? – Cellar Door Aug 18 '14 at 20:41
• Closed in closed is closed, and open in open is open. – Hamou Aug 18 '14 at 20:43
• @Hamou How does that apply? The connected component in $C$ need not be open? – Cellar Door Aug 18 '14 at 20:53

Here is what I mean: If $C$ is clopen subset of a space $X$, then $C=\cup_{x\in C}C_x$, where $C_x$ is the connected component in $X$ containing $x$.
It is clear that $C\subset \cup_{x\in C}C_x$.
Let $x\in C$, and we want to show that $C_x\subset C$. Now we take $A=C_x\cap C$ and $B=C_x\cap C^c$, we have $A\cup B=C_x$ and $A\cap B=\emptyset$ and $A$, $B$ are closed subsets in $C_x$ hence opens subsets in $C_x$, since $C_x$ is connected then $A=\emptyset$ or $B=\emptyset$, but $x\in A$, so $B=\emptyset$, this show that $A=C_x$, $i.e$ $C_x\subset C$.
Take the space $\mathbb{R}$. Then the subset $\mathbb{R}_{>0}$ of positive elements is a subset of $\mathbb{R}$, but is not a union of connected components of $\mathbb{R}$ (the only connected component of $\mathbb{R}$ is $\mathbb{R}$ itself). But then that's okay, because $\mathbb{R}_{>0}$ isn't clopen in $\mathbb{R}$ (it is only open).
What you seem to be doing here (I think) is to pass down to a subset of a topological space but then change the notion of connected component (perhaps to the connected components of the subspace with the subspace topology). What the above is saying is that if $U \subset X$ is a clopen subset of the space $X$, then it is a union of connected components of $\bf{X}$ (not of $U$).
My attempt at a proof: suppose $S$ is clopen in $X$. If $X$ is connected we are done hence suppose $X=\bigcup_i C_i$ is the partition of $X$ by its connected components. We need to show that for each $i$ $C_i\cap S$ is either void or equal to $C_i$. But since $S$ is clopen, $S\cap C_i$ is both open and closed in $C_i$. Since $C_i$ is connected this implies either $S\cap C_i=\emptyset$ or $S\cap C_i=C_i$.