Connected components of a given space For every $n \in \mathbb N$, let $A_n=\{\frac{1}{n}\}\times[0,1]$, and let $X=\bigcup_{n \in \mathbb N} A_n \cup \{(0,0),(0,1)\}$. Prove that: i)$\{(0,0)\}$ and $\{(0,1)\}$ are connected components of $X$.
ii) If $B \subset X$ is open and closed in $X$, then $\{(0,0),(0,1)\} \subset B$ or $\{(0,0),(0,1)\} \cap B=\emptyset$.
I have no idea where to even start this problem. I've tried to visualize the set $X$: it is the union of vertical line segments that intersect the x-axis only in rational points (each segment going from $0$ to $1$ in the y-axis) and the two points $(0,0)$ and $(0,1)$.  How could I prove that the points are connected components? Should I suppose that each of them is a proper subset of another connected set and arrive to an absurd? I also have another doubt: isn't each line segment a connected component of $X$ as well?
 A: i) Assume that $\{(0,0)\}$ is not a connected component of $X$, i.e., $\exists x\in X$, such that $\{(0,0)\}$ and $x$ are in the same connected component. But $x \in A_n$ for an $n$, but each $A_n$ is itself a connected component, since they're open connected subsets of $X$, which is absurd. The same can be argued for $\{(0,1)\}$.
ii) What we want to prove is equivalent to prove that if $\{(0,0)\}\in B \Longleftrightarrow \{(0,1)\}\in B$. Let $B\ni \{(0,0)\}$ be a clopen set. We see that any proper subset of any $A_n$ can not be an open and closed set, since each $A_n$ is connected. So if $x\in B$ and $x\in A_n$, then $A_n\subset B$. For $B$ to be open there must be infinitely many $A_n$ that are subsets of $B$, since any open ball $B(\{0,0\},\varepsilon)$, has infinitely many points of vertical segments $A_n$. But if that's so, there is a sequence of points of $B$ converging to $\{(0,1)\}$, and as $B$ is also closed, $\{(0,1)\}\in B$. The converse is just the same, changing the points.
