Hunter Liu's Website

3. Week 2: Compactness and Continuity

≪ 2. A Problem with Tubes | Table of Contents | 4. Week 3: Connected Sets ≫

Let’s lead off with a quick note about compactness. You should have learned in lecture that there’s a three-way equivalence of properties in metric spaces:

Theorem 1. Heine-Borel

Let \((X, d)\) be a (complete) metric space and \(S\subseteq X\) be a subset. The following are equivalent:

  1. \(S\) is covering compact.
  2. \(S\) is sequentially compact.
  3. \(S\) is closed and totally bounded.

Typically, properties 1 and 2 are the actually useful properties; on your homework, you’ll likely be relying upon these very frequently. But to actually establish that something is compact, one can either use some of the ideas established last week, or one should show property 3 and go from there. Very rarely will properties 1 or 2 be easier to show than property 3!

Of course, whether you’ll want to use covering or sequential compactness will depend on the scenario.

Exercise 2.

Let \([0, 1] ^{\mathbb{N}}\) be the set of all sequences \(\left( x_n \right) _{n\in \mathbb{N}}\) such that \(x_n \in \left[ 0, 1 \right]\) for all \(n\). Define the metric \[d \left( \left( x_n \right) , \left( y_n \right) \right) = \sum _{n=1}^{\infty} \frac{1}{2^n} \left\lvert x_n - y_n \right\rvert. \] Show that \(\left( [0, 1] ^{\mathbb{N} }, d \right)\) is compact.

If you haven’t seen it before, you can prove this using the diagonalisation argument; however, you can also use the Heine-Borel for a notationally cleaner proof.

Let’s now refresh our memories on what continuity is:

Definition 3.

Let \(\left( X, d_X \right)\) and \(\left( Y, d_Y \right)\) be metric spaces. A function \(f : X\to Y\) is continuous at a point \(x\in X\) if for every \(\epsilon > 0\) there exists a \(\delta > 0\) such that \[d_X \left( x, x’ \right) < \delta \implies d_Y \left( f\left( x \right) , f\left( x’ \right) \right) < \epsilon \] for all \(x’ \in X\). \(f\) is continuous if it’s continuous at every point in \(X\).

You should think of this as saying, “nearby points are sent to nearby points”. Something to point out is that this \(\delta \) will obviously depend on \(\epsilon \), but it may also depend on \(x\).

There are two other ways to characterise continuity, and these two characterisations will frequently be more useful than the definition presented above.

Proposition 4.

If \(f: X\to Y\) is a function, the following are equivalent:

  1. \(f\) is continuous.
  2. For every sequence \(\left( x_n \right)\subseteq X\) converging to a limit \(x_0 \in X\), we also have \(f\left( x_n \right)\to f\left( x_0 \right)\) in \(Y\).
  3. If \(U\subseteq Y\) is an open subset, then \(f ^{-1}(U)\) is an open subset of \(X\).

The second equivalent statement you may recognise as saying “continuous functions commute with limits”. This last statement is a bit more mysterious, but is in line with the heuristic that “nearby points are sent to nearby points”.

If \(U\) in an open subset of \(Y\), and if \(f(x) \in U\) for some \(x\), then \(N_ \epsilon \left( f(x) \right)\subseteq U\) for some \(\epsilon > 0\) sufficiently small. We have \(x\in f ^{-1}(U)\), by observation. If \(f\) is continuous, then we have (by chasing the definitions) that \[f \left( N_ \delta (x) \right)\subseteq N_ \epsilon \left( f(x) \right)\subseteq U,\] so \(N_ \delta (x) \subseteq f ^{-1}(U)\) and the latter set is open. This argument works in reverse too! So this open set characterisation of continuity is just another way of saying “nearby points are sent to nearby points”, buried 3 or 4 definitions deep into mathematical language.

Which equivalent characterisation of continuity you’ll want to use completely depends on the scenario! For instance, proving the composition of continuous functions is continuous is pretty much trivial using the open set characterisation of continuity, and it’s slightly annoying with the other two. But let’s present some other examples:

Lemma 5.

Let \(\left( X, d \right)\) be a metric space. Then, the metric \(d : X\times X\to \mathbb{R}\) via \((x, y) \mapsto d\left( x, y \right)\) is continuous with respect to the product metric.

Proof
If \(\left( x_1, y_1 \right), \left( x_2, y_2 \right)\in X\times X\), then we have by the triangle inequality that \[d\left( x_1, y_1 \right) \leq d\left( x_1, x_2 \right) + d\left( x_2, y_2 \right) + d\left( y_2, y_1 \right).\] Rearranging this and repeating with the roles of the two pairs swapped yields \[\left\lvert d\left( x_1, y_1 \right) - d\left( x_2, y_2 \right) \right\rvert \leq d\left( x_1, x_2 \right) + d\left( y_1, y_2 \right).\] Thus, for any \(\epsilon > 0\), we have that \(d _{X\times X} \left( \left( x_1, y_1 \right), \left( x_2, y_2 \right) \right) < \epsilon \) implies that \(\left\lvert d\left( x_1, y_1 \right) - d\left( x_2, y_2 \right) \right\rvert < \epsilon \) as well. Thus, \(d\) is continuous. \(\square\)

Lemma 6.

Let \(f_1 : X_1\to Y_1\) and \(f_2: X_2\to Y_2\) be continuous functions between metric spaces. Then \(F : X_1\times X_2 \to Y_1\times Y_2\) via \(\left( x_1, x_2 \right) \mapsto \left( f_1\left( x_1 \right), f_2 \left( x_2 \right) \right)\) is continuous with respect to the product metrics.

Lemma 7.

Products and linear combinations of real-valued (or complex-valued) continuous functions on a comman domain are continuous.

I’ll leave the last two lemmas as exercises.

Let \(U_1, U_2\subseteq X\) be two open sets, and let \(Y\) be any metric space. Suppose \(f_1 : U_1 \to Y\) and \(f_2 : U_2 \to Y\) are both continuous, and suppose \(f_1(x) = f_2(x)\) whenever \(x\in U_1\cap U_2\). Then, the function \(f : U_1\cup U_2 \to Y\) via \[f(x) = \begin{cases} f_1(x) & x\in U_1, \\ f_2(x) & x\in U_2\end{cases}\] is continuous. This is completely obvious — continuity on a domain is a pointwise characteristic, and the function as defined is continuous at every point in its domain because. What else would it be. Like come on.

Question 8.

Suppose \(S_1, S_2\) are two arbitrary subsets of \(X\). If \(f_1 : S_1\to Y\) and \(f_2 : S_2 \to Y\) are both continuous, and if \(f_1(x) = f_2(x)\) whenever \(x\in S_1\cap S_2\), is the function \[f(x) = \begin{cases} f_1(x) & x\in S_1, \\ f_2(x) & x\in S_2\end{cases}\] also continuous?

The answer is a resounding no. Otherwise, every piecewise function would be continuous, and we know that this is false. Think carefully about how openness of these domains interacts with the definition of continuity! Perhaps the following example is illustrative: define \[f(x) = \begin{cases} 1 & x \leq 0, \\ 0 & x > 0.\end{cases}\] The problem here is that defining \(f(x) = 0\) for \(x > 0\) encodes also some information about what \(f(0)\) should be; in light of the sequential definition of continuity, any sequence \(x_n \to 0^+\) satisfies \(f\left( x_n \right) \to 0\) as well. This completely generalises in the following sense:

Proposition 9.

Suppose \(f, g : X\to Y\) are two continuous functions between metric spaces, and suppose \(f(x) = g(x)\) for all \(x\in S\) for some subset \(S\subseteq X\). Then, \(f(x) = g(x)\) for all \(x\in \overline{S}\) (the closure of \(S\)).

So the problem with the preceeding example was: \(f(x) = 0\) on the open set \((0, \infty)\), and both sides are continuous, yet \(f(x) \neq 0\) on \(\overline{(0,\infty)} = \left[ 0, \infty \right)\). Thus, in order for us to put together two continuous functions on arbitrary domains, we need to make sure this sort of thing doesn’t happen.

In general, it’s a bit hard to give a good characterisation of when you can give a piecewise definition of a function on two or more subsets and still have it be continuous. At the very least, if each of these subsets are open or close (or both), and if the pieces agree on the overlaps, then you have a continuous piecewise function for sure.

Finally, let’s give some examples of really easy mistakes to make.

  1. The direct image of open sets need not be open: if \(f : \mathbb{R}\to \mathbb{R}\) is given by \(f(x) = 1\) for all \(x\), then the open set \((0, 1)\) is sent to the closed set \(\left\lbrace 1 \right\rbrace\).
  2. While the inverse image of closed sets is closed, the direct image of closed sets need not be closed. Consider \(\arctan : \mathbb{R}\to \mathbb{R}\), which takes the closed set \(\mathbb{R}\) to the open interval \(\left( - \frac{\pi }{2}, \frac{\pi }{2} \right)\).
  3. If \(f\) is a continuous bijection, then its inverse may not be continuous. This can be shown with the metric spaces \(\left( \mathbb{R}, \left\lvert \cdot \right\rvert \right)\) (the standard metric on \(\mathbb{R}\)) and \(\left( \mathbb{R}, d _{0} \right)\), where \(d_0(x, y) = 1\) if \(x\neq y\) is the discrete metric. Then, the identity function is continuous \(\left( \mathbb{R}, d_0 \right) \to \left( \mathbb{R}, \left\lvert \cdot \right\rvert \right)\), but its inverse (itself) is not continuous in the opposite direction.

Exercise 10.

Let \(f: X\to Y\) be a function between metric spaces. Show that \(f\) is continuous if and only if the restriction \(\left. f\right\rvert_{C} : C\to Y\) is continuous for every compact subset \(C\subseteq X\).