Canonical: https://knowlpedia.com/topology/heine-cantor-theorem/

# Heine-Cantor theorem

A continuous function on a compact metric space is uniformly continuous.

The **Heine-Cantor theorem** states: if \(f: K \to Y\) is a [continuous function](https://knowlpedia.com/topology/continuous-map/) from a [compact](https://knowlpedia.com/topology/compact-set/) [metric space](https://knowlpedia.com/topology/metric-space/) \(K\) to a metric space \(Y\), then \(f\) is [uniformly continuous](https://knowlpedia.com/real-analysis/uniform-continuity/).

For every \(\varepsilon > 0\), there exists \(\delta > 0\) such that for all \(x, y \in K\):
\[
d_K(x, y) < \delta \implies d_Y(f(x), f(y)) < \varepsilon.
\]

The key point is that \(\delta\) depends only on \(\varepsilon\), not on the choice of points \(x, y\).

## Classical case

A continuous function \(f: [a,b] \to \mathbb{R}\) is uniformly continuous.

## Failure without compactness

\(f(x) = 1/x\) on \((0,1]\) is continuous but not uniformly continuous (domain not compact).
