Let \(S \subseteq \mathbf{R}^n\) and suppose \(\mathcal{A} = \{A_i | i \in I\}\) is a family of open subsets of \(\mathbf{R}^n\) such that

\[

S \subseteq \bigcup_{i \in I} A_i.

\]

We call such a family \(\mathcal{A}\) an **open cover** of \(S\). We call a subset \(K \subseteq \mathbf{R}^n\) **topologically compact** if every open cover \(\mathcal{A}\) of \(K\) admits a finite subcover. That is for every open cover \(\mathcal{A}\), there exists \(k \in \mathbf{N}\) such that there exist \(A_1, A_2, \ldots, A_k \in \mathcal{A}\) with

\[

K \subseteq \bigcup_{i = 1}^k A_i.

\]

**Theorem**. If \(K \subseteq \mathbf{R}^n\) is topologically compact, then it is closed and bounded.

**Proof**. We first show that \(K\) is bounded. To this end, consider the family of open sets given by \(A_i = \{x \in \mathbf{R}^n \big| |x| < i\}\). Clearly, we have
\[
K \subseteq \mathbf{R}^n = \bigcup_{i = 1}^\infty A_i.
\]
Since \(K\) admits a finite subcover, there exist \(i_1 < i_2 < \cdots < i_k\) such that
\[
K \subseteq A_{i_1} \cup A_{i_2} \cup \cdots \cup A_{i_k}.
\]
Since we have \(A_i \subseteq A_j\) for \(i < j\), we in fact have \(K \subseteq A_{i_k}\), hence \(K\) is bounded.
We will now argue that \(K\) is closed. Suppose toward a contradiction that \(K\) is not closed. Then there exists some limit point \(x\) of \(K\) which is not contained in \(K\). Now consider the family of sets
\[
A_i = \{y \in \mathbf{R}^n \big| |x - y| > 1/i\}.

\]

Note that \(\bigcup A_i = \mathrm{R} \setminus\{x\}\), thus (since \(x \notin K\)) \(\{A_i\}\) is an open cover of \(K\). Since this family admits an open subcover and the \(A_i\) are nested (\(i < j\) implies \(A_i \subseteq A_j\)) we have, in fact, \(K \subseteq A_k\) for some \(k \in \mathbf{N}\). But this implies that \(B(x, 1/k) \subseteq K^c\), contradicting the assumption that \(x\) is a limit point of \(K\).∎
The converse of the theorem above is also true. The equivalence of being topologically compact and being closed and bounded (in \(\mathbf{R}^n\)) is known as the **Heine-Borel Theorem**.