Continuous mapping on a compact metric space is uniformly continuous

The answer is yes, if $f$ is continuous on a compact space then it is uniformly continuous:

Let $f: X \to Y$ be continuous, let $\varepsilon > 0$ and let $X$ be a compact metric space. Because $f$ is continuous, for every $x$ in $X$ you can find a $\delta_x$ such that $f(B(\delta_x, x)) \subset B({\varepsilon\over 2}, f(x))$. The balls $\{B(\delta_x, x)\}_{x \in X}$ form an open cover of $X$. So do the balls $\{B(\frac{\delta_x}{2}, x)\}_{x \in X}$. Since $X$ is compact you can find a finite subcover $\{B(\frac{\delta_{x_i}}{2}, x_i)\}_{i=1}^n$. (You will see in a second why we are choosing the radii to be half only.)

Now let $\delta_{x_i}' = {\delta_{x_i}\over 2}$.

You want to choose a distance $\delta$ such that for any two $x,y$ they lie in the same $B(\delta_{x_i}', x_i)$ if their distance is less than $\delta$.

How do you do that?

Note that now that you have finitely many $\delta_{x_i}'$ you can take the minimum over all of them: $\min_i \delta_{x_i}'$. Consider two points $x$ and $y$. Surely $x$ lies in one of the $B(\delta_{x_i}', x_i) $ since they cover the whole space and hence $x$ also lies in $B(\delta_{x_i}', x_i)$ for some $i$.

Now we want $y$ to also lie in $B(\delta_{x_i}', x_i)$. And this is where it comes in handy that we chose a subcover with radii divided by two:

If you pick $\delta : = \min_i \delta_{x_i}'$ (i.e. $\delta = \frac{\delta_{x_i}}{2}$ for some $i$) then $y$ will also lie in $B(\delta_{x_i}, x_i)$:

$d(x_i, y) \leq d(x_i, x) + d(x,y) < \frac{\delta_{x_i}}{2} + \min_k \delta_{x_k} \leq \frac{\delta_{x_i}}{2} + \frac{\delta_{x_i}}{2} = \delta_{x_i}$.

Hope this helps.


Let $(X, d)$ be a compact metric space, and $(Y, \rho)$ be a metric space. Suppose $f : X \to Y$ is continuous. We want to show that it is uniformly continuous.

Let $\epsilon > 0$. We want to find $\delta > 0$ such that $d(x,y) < \delta \implies \rho(f(x), f(y))< \epsilon$.

Ok, well since $f$ is continuous at each $x \in X$, then there is some $\delta_{x} > 0$ so that $f(B(x, \delta_{x})) \subseteq B(f(x), \frac{\epsilon}{2})$.

Now, $\{B(x, \frac{\delta_{x}}{2})\}_{x \in X}$ is an open cover of $X$, so there is a finite subcover $\{B(x_{i}, \frac{\delta_{x_{i}}}{2})\}_{i =1}^{n}$.

If we take $\delta := \min_{i} (\frac{\delta_{x_{i}}}{2})$, then we claim $d(x,y) < \delta \implies \rho(f(x), f(y)) < \epsilon$. Why?

Well, suppose $d(x,y) < \delta$. Since $x \in B(x_{i}, \frac{\delta_{x_{i}}}{2})$ for some $i$, we get $y \in B(x_{i}, \delta_{x_{i}})$. Why? $d(y, x_{i}) \leq d(y,x) + d(x,x_{i}) < \frac{\delta_{x_{i}}}{2} + \frac{\delta_{x_{i}}}{2} = \delta_{x_{i}}$.

Ok, finally, if $d(x,y) < \delta$, then we claim $\rho(f(x), f(y)) < \epsilon$. This is because $\rho(f(x), f(y)) \leq \rho(f(x), f(x_{i})) + \rho(f(x_{i}), f(y)) < \frac{\epsilon}{2} + \frac{\epsilon}{2} = \epsilon$.