Heine-Cantor Theorem

Theorem
Let $M_1 = \left({A_1, d_1}\right)$ and $M_2 = \left({A_2, d_2}\right)$ be metric spaces.

Let $M_1$ be compact.

Let $f: A_1 \to A_2$ be a continuous mapping.

Then $f$ is uniformly continuous.

Warning
If $f$ is uniformly continuous, it does not necessarily follows that $M_1$ is compact.

For example, the identity mapping is (trivially) uniformly continuous on any metric space, whether compact or not.