Are open, closed, connected sets connected components? Let $X$ be a topological space and suppose that $U$ is a nonempty subset of $X$ that is open, closed and connected. Does it follow that $U$ is a connected component of $X$? If not, what condition on $X$ would ensure that it is?
Attempt: Since every connected subset of $X$ intersect exactly one connected component, we have that $U$ is contained in a connected component $C$. Thus, it would suffice to have that $C$ is open and closed, so that $U$ is open and closed in $C$ and hence $U=C$.
Definition of connected component: Define an equivalence relation on $X$ by setting $x\sim y$ if there is a connected subspace of $X$ containing both $x$ and $y$. The equivalence classes are called the connected components of $X$. (Taken from Munkres.)
 A: Let $V$ be a connected component such that $U\subset V$, $V-U$ is closed since $U$ is open and closed, and $V=U\bigcup (V-U)$. So either $U$ or $V-U$ is empty since $V$ is connected. We deduce that $V-U$ is empty.
A: You don't need to show that $C$ is open and closed to show that $U$ is open and closed in $C$. By definition, $U\subset C$ is open in $C$ if you can write
$$U=C\cap A$$
where $A$ is open in $X$. 
With that in mind, it is true by definition that $U$ is an open and closed subset of $C$, and since $U$ is connected, $U=C$.
Another comment: connected components are not necessarily open as the example of $\mathbb{Q}$ shows.
A: The connected components are maximal connected sets, so that $U \subset C$ for some component $C$ since $U$ is connected. Since $U$ is open and closed in $X$, it is also open and closed in $C$ with the induced topology. Recall that connectedness of a space can be phrased in terms of clopen sets. More precisely, a space is disconnected if and only if it contains a non-empty, proper clopen subset. If $U$ were strictly contained in $C$ then this would imply that $C$ is disconnected.
