# Does there exist a topological space with one of its connected components not closed?

Does there exist a topological space with one of its connected components not closed? Now by connected I just mean connected, not path connected. When I was thinking about this problem my immediate thought was no since one can just take a point not in the connected component and show that the union is not connected. Is this the right idea? Maybe someone could show me more details then what I gave.

No such topological space exists. In fact, if $C$ is a connected subset of a topological space $X$, then $\overline C$, the closure of $C$ in $X$, is also connected (prove it!). In particular if $C$ is a connected component of $X$ then you have the inclusion $C\subseteq\overline C$, with $\overline C$ connected as well, so by maximality we have $C=\overline C$, that is $C$ is closed in $X$.
Firstly we will prove: if $Y$ is a connected subspace of $X$ and $Y\subseteq Z\subseteq\overline{Y}$ then $Z$ is connected.
Assume that $\left\{ A,B\right\}$ is a separation of $Z$. If $A\cap Y\neq\emptyset$ and $B\cap Y\neq\emptyset$ then $\left\{ A\cap Y,B\cap Y\right\}$ is a separation of $Y$. No such separation exists since $Y$ is connected, so we conclude that $A\cap Y=\emptyset$ or $B\cap Y=\emptyset$. If $B\cap Y=\emptyset$ then $Y\subseteq A$ and consequently $B\subseteq Z\subseteq\overline{Y}\subseteq\bar{A}$. Then we find that $\bar{A}\cap B=B\neq\emptyset$ contradicting that $\left\{ A,B\right\}$ is a separation. Likewise the assumption $A\cap Y=\emptyset$ leads to a contradiction.
As a consequence of this we now prove that every component of a space $X$ is closed.
It is vacuously true if $X$ is the empty space. Now take $X\neq\emptyset$ and let $C$ be a component of $X$. Then it is non-empty and connected and as shown above $\overline{C}$ will be connected. Then $C\subseteq\overline{C}\subseteq D$ for a component $D$. From $C\cap D\neq\emptyset$ it follows that $C=D$ and consequently $C=\overline{C}$.