Canonical: https://knowlpedia.com/topology/compact-iff-complete-totally-bounded/

# Compact iff complete and totally bounded

A metric space is compact exactly when it is complete and totally bounded.

**Compact iff complete and totally bounded:** Let \((X,d)\) be a [metric space](https://knowlpedia.com/topology/metric-space/). Then the following are equivalent:

1. \(X\) is a [compact set](https://knowlpedia.com/topology/compact-set/).
2. \(X\) is a [complete metric space](https://knowlpedia.com/topology/complete-metric-space/) and [totally bounded](https://knowlpedia.com/topology/totally-bounded-set/).

## Equivalent characterizations

Equivalently, a subset \(K\subseteq X\) is compact in the [subspace topology](https://knowlpedia.com/topology/subspace-topology/) if and only if \((K,d|_{K\times K})\) is complete and totally bounded.

## Remarks

This characterization packages [compactness implies completeness](https://knowlpedia.com/topology/compactness-implies-completeness/) and [compactness implies total boundedness](https://knowlpedia.com/topology/compactness-implies-total-boundedness/) into a single criterion that is often easier to verify than the [open cover](https://knowlpedia.com/topology/open-cover/) definition.
