Skip to main content

Section 1.4 Continuity

The following definition should be compared with the corresponding concept for functions on an interval, say.

Definition 1.42.

Let \((X,d_X)\) and \((Y,d_Y)\) be metric spaces. A map \(f \maps X \to Y\) is continuous at a point \(x_0 \in X\) if
\begin{gather*} \forall \varepsilon \gt 0 \, \exists \delta \gt 0 \st \forall x \in X,\\ d_X(x,x_0) \lt \delta \implies d_Y(f(x),f(x_0)) \lt \varepsilon\text{.} \end{gather*}
If \(f\) is continuous at every point of \(X\text{,}\) then we say that \(f\) is continuous.
Figure 1.9. Sketch of the inequalities appearing in Definition 1.42. Any point \(x\) in the shaded ball \(B_\delta(x_0) \subseteq X\) is mapped by \(f\) to a (shaded) point \(f(x)\) in the ball \(B_\varepsilon(f(x_0)) \subseteq Y\text{.}\) Here the first ball is defined using the metric \(d_X\) on \(X\text{,}\) while the second ball is defined using the metric \(d_Y\) on \(Y\text{.}\)
There are also stronger versions of continuity.

Definition 1.43.

Let \((X,d_X)\) and \((Y,d_Y)\) be metric spaces. A map \(f \maps X \to Y\) is called uniformly continuous if
\begin{gather*} \forall \varepsilon \gt 0 \, \exists \delta \gt 0 \st \forall x_1, x_2 \in X,\\ d_X(x_1, x_2) \lt \delta \implies d_Y(f(x_1), f(x_2)) \lt \varepsilon\text{.} \end{gather*}

Definition 1.44.

Let \((X,d_X)\) and \((Y,d_Y)\) be metric spaces. A map \(f \maps X \to Y\) is called Lipschitz continuous if there exists a number \(L \ge 0\) such that
\begin{equation*} d_Y(f(x_1), f(x_2)) \le L d_X(x_1, x_2) \end{equation*}
for all \(x_1, x_2 \in X\text{.}\) We call \(L\) a Lipschitz constant for \(f\text{.}\)
It is clear that a uniformly continuous map is continuous, but a continuous map is not necessarily uniformly continuous. Moreover, Lipschitz continuity implies uniform continuity, but uniform continuity does not imply Lipschitz continuity.
Some of the other properties of continuous functions on an interval can be generalised to the setting of metric spaces, too.

Proof.

Fix \(\varepsilon \gt 0\text{.}\) As \(g\) is continuous at \(f(x_0)\text{,}\) there exists \(\rho \gt 0\) such that
\begin{equation*} d_Y(y, f(x_0)) \lt \rho \implies d_Z(g(y), g(f(x_0))) \lt \varepsilon\text{.} \end{equation*}
As \(f\) is continuous at \(x_0\text{,}\) there exists a \(\delta \gt 0\) such that
\begin{equation*} d_X(x, x_0) \lt \delta \implies d_Y(f(x), f(x_0)) \lt \rho\text{.} \end{equation*}
So if \(d_X(x, x_0) \lt \delta\text{,}\) it follows that \(d_Z(g(f(x)), g(f(x_0))) \lt \varepsilon\text{.}\)

Proof.

Suppose that \(f\) is continuous at \(x_0\text{.}\) Let \((x_n)_{n \in \N}\) be a sequence with \(x_n \to x_0\) as \(n \to \infty\text{.}\) Let \(\varepsilon \gt 0\) and choose \(\delta \gt 0\) such that
\begin{equation*} d_X(x,x_0) \lt \delta \implies d_Y(f(x),f(x_0)) \lt \varepsilon\text{.} \end{equation*}
There exists \(N \in \N\) such that \(d_X(x_n,x_0) \lt \delta\) whenever \(n \ge N\text{,}\) and so \(d_Y(f(x_n),f(x_0)) \lt \varepsilon\text{.}\) It follows that \(f(x_n) \to f(x_0)\) as \(n \to \infty\text{.}\)
Now suppose that \(f\) is not continuous at \(x_0\text{.}\) That is,
\begin{gather*} \exists \varepsilon \gt 0 \st \forall \delta \gt 0 \, \exists x \in X \st\\ d_X(x,x_0) \lt \delta \anda d_Y(f(x),f(x_0)) \ge \varepsilon\text{.} \end{gather*}
Choose \(\varepsilon \gt 0\) with this property and consider \(\delta = 1/n\) for an arbitrary \(n \in \N\text{.}\) We conclude that there exists a point \(x_n \in X\) with \(d_X(x_n,x_0) \lt 1/n\) and \(d_Y(f(x_n),f(x_0)) \ge \varepsilon\text{.}\) Since we have such a point \(x_n\) for every \(n \in \N\text{,}\) we obtain a sequence \((x_n)_{n \in \N}\text{.}\) This sequence satisfies \(x_n \to x_0\text{,}\) but \(f(x_n) \not\to f(x_0)\) as \(n \to \infty\text{.}\)
The second condition in Theorem 1.46 is called sequential continuity. Often it is much more convenient to check sequential continuity than to directly verify Definition 1.42, which makes Theorem 1.46 a very useful result.

Exercises Exercises

1. (PS4) Metric is Lipschitz.

Let \((X,d)\) be a metric space.
(a)
Fix \(p \in X\text{.}\) Show that the function \(f \maps X \to \R\text{,}\) given by \(f(x) = d(x, p)\) for \(x \in X\text{,}\) is Lipschitz continuous.
Hint.
The Reverse triangle inequality is useful here.
Solution.
For \(x, y \in X\text{,}\) we have the inequality
\begin{equation*} |f(x) - f(y)| = |d(x, p) - d(y, p)| \le d(x, y) \end{equation*}
by Lemma 1.8. This means that \(f\) is Lipschitz continuous (with Lipschitz constant \(1\)).
(b)
Consider the product space \(X \times X\) equipped with the product metric \(d_{X \times X}\text{.}\) Show that \(d \maps X \times X \to \R\) is Lipschitz continuous with respect to \(d_{X \times X}\text{.}\)
Hint 1.
A substantial portion of this problem is translating the statement “\(d \maps X \times X \to \R\) is Lipschitz continuous” into an inequality to be proven. It is worth your time to do this translation carefully!
Hint 2.
The obvious inequality \(d(x_1,x_2) \le d_{X \times X}((x_1,y_1),(x_2,y_2))\) is useful here, as is the estimate used in the first part of Exercise 1.3.1.
Solution.
Let \((x_1, y_1),(x_2,y_2) \in X \times X\text{.}\) Arguing exactly as in the solution to the first part of Exercise 1.3.1, we have
\begin{align*} \abs{d(x_2, y_2) - d(x_1, y_1)} \amp \le d(x_2, x_1) + d(y_2, y_1)\text{.} \end{align*}
As we have the two inequalities
\begin{gather*} d(x_2, x_1) \le d_{X \times X}((x_2, y_2), (x_1, y_1)),\\ d(y_2, y_1) \le d_{X \times X}((x_2, y_2), (x_1, y_1))\text{,} \end{gather*}
this implies that
\begin{equation*} \abs{d(x_2, y_2) - d(x_1, y_1)} \le 2d_{X \times X}((x_2, y_2), (x_1, y_1))\text{,} \end{equation*}
which means that the metric is Lipschitz continuous (with Lipschitz constant \(2\)).
Comment 1.
As happened in previous years, some students used incorrect formulas for \(d_{X \times X}\) which made the problem considerably easier. On an exam this would have been an easy way to lose a lot of marks. Recall from Definition 1.14 that
\begin{equation*} d_{X \times X}( (x_1,y_1), (x_2,y_2) ) = \sqrt{(d_X(x_1, x_2))^2 + (d_Y(y_1, y_2))^2}\text{.} \end{equation*}
One way to remember this formula is that it gives the correct answer if we work with Euclidean norms on \(\R^2 = \R \times \R\text{.}\) That is, if \(x = (x_1,x_2)\) and \(y=(y_1,y_2)\) are vectors in \(\R^2\text{,}\) then
\begin{equation*} d_{\R^2}(x,y) = d_{\R \times \R}(x,y) = \sqrt{(d_\R(x_1,y_1))^2 + (d_\R(x_2,y_2))^2}\text{.} \end{equation*}
Comment 2.
We could in fact have estimated
\begin{equation*} d(x_1, x_2) + d(y_1, y_2) \le \sqrt 2 \sqrt{ (d(x_1,x_2))^2 + (d(y_1,y_2))^2 }\text{,} \end{equation*}
for instance by applying the third inequality in the last part of Exercise 1.1.5 to the vector \((d(x_1,x_2),d(y_1,y_2)) \in \R^2\text{.}\) This gives a better (i.e. smaller) Lipschitz constant \(L=\sqrt 2\text{.}\)
Comment 3.
Several students estimated inside of absolute values as if the absolute values themselves, and often some of the minus signs inside the absolute values, were not there. As a concrete example, suppose that \(a,b,A,B\) are real numbers with \(0 \le a \le A\) and \(0 \le b \le B\text{.}\) These inequalities in no way imply that \(\abs{a-b} \le \abs{A-B}\text{.}\) If this is surprising, I recommend that you play around with explicit values of \(a,b,A,B\) until you can find a counterexample.
Comment 4.
In some sense the first step of this problem is to translate the sentence “\(d \maps X \times X \to \R\) is Lipschitz continuous” into an inequality to be proven. Several students did not do this correctly. If this is you, my main recommendation is do this and other translations as slowly and carefully as you can stand (maybe on scrap paper) so that you are really sure you are getting the right thing. Once you are more comfortable with the definitions (e.g. from endless practice on problem sheets!) this will get faster.

2. (PS4) Image of closure under continuous map.

Let \((X, d_X)\) and \((Y, d_Y)\) be metric spaces, suppose that \(f \maps X \to Y\) is a continuous map, and let \(S \subseteq X\text{.}\) Show that the images \(f(\overline S)\) and \(f(S)\) are related by \(f(\overline S) \subseteq \overline{f(S)}\text{.}\)
Hint.
Probably the simplest thing, given the tools available, is to argue directly using the definition of the closure in Definition 1.20 and the definition of continuity. Alternatively, one can argue in terms of convergent sequences, partly emulating the proof of Theorem 1.35.
Solution 1.
Suppose that \(y \in f(\overline S)\) and choose \(x \in \overline S\) with \(y = f(x)\text{.}\) We have to show that \(B_r(y) \cap f(S) \ne \varnothing\) for all \(r \gt 0\text{.}\) So fix \(r \gt 0\text{.}\) By the continuity of \(f\text{,}\) there exists \(\delta \gt 0\) such that \(d_Y(f(x), f(x')) \lt r\) for all \(x' \in X\) with \(d_X(x, x') \lt \delta\text{.}\) Moreover, since \(x \in \overline S\text{,}\) there exists \(s \in S\) with \(d_X(x, s) \lt \delta\text{.}\) Therefore, we conclude that \(d_Y(y, f(s)) \lt r\text{,}\) and in particular \(B_r(y) \cap f(S) \ne \varnothing\text{.}\)
Solution 2. Using sequences
Arguments very similar to the proof of Theorem 1.35 show that a point \(x \in X\) lies in the closure \(\overline{S}\) if and only if there is a sequence of points \(\seq xn\) in \(S\) with \(x_n \to x\) as \(n \to \infty\text{.}\) Suppose that we have proved such a lemma.
Then we can offer the following alternative solution. Let \(y \in f(\overline S)\) and choose \(x \in \overline S\) with \(y=f(x)\text{.}\) Then by the above lemma, there exists a sequence \(\seq xn\) in \(S\) with \(x_n \to x\text{.}\) As \(f\) is continuous, we then have \(f(x_n) \to f(x) = y\) (by Theorem 1.46). Since the sequence \((f(x_n))_{n \in \N}\) lies in \(f(S)\text{,}\) applying the lemma a second time (but now in the reverse direction and with \(f(S) \subseteq Y\) playing the role of \(S \subseteq X\)) we conclude that \(y \in \overline{f(S)}\) as desired.
Solution 3. Using Exercise 1.4.3
As in previous years, at least one student gave a more ‘topological’ argument using Exercise 1.4.3, which I am assuming they saw a proof of in Analysis 2A or perhaps the Topology unit. Since \(\overline{f(S)} \supseteq f(S)\text{,}\) we have by basic set theory that
\begin{equation*} S \subseteq f^{-1}(f(S)) \subseteq f^{-1}(\overline{f(S)})\text{.} \end{equation*}
Since \(\overline{f(S)}\) is closed and \(f\) is continuous, the version of Exercise 1.4.3 for closed sets (obtained by taking complements) implies that \(f^{-1}(\overline{f(S)})\) is closed. Thus Theorem 1.23 and the inclusion \(S \subseteq f^{-1}(\overline{f(S)})\) above imply \(f^{-1}(\overline{f(S)}) \supseteq \overline{S}\text{,}\) and hence that \(f(\overline S) \subseteq \overline{f(S)}\) as desired.

3. Continuity in terms of open sets.

Let \((X,d_X)\) and \((Y,d_Y)\) be metric spaces and \(f \maps X \to Y\text{.}\) Show that \(f\) is continuous if and only if the preimage \(f^{-1}(U)\) is open for all open subsets \(U\) of \(Y\text{.}\)