---
tag: 00R0X1WGPX
kind: definition
name: Compact set
msc: [54D30]
defines: 0R6EWFKRCF
uses: [0QPHW703PV, 0D5YHQGDJY]
sources:
  - url: https://en.wikipedia.org/wiki/Compact_space
    locator: Compactness of subsets
---

## Definition

Let $X$ be a [[topological space|0CNQXVBHCX]] and let $K \subseteq X$.
The set $K$ is compact when $K$, with the [[subspace topology|0D5YHQGDJY]], is a [[compact space|0QPHW703PV]].

## Remarks

By [[compactness via open covers|0P6PMJB4MA]], $K$ is compact exactly when each [[cover|0NVPNC12JY]] of $K$ by open sets of $X$ has a finite subcover.
Each finite subset of $X$ is compact. The empty set is compact.
In $\mathbb{R}$, the interval $[0, 1]$ is compact, but $(0, 1)$ and $[0, \infty)$ are not. The [[Heine–Borel theorem|07PFYV65MB]] describes the compact subsets of $\mathbb{R}^n$.

## Explanations

### L1 human

A compact set behaves in many ways like a finite set.
For example, a continuous real function on a compact set is bounded and attains its maximum, as a function on a finite set does.
