A set E is compact if and only if, for every family latex2($\{G_{ \alpha } \}_{\alpha \in A}$) of open sets such that latex2($E \subset \cup_{\alpha \in A}G_{\alpha}$), there is a finite set latex2($\{\alpha_1 ,..., \alpha_n \} \subset A$) such that latex2($E \subset \cup_{i=1}^{n} G_{\alpha_i}$).

Example: Let E=(0,1] and for each positive integer n, let latex2($G_n = \left(\frac{1}{n},2\right)$). If latex2($0<x \leq 1$), there is a positive integer n such that latex2($\frac{1}{n} < x$); hence, latex2($x \in G_n$), and thus

latex2($$E \subset \cup_{n=1}^{\infty}G_n$$)

If we choose a finite set latex2($n_1,...,n_r$) of positive integers, then

latex2($$\cup_{i=1}^{r} G_{n_i}=G_{n_0}$$)

Heine-Borel Theorom: A set latex2(\usepackage{amsfonts} % $E \subset \mathbb{R}$) is compact iff E is closed and bounded.

Example [2,8] is a compact set. The unit disk including the boundary is a compact set. (3,5] is not a compact set. Note that all of these examples are of sets that are uncountably infinite.

Introduction to Analysis 5th edition by Edward D. Gaughan