# Is a continuous function locally uniformly continuous?

Assume a function, $f : X \to Y$, mapping between two metric spaces, $X,Y$, is pointwise continuous, i.e. for every $\varepsilon >0$ and $x \in X$ there exists a $\delta>0$ such that $$\|x-x'\|_X < \delta \implies \|f(x) - f(x')\|_Y < \varepsilon , \qquad \forall x' \in X.$$

Does this imply $f$ is locally uniformly continuous, i.e. for every $x \in X$ there exists a neighbourhood $U \subset X$ such that for every $\varepsilon > 0$ there exists a $\delta > 0$ such that $$\|x_1-x_2\|_X < \delta \implies \|f(x_1) - f(x_2)\|_Y < \varepsilon , \qquad \forall x_1,x_2 \in U?$$

A positive answer without proof, under the condition that $X$ and/or $Y$ are locally compact, is implied here.

• This will happen if $X$ is locally compact, by the Heine-Cantor theorem (a continuous function from a compact metric space into a metric space is uniformly continuous. The proof of this is the same as in $\mathbb{R}$, just with the usual substitutions). I think that if $X$ and $Y$ are fairly "big" and $f$ is a completely arbitrary continuous function, local compactness will be necessary. – Ian Dec 1 '15 at 13:00

If $X$ is locally compact, the result follows from Cantor's theorem. If $X$ is not locally compact, the result is not necessarily true as Stefan's example shows.
Let $I_n = \left(\frac1{n+1}, \frac1{n} \right)$ for natural $n$, and let $X = \{0\} \bigcup_n I_n$. Now define $f : X \to\Bbb R$ by $$x \mapsto \begin{cases} 0, & \text{ if }x=0\\ \frac1n, & \text{ if } x\in I_n \end{cases}$$ This function is continuous but not locally uniformly continuous at $0$.
• @JohnHughes The codomain is $\mathbb{R}$... – Ian Dec 1 '15 at 13:01
• Do I understand correctly that the problem here is "only" that 0 does not have a neighbourhood in $X$? – gTcV Dec 1 '15 at 13:18
• @gTcV: $0$ has a neighborhood in $X$, such a neighborhood contains $0$ and all $I_n$ whose $n$ is larger than some $k$. The problem is in the "jumps" the function does at the points $\frac1n$. If you meant that $0$ does not have a neighborhood in $\Bbb R$ which is contained in $X$, then one could say yes, that's the problem. – Stefan Hamcke Dec 1 '15 at 13:21
• @gTcV: We are dealing with neighborhoods in $X$, i.e. neighborhoods with respect to the topological space $X$. If on $X$ we take the topology induced by the Euclidean topology on $\Bbb R$, then a neighborhood $U$ in $X$ is (defined as) an intersection $U'\cap X$ where $U'$ is a neighborhood in $\Bbb R$. – Stefan Hamcke Dec 1 '15 at 13:37
• @gTcV: You can also take the restricted metric on $X$, this induces the same topology on $X$. An $\varepsilon$-neighborhood of $x$ in $X$ is then $$\{y \in X \mid |y-x| < \varepsilon \}$$ – Stefan Hamcke Dec 1 '15 at 13:40