I am reading about $\omega_1$ https://dantopology.wordpress.com/2009/10/11/the-first-uncountable-ordinal/
I know that certain subsets in $\omega_1$ is both open and closed. For example, let $a = \min(\omega_1)$ the minimum element in $\omega_1$, then the singleton $\{a\}$ and $\{a\}^c$ can both be written as open sets in the order topology on $\omega_1$ (by implication, $\{a\}$ is closed).
What are all the clopen sets in $\omega_1$?
All subsets of $\omega_1$ of the following forms are clopen:
These are the clopen intervals in $\omega_1$. Since unions of finitely many clopen sets are clopen, all sets that are unions of finitely many of these clopen intervals are also clopen.
Conversely, suppose that $H\subseteq\omega_1$ is clopen. For $\alpha,\beta\in H$ write $\alpha\sim\beta$ if and only if either $\alpha\le\beta$ and $[\alpha,\beta]\subseteq H$, or $\beta\le\alpha$ and $[\beta,\alpha]\subseteq H$. You can check that $\sim$ is an equivalence relation on $H$ whose equivalence classes are open, order-convex subsets of $\omega_1$.
Suppose that $\sim$ has infinitely many equivalence classes. Because $\omega_1$ is well-ordered, there must be a sequence $\langle C_n:n\in\Bbb N\rangle$ of $\sim$-classes such that for each $n\in\Bbb N$, if $\alpha\in C_n$ and $\beta\in C_{n+1}$, then $\alpha<\beta$. For each $n\in\Bbb N$ let $\alpha_n\in C_n$. Then $\langle\alpha_n:n\in\Bbb N\rangle$ is an increasing sequence in $\omega_1$, so it converges to a limit $\alpha$. Each $\alpha_n\in H$, and $H$ is closed, so $\alpha\in H$. But $H$ is also open, so there must be a $\gamma<\alpha$ such that $(\gamma,\alpha]\subseteq H$. Fix $n\in\Bbb N$ such that $\alpha_n\in(\gamma,\alpha]$; then $C_k\subseteq(\gamma,\alpha]\subseteq H$ for each $k\ge n$. In particular, $[\alpha_n,\alpha_{n+1}]\subseteq H$, so $\alpha_n\sim\alpha_{n+1}$, which is impossible, since $\alpha_n$ and $\alpha_{n+1}$ are by construction in different $\sim$-classes. Thus, there are only finitely many $\sim$-classes, and $H$ is the union of finitely many clopen intervals.