# Is the restriction of a continous function to a compact set uniformly continuous?

Suppose $f:S\to T$ which is continuous and consider $A\subset S$ which is compact, is $f$ is uniformly continuous on A?

I have tried to prove it by considering a finite subcover of $A$ say $\bigcup B(x_i,r_i)$ and I want to show that for any $\epsilon$-ball of any element of $f(A)$ there existd a uniform $\delta$, such that any $\delta$-ball of any point in $A$ would be mapped into the $\epsilon$-ball. So take a small enough $\epsilon$. By continuity, there is a uniform $\delta$ such that $f(B_{\delta})\subset B_{\epsilon}$. But here comes the problem: I am not sure how to get a uniform $\delta$ such that $f(B_{\delta})\subset B_{\epsilon}$ for any point in $A$. Any idea to get this uniform $\delta$?

-

Take some $\epsilon > 0$. What continuity says is that for each $x\in A$, there is an open ball $B(x,\delta_x)$ such that $f(B(x,\delta_x))\subset B(f(x),\epsilon)$.
Now $\bigcup_{x\in A}B(x,\delta_x)$ covers $A$. Since $A$ is compact, you can extract a finite cover: $A=\bigcup_{i=1}^n B(x_i,\delta_{x_i})$. Can you see what to choose as the value for your uniform $\delta$?
I think it should be the $\min \delta_{x_i}$ right? – Mathematics Dec 6 '12 at 16:13
@Mathematics Yes, $\delta = \min_i\delta_{x_i}$ works. You just have to check that. – jathd Dec 6 '12 at 16:27