TITLE: Compact sets in $\mathbb R$ are closed
QUESTION [5 upvotes]: What is the best way to prove the statement? I know the version of using nested intervals, but is there another way to approach the problem?

REPLY [2 votes]: If $A \subseteq \mathbb R$ is not closed, take $a \in \overline{A} \setminus A$, and for each $n > 0$ consider $$U_n = ( - \infty , a - \tfrac{1}{n} ) \cup ( a + \tfrac{1}{n} , + \infty ).$$ Then $\bigcup_n U_n  = \mathbb{R} \setminus \{ a \} \supseteq A$, however no finite subfamily of $\{ U_n : n > 0 \}$ can cover $A$ since $a$ is a limit point of $A$ (for each $n > 0$ there is an $x \in A$ such that $| x - a | < \frac{1}{n}$).
Therefore $A$ cannot be compact.
(To alter this for a a general metric space $(X,d)$, take $U_n = \{ x \in X : d(x,a) > \frac{1}{n} \}$.)