The notion of **compactness** may informally be considered a generalisation of being closed and bounded, and plays an important role in Analysis. Before we state the formal definition, we first have to define what we mean by an open cover of a set.

## Definition: open cover

Let $ (X, d) $ be a metric space. By an **open cover** of a subset $ E $ of $ X $ we mean a collection $ \{U_{\alpha}\} $ of open subsets of $ X $ such that $ E \subset \bigcup_{\alpha}U_{\alpha} $.

If $ \{U_{\alpha}\} $ is an open cover of $ E $, any subset of $ \{U_{\alpha}\} $ that is also an open cover of $ E $ is called a **subcover** of $ E $.

## Definition: compact set

Let $ (X, d) $ be a metric space. A subset $ E $ of $ X $ is said to be **compact** if and only if every open cover of $ E $ in $ X $ contains a finite subcover of $ E $. That is, if $ \{U_{\alpha}\} $ is an open cover of $ E $ in $ X $, then there are finitely many indices $ \alpha_1, ..., \alpha_n $ such that $ E \subset U_{\alpha_1} \cup \dotsb \cup U_{\alpha_n} $.

In $ \mathbf R^n $, the notion of being compact is ultimately related to the notion of being closed and bounded. This theorem is known as the Heine-Borel theorem, which states that a subset of $ \mathbf R^n $ is compact if and only if it is closed and bounded.

## References

- Rudin, Walter:
*Principles of Mathematical Analysis,*3rd edition, McGraw Hill, 1976.