For each $n \in \mathbb{N}$ consider $A_n = \{1/n\}\times [0,1]$ and let $X=\bigcup_{n \in \mathbb{N}}A_n \cup \{(0,0)(0,1)\}$ 
For each $n \in \mathbb{N}$ consider $A_n = \{1/n\}\times [0,1]$ and let $X=\bigcup_{n \in \mathbb{N}}A_n \cup \{(0,0)(0,1)\}$.
Show that $\{(0,0)\}$ and $\{(0,1)\}$ are connected components.

I have an Idea of how to proceed with the proof but It's kind of messy. Let $C$ be a connected component containing $(0,1)$, I want to see that $C=\{(0,1)\}$. Suppose that there exist $y \in X$, $y \neq (0,1)$, $y\neq (0,0)$, such that $y \in C$. Then there exist $n_0 \in \mathbb{N}$ such that $y \in A_{n_0}$. Then since $A_{n_0}$ is a (path)-connected set containing $y$ then $A_{n_0} \subseteq C$. Which is a contradiction since I could discconect $C$ in $C=\{(0,1)\}\cup A_{n_0}$. The problem I'm having is that when writting the disconnection, Im assuming no other element is in $C$ (other than the ones explicitly written in the disconnection). How can I fix this?
 A: You could show that every $A_n$ is a connected component by noticing that it is both open and closed in $X$ (but connected). Then $C$ is connected, $y \in C$ and $y \in A_{n_0}$, hence $C \subseteq A_{n_0}$ which is a contradiction, because $(0, 1) \in C$.
A: The connected components of $X$ are the sets $A_n:=\{\frac1n\}\times [0,1]$ and also both singletons $\{(0,0)\}$ and $\{0,1)\}$:
Start by observing that $A_n$ is closed-and-open (clopen) in $X$: if $n > 1$, pick $a_n, b_n \in \Bbb R$ such that $\frac{1}{n+1} < a_n < \frac1n < b_n < \frac{1}{n-1}$ and note that $A_n = ((a_n, b_n) \times \Bbb R) \cap X$, so $A_n$ is open in $X$, and $A_n$ is already closed in $\Bbb R^2$ as the product of two closed sets $\{0\}$ and $[0,1]$, and so also closed in $X$. That $A_1$ is clopen is similar, $A_1 = (\frac34, \rightarrow) \times \Bbb R)) \cap X$.
$A_n$ is also connected (homeomorphic to $[0,1]$) and the combination of these two facts implies that each $A_n$ is maximally connected: if $A_n$ is a proper subset of $B$ then $A_n$ is itself a non-trivial clopen set of $B$ so that $B$ cannot be connected. This shows maximality of $A_n$ as a connected subspace.
Next, the components of a space $X$ always form a closed partition of $X$ of connected subspaces. $X$ consists of all the $A_n$ and the only points left are $\{(0,0),(0,1)\}$. This is a disconnected subspace (as is any two point set in a $T_1$ space: both singletons are closed in it, and disconnect it) so the remaining components must be $\{(0,0)\}$ and $\{(0,1)\}$, which are indeed closed and connected and complete the partition of $X$ into components.
