TITLE: Union of infinite open and close sets
QUESTION [5 upvotes]: Suppose $ \{A_i: i ∈ I\}$ is a collection of clopen sets (i.e., open and closed at the same time), indexed by $I$. Is it true that
$$
\bigcup_{i\in I} A_i
$$
is closed?

REPLY [11 votes]: Take $X = \Bbb Q$ and $x_i =\frac{\sqrt{2}}{i}$ for $i\in \Bbb N$. Then we can consider the rational intervals $A_i= (x_{i+1},x_i)$. They are clearly open since they are also open in $\Bbb R$, but they are also closed since the limit points on the boundary do not belong to $\Bbb Q$.
But 
$$A=\bigcup_{i\in \Bbb N} A_i =(0, \sqrt{2}) $$
is not closed since $0\notin A$.