A compact set is a subset K⊆XK\subseteq X of a XX such that every of KK contains a finite subcover: whenever {Ui}i∈I\{U_i\}_{i\in I} is a family of open sets with K⊆⋃i∈IUiK\subseteq \bigcup_{i\in I}U_i, there exist indices i1,…,ini_1,\dots,i_n such that

K⊆Ui1∪⋯∪Uin.K \subseteq U_{i_1}\cup\cdots\cup U_{i_n}.
Remarks

Compactness can also be expressed in terms of for families of , and it interacts well with (for instance, via ).

Examples
  • Any finite subset of any topological space is compact.
  • In R\mathbb{R} with its usual topology, the closed interval [0,1][0,1] is compact, while the open interval (0,1)(0,1) is not compact.