TITLE: In $\mathbb{R}^n$, locally lipschitz on compact set implies lipschitz
QUESTION [23 upvotes]: I need to prove:

Let $A$ be open in $\mathbb{R}^m$, $g:A \longrightarrow \mathbb{R}^n$ a  locally lipschitz function and $C$ a compact subset of $A$.
Show that $g$ is lipschitz on $C$.

Can anyone help me?

REPLY [12 votes]: Maximize the continuous function $f(x,y)=\frac{|g(x)-g(y)|}{|x-y|}$ over the compact set $C\times C\cap\{|x-y| \geq \varepsilon\}$ with a sufficiently small $\varepsilon>0$. Locally Lipschitz condition is used to show that $f$ is bounded in $C\times C\cap\{|x-y|<\varepsilon\}$.