Except in mathematics, the shortest distance between point A and point B is seldom a straight line. I don’t believe in mathematics.
—Albert Einstein
Let us give an introduction to metric spaces for the student that may not have seen metric spaces in full generality. This appendix is an adapted and shortened version of chapter 7 from [L1].
The main idea in analysis is to take limits and talk about continuity. We wish to abstract what it means to be able to take limits in various contexts. The most basic such abstraction is a metric space. While it is not sufficient to describe every type of limit we find in modern analysis, it gets us very far indeed.
Let be a set, and let be a function such that for all ,
(nonnegativity),
if and only if (identity of indiscernibles),
(symmetry),
(triangle inequality).
The pair is called a metric space. The function is called the metric or the distance function. If the metric is clear from context, we may write simply instead of .
The geometric idea is that is the distance between two points. Items (i)–(iii) have obvious geometric interpretation: Distance is always nonnegative, the only point that is distance away from is itself, and the distance from to is the same as the distance from to . The triangle inequality (iv) has the interpretation given in Figure A.1.
For the purposes of drawing, it is convenient to draw figures and diagrams in the plane with the metric being the euclidean distance. However, that is only one particular metric space. Just because a certain fact seems to be clear from drawing a picture does not mean it is true in every metric space. You might be getting sidetracked by intuition from euclidean geometry, whereas the concept of a metric space is a lot more general.
The set of real numbers is a metric space with the metric
Items (i)–(iii) of the definition are easy to verify. The triangle inequality (iv) follows immediately from the standard triangle inequality for real numbers:
This metric is the standard metric on . If we talk about as a metric space without mentioning a specific metric, we mean this particular metric.
The -dimensional euclidean space is also a metric space. In this book we mostly see , but let us give the example in more generality. We use the following notation for points: . Before making a metric space, let us prove an important inequality, the so-called Cauchy–Schwarz inequality.
If , , then
A square of a real number is nonnegative and so a sum of squares is nonnegative:
We relabel and divide by to obtain the needed inequality:
Let us construct the standard metric for . Define
For , the real line, this metric agrees with what we did above. Again, the only tricky part of the definition to check is the triangle inequality. The trick is to work with the square of the metric and apply the Cauchy–Schwarz inequality.
Taking the square root of both sides we obtain the correct inequality.
The set of complex numbers is a metric space using the standard euclidean metric on by identifying with .
Let be the set of continuous real-valued functions on the interval . Define the metric on as
Let us check the properties. First, is finite as is a continuous function on a closed bounded interval , and so is bounded. Clearly . If , then for all and hence . Conversely, if , then for any , we have , and hence . That is equally trivial. The triangle inequality follows from the triangle inequality on .
When treating as a metric space without mentioning a metric, we mean this particular metric.
The sphere with the so-called great circle distance is also a metric space. Let be the unit sphere in , that is, . Take and in , draw a line through the origin and , and another line through the origin and , and let be the angle that the two lines make. Then define , see Figure A.2. The law of cosines from vector calculus says . It is relatively easy to see that this function satisfies the first three properties of a metric. The triangle inequality is harder to prove. It requires a bit more trigonometry and linear algebra than we wish to indulge in right now, so we leave it without proof.
Oftentimes it is useful to consider a subset of a larger metric space as a metric space itself. We obtain the following proposition, which has a trivial proof.
Let be a metric space and . Then the restriction is a metric on .
If is a metric space, , and , then is said to be a subspace of .
It is common to simply write for the metric on , as it is the restriction of the metric on . We say is the subspace metric and has the subspace topology.
Let be a metric space. A subset is said to be bounded if there exists a and a such that
We say is bounded if itself is a bounded subset.
For instance, the set of real numbers with the standard metric is not a bounded metric space. On the other hand, the real numbers with the discrete metric, if , and , is a bounded metric space. Any set with the discrete metric is bounded.
Suppose is nonempty. Then is bounded if and only if
For every , there exists a such that for all .
.
See the exercises. The quantity is called the diameter of a set and is usually only defined for a nonempty set.
Show that for any given set , the discrete metric ( if and ) does give a metric space .
Suppose is a metric space and is an increasing function such that for all and if and only if . Also suppose is subadditive, that is, . Show that with , we obtain a new metric space .
Let and be metric spaces.
Show that with is a metric space.
Show that with is a metric space.
Let be the set of continuous functions on . Let be continuous. Define
Show that is a metric space.
Let be a metric space. For nonempty bounded subsets and let
Now define the Hausdorff metric as
Note: can be defined for arbitrary nonempty subsets if we allow the extended reals.
Show by example that itself is not symmetric, that is, .
Find a metric space and two different nonempty bounded subsets and such that .
Let be a nonempty metric space and a subset. Prove:
is bounded if and only if for every , there exists a such that for all .
A nonempty is bounded if and only if .
Find a metric on such that is an unbounded set in .
Find a metric on such that is a bounded set in .
Find a metric on such that for every and every , there exists an , , such that .
Let be the set of once continuously differentiable functions on . Define
where is the uniform norm. Prove that is a metric.
The set of sequences of real numbers such that is called .
Prove the Cauchy–Schwarz inequality for two sequences and in : Prove that converges (absolutely) and
Prove that is a metric space with the metric . Hint: Don’t forget to show that the series for always converges to some finite number.
Let be a metric space, , and . The open ball or simply ball of radius around is
The closed ball is
When dealing with different metric spaces, we may emphasize which metric space the ball is in by writing or .
Consider with the standard metric. For and ,
Consider the metric space as a subspace of . Then
This is different from . The important thing to keep in mind is which metric space we are working in.
Let be a metric space. A subset is open if for every , there exists a such that . See Figure A.3. A subset is closed if the complement is open. If the ambient space is not clear from context, we say is open in and is closed in . The set of open sets is called the topology on .
If and is open, then is an open neighborhood of (or simply neighborhood). More generally a neighborhood of is a set that contains an open neighborhood of , but unless otherwise specified, we usually mean open neighborhood.
Intuitively, a set is open if it does not include its “boundary.” Wherever we are in , we are allowed to “wiggle” a little bit and stay in . Similarly, a set is closed if everything not in is some distance away from . The open and closed balls are examples of open and closed sets (which must still be proved). Not every set is either open or closed, most subsets are neither.
The set is open: Given any , let .
The set is closed: Given , let .
The set is neither open nor closed. Every , contains negative numbers and hence is not contained in . So is not open. Every , contains numbers in . Thus is not open, and is not closed.
Let be a metric space.
and are open.
If are open subsets of , then
is also open. That is, a finite intersection of open sets is open.
If is an arbitrary collection of open subsets of , then
is also open. That is, a union of open sets is open.
Item (ii) is not true for an arbitrary intersection: is not open.
Let be a metric space.
and are closed.
If is an arbitrary collection of closed subsets of , then
is also closed. That is, an intersection of closed sets is closed.
If are closed subsets of , then
is also closed. That is, a finite union of closed sets is closed.
Prove Proposition A.2.7.
We have not yet shown that the open ball is open and the closed ball is closed. Let us show this fact now to justify the terminology.
Let be a metric space, , and . Then is open and is closed.
Let . Let . As , consider . Then
Thus, for every . So , and so is open.
The proof that is closed is left as an exercise. ∎
Finish the proof of Proposition A.2.8 by proving that is closed.
Be careful about what metric space you find yourself in. As is an open ball in , the set is an open set in . On the other hand, is neither open nor closed in .
Let be two real numbers, . Then , , and are open in . Also , , and are closed in .
Prove Proposition A.2.9.
Suppose is a metric space, and . Then is open in (in the subspace topology) if and only if there exists an open set (so open in ) such that .
For example, let , , . We saw that is an open set in . We may take .
Suppose is open and . Let . As is open and , there exists a such that . Then
The proof of the opposite direction, that is, that if is open in the subspace topology there exists a is left as an exercise. ∎
Finish the proof of Proposition A.2.10. Suppose is a metric space and . Show that with the subspace metric on , if a set is open (in ), then there exists an open set such that .
For an open subset of an open set or a closed subset of a closed set, matters are simpler.
Suppose is a metric space, is open, and is closed.
is open in the subspace topology if and only if is open in .
is closed in the subspace topology if and only if is closed in .
If is open in the subspace topology, by Proposition A.2.10, there exists a set , open in , such that . Intersection of two open sets is open so is open in . For the other direction, suppose is open in . Then . So is open in again by Proposition A.2.10. ∎
Finish the proof of Proposition A.2.11.
Show that in any metric space, every open set can be written as a union of closed sets.
Let be a set and , be two metrics on . Suppose there exists an and such that for all . Show that is open in if and only if is open in . That is, the topologies of and are the same.
Let be a metric space.
For every and , show .
Is it always true that ? Prove or find a counterexample.
Let be a metric space. Show that there exists a bounded metric such that has the same open sets, that is, the topology is the same.
For every and every define the “rectangle” . Show that these sets generate the same open sets as the balls in standard metric. That is, show that a set is open in the sense of the standard metric if and only if for every point , there exists a such that .
A set is connected if we can continuously move from one point of it to another point without jumping. For example, an interval in . We usually study functions on connected sets.
A nonempty22 2 Some authors do not exclude the empty set from the definition, and the empty set would then be connected. We avoid the empty set for essentially the same reason why is neither a prime nor a composite number: Our connected sets have exactly two clopen subsets and disconnected sets have more than two. The empty set has exactly one. We will not dwell on this technicality. metric space is connected if the only subsets of that are both open and closed (so-called clopen subsets) are and itself. If a nonempty is not connected, we say it is disconnected.
When we apply the term connected to a nonempty subset , we mean that with the subspace topology is connected.
In other words, a nonempty is connected if whenever we write where and and are open, then either or . So to show is disconnected, we find nonempty disjoint open sets and whose union is . We state this idea as a proposition for subsets.
Let be a metric space. A nonempty set is disconnected if and only if there exist open sets and in such that , , , and
The proposition is illustrated in Figure A.5.
First suppose is disconnected, that is, there are nonempty disjoint and that are open in and . Proposition A.2.10 says there exist and that are open in such that and .
For the other direction start with the and . Then and are open in by Proposition A.2.10. Via the discussion before the proposition, is disconnected. ∎
Let be such that with and . Claim: is disconnected. Proof:
A nonempty set is connected if and only if it is an interval or a single point.
Suppose is connected. If is a single point, then we are done. So suppose and . If is such that , then by the same logic as in Example A.2.14, . So is an interval.
If is a single point, it is connected. Therefore, suppose is an interval. Consider open subsets and of such that and are nonempty and . We will show that and contain a common point, so they are not disjoint, proving that is connected. Suppose and . Without loss of generality, assume . As is an interval, . Note that , and let . If , then . If , then for every the ball contains points of not in , as is the infimum of such points. So as is open. Therefore, . As is open, for a small enough . As is the infimum of the nonempty set , there must exist some such that . So and are not disjoint, and is connected. ∎
The ball may or may not be connected, depending on the metric space. Take the space with the discrete metric. The ball is not connected as and are open and disjoint.
Suppose is a nonempty metric space with the discrete topology. Show that is connected if and only if it contains exactly one element.
Take with the standard metric, , as our metric space. Prove that is totally disconnected, that is, show that for every with , there exist two open sets and such that , , , and .
Suppose , , is a collection of connected subsets of a metric space , and there exists an such that for all . Show that is connected.
Sometimes we wish to take a set and throw in everything that we can approach from within the set. This concept is called the closure. More precisely, the closure of is the intersection of all closed sets that contain .
Let be a metric space and . The closure of is the set
We say is dense in if .
Let be a metric space and . Then, and is closed. Furthermore, if is closed, then .
There is at least one closed set containing , the set itself, so . The closure is an intersection of closed sets, so is closed. If is closed, then is a closed set that contains and . So . ∎
The closure of in is . Proof: If is closed and contains , then . Thus . But is also closed. Thus, .
Always notice what ambient metric space you are working with. If , then the closure of in is . Proof: Similarly as above, is closed in (why?). Any closed set that contains must contain (why?). Therefore, , and hence when working in .
Let us justify the statement that the closure is everything that we can “approach” from the set.
Let be a metric space and . Then if and only if for every , .
We will prove the two contrapositives. First suppose . As is closed, for some . Furthermore, , and hence .
On the other hand, suppose for some . In other words, . As is a closed set, as , and as is the intersection of closed sets containing , we have . ∎
We also talk about the interior of a set (points we cannot approach from the complement) and the boundary of a set (points we can approach both from the set and its complement).
Let be a metric space and . The interior of is the set
The boundary of is the set
Consider and . Then , , and .
Suppose with the discrete metric is the metric space and . Then and .
Let be a metric space and . Then is open and is closed.
Given , there is a such that . If , then as open balls are open, there is an such that . So . Therefore, , and is open.
As is open, is closed. ∎
The boundary is the set of points that are close to both the set and its complement. See Figure A.7 for a diagram of the next proposition.
Let be a metric space and . Then if and only if for every , and are both nonempty.
Suppose and let be arbitrary. By Proposition A.2.21, contains a point of . If contained no points of , then would be in . Hence contains a point of as well.
Suppose , so or . If , then for some as is closed. So is empty, because . If , then for some , so is empty. ∎
The proposition above and Proposition A.2.21 give the following corollary.
Let be a metric space and . Then .
In any metric space, prove:
is closed if and only if .
is open if and only if .
In any metric space, prove:
Show that is open if and only if .
Suppose that is an open set and . Show that .
Let be a connected set in a metric space.
Is connected? Prove or find a counterexample.
Is connected? Prove or find a counterexample.
Hint: Think of sets in .
Prove that .
A sequence in a metric space is a function . We write for the th element in the sequence and
for the entire sequence.
A sequence is bounded if there exists a and such that
That is, the sequence is bounded whenever the set is bounded.
If is a sequence of natural numbers such that for all , then the sequence is said to be a subsequence of .
In what follows, we cheat a little and use the definite article in front of the word limit before we prove that the limit is unique.
A sequence in a metric space is said to converge to a point if for every , there exists an such that for all . The point is said to be the limit of . We write
A sequence that converges is convergent. Otherwise, the sequence diverges. See Figure A.8 for an idea of the definition.
A convergent sequence in a metric space has a unique limit.
Suppose the sequence has limits and . Take an arbitrary . From the definition find an such that and . Then
So , and the limit (if it exists) is unique. ∎
The proofs of the following propositions are left as exercises.
A convergent sequence in a metric space is bounded.
A sequence in a metric space converges to if and only if there exists a sequence of real numbers such that
Let be a sequence in a metric space .
If converges to , then every subsequence converges to .
If for some the -tail converges to , then converges to .
Prove Proposition A.3.4.
Prove Proposition A.3.5.
Prove Proposition A.3.6.
The set of continuous functions , see Example A.1.6, is a metric space. Convergence of a sequence of functions in this metric space is the same as uniform convergence. See also section B.1 in the next appendix.
Show that defines a metric on .
Show that a sequence converges in if and only if it converges in the standard metric.
Find a bounded sequence in that contains no convergent subsequence.
Suppose converges to . Suppose is a one-to-one function. Show that converges to .
Let be a metric space where is the discrete metric. Suppose is a convergent sequence in . Show that there exists a such that for all , we have .
A set is said to be dense in if or, in other words, if for every , there exists a sequence in that converges to . Prove that contains a countable dense subset.
Take to be the extended reals. Define if , define , for all , and let .
Show that is a metric space.
Suppose is a sequence of real numbers such that for every , there exists an such that for all . Show that in .
Show that a sequence of real numbers converges to a real number in if and only if it converges in with the standard metric.
Let be a metric space and a sequence in . Prove that converges to if and only if every subsequence of has a subsequence that converges to .
In , a sequence converges if and only if every component converges:
Let be a sequence in , where . Then converges if and only if converges for every , in which case
Suppose the sequence converges to . Given , there exists an such that for all ,
Fix some . For ,
Hence the sequence converges to .
For the other direction, suppose converges to for every . Given , pick an such that if , then for all . Then
That is, the sequence converges to . ∎
For , the proposition says that converges to if and only if converges to and converges to .
Consider , and let be the standard euclidean metric. Let and .
Use Exercise A.1.3, to show that and are metric spaces.
Let be a sequence in and . Prove that the following statements are equivalent:
converges to in .
converges to in .
converges to in .
The topology—the set of open sets of a space—encodes which sequences converge.
Let be a metric space and a sequence in . Then converges to if and only if for every open neighborhood of , there exists an such that for all , we have .
Suppose converges to . Let be an open neighborhood of . There exists an such that . As the sequence converges, find an such that for all , we have , or in other words .
Let us prove the other direction. Given , let be the neighborhood of . Then there is an such that for , we have , or in other words, . ∎
A closed set contains the limits of its convergent sequences.
Let be a metric space, a closed set, and a sequence in that converges to some . Then .
Let us prove the contrapositive. Suppose is a sequence in that converges to . As is open, Proposition A.3.10 says that there is an such that for all , . So is not a sequence in . ∎
To take the closure of a set , we take , and we throw in points that are limits of sequences in .
Let be a metric space and . Then if and only if there exists a sequence of elements in such that .
Let . For every , by Proposition A.2.21 there exists a point . As , we have .
For the other direction, see Exercise A.3.11. ∎
Finish the proof of Proposition A.3.12: Let be a metric space and . Let be such that there exists a sequence in that converges to . Prove that .
Suppose is a decreasing ( for all ) sequence of open sets in a metric space such that for some . Suppose is a sequence of points in such that . Does necessarily converge to ? Prove or construct a counterexample.
Let be closed and let be a sequence in converging to . Suppose for infinitely many . Show .
Suppose is a sequence of open sets in such that for all . Let be a sequence such that and suppose converges to . Show that where .
Let be a metric space. A sequence in is a Cauchy sequence if for every , there exists an such that for all and all , we have
A convergent sequence in a metric space is Cauchy.
Suppose converges to . Given , there is an such that for all . Hence, for all . ∎
Let be a metric space. We say is complete or Cauchy-complete if every Cauchy sequence in converges to an .
The space with the standard metric is a complete metric space.
We assume the reader has seen the proof of completeness in , and we reduce the completeness in to the one-dimensional case.
Let be a Cauchy sequence in , where . Given , there exists an such that for all .
Fix some . For ,
Hence the sequence is Cauchy. As is complete, the sequence converges; there exists a such that . Write . By Proposition A.3.8, converges to , and hence is complete. ∎
A subset of with the subspace metric need not be complete. For example, with the subspace metric is not complete as is a Cauchy sequence in with no limit in . However, once we have one complete metric space, any closed subspace is also a complete metric space. After all, one way to think of a closed set is that it contains all points that can be reached from the set via a sequence. The proof is again an exercise.
Suppose is a complete metric space and is closed. Then is a complete metric space with the subspace topology.
Prove Proposition A.4.5.
Another very useful example of a complete metric space is the space of continuous functions on a closed interval with the uniform norm, . See Corollary B.1.8 in the next appendix.
Let be a metric space and . The set is said to be compact if for any collection of open sets such that
there exists a finite subset such that
A collection of open sets as above is said to be an open cover of . A way to say that is compact is to say that every open cover of has a finite subcover.
Let be the metric space with the standard metric.
The set is not compact. Proof: Take the sets . It is an open cover, but the union of a finite subset of these sets is just for some .
The set is also not compact. Proof: Take the sets for . As above , but the union of finitely many is just again and not all of .
The set is compact. Proof: Given any open cover , there must exist a such that as it is a cover, so gives a finite subcover.
We will prove below that , and in fact any closed and bounded interval is compact.
Let be a metric space and a finite subset of . Show that is compact.
Let .
Show that is not compact directly using the definition.
Show that is compact directly using the definition.
Show that the union of finitely many compact sets is a compact set.
Find an example where the union of infinitely many compact sets is not compact.
Let be a metric space. A compact set is closed and bounded.
Let be a compact set. Fix . We have the open cover
If is compact, then there exists some set of indices such that
So is bounded. See left-hand side of Figure A.9.
Next, we show that a set that is not closed is not compact. Suppose , that is, there is a point . We have the open cover
If we take any finite collection of indices , then
As is in the closure of , we have . So there is no finite subcover and is not compact. See right-hand side of Figure A.9. ∎
We prove below that in a finite-dimensional euclidean space, every closed bounded set is compact. So closed bounded sets of are examples of compact sets. It is not true that in every metric space, closed and bounded is equivalent to compact. A simple example is an incomplete metric space such as with the subspace metric from . There are many complete and very useful metric spaces where closed and bounded is not enough to give compactness: is a complete metric space, but the closed unit ball is not compact, see Exercise A.4.9. However, see also Exercise A.4.11. As this issue is such a common mistake, let me repeat it in italics: Closed and bounded is not the same as compact.
A useful property of compact sets in a metric space is that every sequence in the set has a convergent subsequence converging to a point in the set. Such sets are called sequentially compact. Let us prove that in the context of metric spaces, a set is compact if and only if it is sequentially compact. First we prove a lemma.
Let be a metric space and . Suppose every sequence in has a subsequence convergent in . Given an open cover of , there exists a such that for every , there exists a with .
We prove the lemma by contrapositive. If the conclusion is not true, then there is an open cover of with the following property. For every there exists an such that is not a subset of any . Take any . There is a such that . As is open, there is an such that . Take such that . If and , then
where follows by triangle inequality. See Figure A.10. Thus . In other words, for all , . The sequence cannot have a subsequence converging to . As was arbitrary we are done. ∎
It is important to recognize what the lemma says. It says that if is sequentially compact, then for any given cover, there is a single . The depends on the cover, but, of course, it does not depend on .
For example, let and for let define an open cover. Take . There is an , such that . If , then . If , then . So . If instead we take the open cover by , the best is .
Let be a metric space. Then is compact if and only if every sequence in has a subsequence converging to a point in .
Claim: Let be a subset of and a sequence in . Suppose that for each , there is a ball for some such that for only finitely many . Then is not compact.
Proof of the claim: Notice
Any finite collection of these balls contains at most finitely many elements of , and so there must be an not in their union. Therefore, is not compact and the claim is proved.
Suppose is compact and is a sequence in . Then there exists an such that for any , contains for infinitely many . The ball contains some , so let . Suppose is defined. There must exist an such that . Define . We now possess a subsequence . Since , Proposition A.3.5 says .
For the other direction, suppose every sequence in has a subsequence converging in . Take an open cover of . Using the Lebesgue covering lemma above, find a such that for every , there is a with .
Pick and find such that . If , we stop as we have found a finite subcover. Otherwise, there must be a point . Note that . There must exist some such that . We work inductively. Suppose is defined. Either is a finite cover of , in which case we stop, or there must be a point . Note that for all . Next, there must be some such that . See Figure A.11.
Either at some point we obtain a finite subcover of , or we obtain an infinite sequence as above. For contradiction, suppose that there is no finite subcover and we have the sequence . For all and , , we have , so no subsequence of can be Cauchy. Hence, no subsequence of can be convergent, which is a contradiction. ∎
The Bolzano–Weierstrass theorem for sequences of real numbers says that a bounded sequence in has a convergent subsequence. Therefore, any sequence in a closed interval has a convergent subsequence. The limit must also be in as limits preserve non-strict inequalities. Hence a closed bounded interval is compact.
Let be a metric space and let be compact. If is a closed set, then is compact.
Because is closed, is closed in if and only if it is closed in . See Proposition A.2.11. Let be a sequence in . It is also a sequence in . Therefore, it has a convergent subsequence that converges to some . As is closed, the limit of a sequence in is also in and so . Thus must be compact. ∎
A closed bounded subset is compact.
So subsets of are compact if and only if they are closed and bounded, a condition that is much easier to check. Let us reiterate that the Heine–Borel theorem only holds for and not for metric spaces in general. In general, compact implies closed and bounded, but not vice versa.
For if is closed and bounded, then any sequence in is bounded, so it has a convergent subsequence by the Bolzano–Weierstrass theorem. As is closed, the limit of the subsequence must be an element of . So is compact.
Let us carry out the proof for and leave arbitrary as an exercise. As is bounded, there exists a set such that . We will show that is compact. Then , being a closed subset of a compact , is also compact.
Let be a sequence in . That is, and for all . A bounded sequence of real numbers has a convergent subsequence, so there is a subsequence that is convergent. The subsequence is also a bounded sequence so there exists a subsequence that is convergent. A subsequence of a convergent sequence is still convergent, so is convergent. Let
By Proposition A.3.8, converges to . As and for all , we know that . ∎
Prove Theorem A.4.14 for arbitrary dimension. Hint: The trick is to use the correct notation.
Suppose is a metric space and , , …, are nonempty compact subsets of such that . Then
Suppose are as in the statement except we do not assume they are nonempty. Compact sets are closed, so their complement is open. Consider . Suppose that the intersection is empty. Then is an open cover of , which is compact, and hence there is a finite subcover. As the sets are nested, for all , we have for some . Thus is empty. ∎
Let be a metric space with the discrete metric, that is, if . Suppose is an infinite set. Then:
is a complete metric space.
Any subset is closed and bounded.
A subset is compact if and only if it is a finite set.
The conclusion of the Lebesgue covering lemma is always satisfied with any , even for noncompact .
The proofs of the statements are either trivial or are relegated to the exercises below.
A subtle point about Cauchy sequences, completeness, compactness, and convergence is that compactness and convergence only depend on the topology, that is, on which sets are the open sets. On the other hand, Cauchy sequences and completeness depend on the actual metric.
Let be a metric space with the discrete metric.
Prove that is complete.
Prove that is compact if and only if is a finite set.
Show that a compact set (in any metric space) is itself a complete metric space (using the subspace metric).
Show that there exists a metric on that makes into a compact set.
Let be the metric space of Example A.1.6. Let denote the zero function. Show that the closed ball is not compact (even though it is closed and bounded). Hint: Construct continuous functions such that and for all .
Let be the metric space of Example A.1.6. Let be the set of such that is equal to a quadratic polynomial, i.e., , and such that for all , that is . Show that is compact.
Let be a complete metric space. Show that is compact if and only if is closed and such that for every there exists a finite set of points with . Note: Such a set is said to be totally bounded, so in a complete metric space a set is compact if and only if it is closed and totally bounded.
Take using the standard metric. Find an open cover of such that the conclusion of the Lebesgue covering lemma does not hold.
Prove the general Bolzano–Weierstrass theorem: Any bounded sequence in has a convergent subsequence.
Let be a metric space and the set of nonempty compact subsets of . Using the Hausdorff metric from Exercise A.1.5, show that is a metric space. That is, show that if and are nonempty compact subsets, then if and only if .
Let be an incomplete metric space. Show that there exists a closed and bounded set that is not compact.
Let be a metric space and . Prove that is compact as a subset of if and only if is compact as a subset of itself with the subspace metric.
Let be a complete metric space. We say a set is relatively compact if the closure is compact. Prove that is relatively compact if and only if given any sequence in , there exists a subsequence that converges (in ).
Let and be metric spaces and . Then is continuous at if for every there is a such that whenever and , then .
If is continuous at all , then we say that is a continuous function.
Let and be metric spaces. Then is continuous at if and only if for every sequence in converging to , the sequence converges to .
Suppose is continuous at . Let be a sequence in converging to . Given , there is a such that implies . So take such that for all , we have , and then . Hence converges to .
Now suppose is not continuous at . Then there exists an , such that for every there is an , with such that . So converges to , but does not converge to . ∎
Suppose is a polynomial. That is,
for some (the degree) and . Then we claim is continuous. Let be a sequence in that converges to . Therefore, and . Then
So is continuous at , and as was arbitrary, is continuous everywhere. Similarly, a polynomial in variables is continuous.
Be careful about taking limits separately. It is not enough that for every , the function is continuous, and for every , the function is continuous. The function could still be discontinuous.
Let be defined by , and if . See Figure A.12.
Show that for each fixed , the function that takes to is continuous. Similarly for each fixed , the function that takes to is continuous.
Show that is not continuous.
Consider on a metric space . Write , where and are the real and imaginary parts. Then is continuous at if and only if its real and imaginary parts are continuous at . This fact follows because converges to if and only if converges to and converges to .
Let be a metric space.
If , then defined by is continuous.
Given a nonempty set , the function
is continuous.
The reverse triangle inequality gives part (i).
For (ii), being nonempty implies that is real-valued. Take and assume without loss of generality that . For any , there exists a such that . Using this inequality together with and the reverse triangle inequality gives
Since the inequality holds for every , is continuous. ∎
Take the metric space of continuous functions . Let be a continuous function. Given define
Show that defines a function .
Show that is continuous.
Let be a metric space. Define a metric on as in Exercise A.1.3 part b, and show that defined by is continuous.
Let be the set of continuous functions and the set of once continuously differentiable functions on . Define
where is the uniform norm. By Example A.1.6 and Exercise A.1.8, with is a metric space and so is with .
Prove that the derivative operator defined by is continuous.
On the other hand, if we consider the metric on , then prove the derivative operator is no longer continuous. Hint: Consider .
Define
Show that for every fixed the function that takes to is continuous and hence Riemann integrable.
For every fixed , the function that takes to is continuous.
Show that is not continuous at .
Now show that is not continuous at .
Note: Feel free to use what you know about from calculus, in particular that .
Continuous maps do not map closed sets to closed sets. For example, defined by takes the set , which is closed in , to the set , which is not closed in . On the other hand, continuous maps do preserve compact sets.
Let and be metric spaces and a continuous function. If is a compact set, then is a compact set.
Write a sequence in as , where is a sequence in . The set is compact, so there is a subsequence that converges to some . By continuity,
So every sequence in has a subsequence convergent to a point in , and is compact by Theorem A.4.11. ∎
As before, achieves an absolute minimum at if
On the other hand, achieves an absolute maximum at if
Let be a nonempty compact metric space and continuous. Then achieves an absolute minimum and maximum on . In particular, is bounded.
As is compact and is continuous, is compact. Hence is closed and bounded. In particular, and , because both the sup and the inf can be achieved by sequences in and is closed. Therefore, there is some such that and some such that . ∎
Let be a metric space. Use Exercise A.5.3 to prove that if and are compact subsets of , then there exists a and such that is minimal, that is, .
Let be a compact metric space, let be the set of real-valued continuous functions. Define
Show that makes into a metric space.
Show that for each , the evaluation function defined by is a continuous function.
Let us see how to define continuity in terms of the topology, that is, the open sets. We have already seen that topology determines which sequences converge, and so it is no wonder that the topology also determines continuity of functions.
Let and be metric spaces. A function is continuous at if and only if for every open neighborhood of in , the set contains an open neighborhood of in . See Figure A.13.
In other words, is a not-necessarily-open neighborhood of .
First suppose that is continuous at . Let be an open neighborhood of in , then for some . By continuity of , there exists a such that whenever is such that , then . In other words,
and is an open neighborhood of .
For the other direction, let be given. If contains an open neighborhood of , it contains a ball. That is, there is some such that
That means precisely that if then , and so is continuous at . ∎
Let and be metric spaces. A function is continuous if and only if for every open , is open in .
The proof follows from Lemma A.5.8 and is left as an exercise.
Prove Theorem A.5.9. Hint: Use Lemma A.5.8.
Let be a continuous function. Theorem A.5.9 tells us that if is closed, then is also closed. Therefore, given a continuous , the zero set of , that is, , is closed.
The set where is nonnegative, that is, , is closed. On the other hand, the set where is positive, , is open.
Consider with the standard metric. Let be a metric space and a continuous function.
Prove that if is connected, then is constant (the range of is a single value).
Find an example where is disconnected and is not constant.
Suppose , are metric spaces and is continuous. Let .
Show that .
Show that the subset can be proper.
Suppose is continuous for metric spaces and . Show that if is connected, then is connected.
Prove the following version of the intermediate value theorem. Let be a connected metric space and a continuous function. Suppose that there exist and such that . Then prove that there exists a such that . Hint: See Exercise A.5.11.
Let and be metric spaces and be a one-to-one and onto continuous function. Suppose is compact. Prove that the inverse is continuous.
As for continuous functions on the real line, in the definition of continuity it is sometimes convenient to be able to pick one for all points.
Let and be metric spaces. Then is uniformly continuous if for every there is a such that whenever and , then .
A uniformly continuous function is continuous, but not necessarily vice versa. It is “vice versa” if is compact.
Let and be metric spaces. Suppose is continuous and is compact. Then is uniformly continuous.
Let be given. For each , pick such that whenever . The balls cover , and the space is compact. Apply the Lebesgue covering lemma to obtain a such that for every , there is a for which .
If where , find a such that . Then . By the triangle inequality and the definition of ,
Useful examples of uniformly continuous functions are the so-called Lipschitz continuous functions. That is, if and are metric spaces, then is called Lipschitz or -Lipschitz if there exists a such that
A Lipschitz function is uniformly continuous: Take . A function can be uniformly continuous but not Lipschitz: on is uniformly continuous but not Lipschitz (exercise).
It is worth mentioning that, if a function is Lipschitz, it tends to be easiest to simply show it is Lipschitz even if we are only interested in knowing continuity (or uniform continuity).
Show that is uniformly continuous on but not Lipschitz.
Show that for some defined by is Lipschitz continuous.
Show that defined by is not Lipschitz continuous nor uniformly continuous.
Suppose is a differentiable function such that is a bounded function. Prove is a Lipschitz continuous function.
Prove that the map defined in Exercise A.5.2 is Lipschitz continuous.
Let be a polynomial of degree . Show that is not Lipschitz continuous.
Let be a metric space and . A point is called a cluster point of if for every , the set is not empty.
Let , be metric spaces, , a cluster point of , and a function. Suppose there exists an and for every , there exists a such that whenever and , then
Then converges to as goes to , and is the limit of as goes to . We write
If does not converge as goes to , we say diverges at .
We again used the definite article without showing that the limit is unique. We leave the proof of uniqueness as an exercise.
Let and be metric spaces, , a cluster point of , and let be a function such that converges as goes to . Then the limit of as goes to is unique.
Prove Proposition A.5.16.
In a metric space, continuous limits may be replaced by sequential limits. We leave the proof as an exercise. The upshot is that we really only need to prove things for sequential limits.
Let and be metric spaces, , a cluster point of , and let be a function.
Then converges to as goes to if and only if for every sequence in such that , the sequence converges to .
Prove Lemma A.5.17.
By applying Proposition A.5.2 or the definition directly we find (exercise) that for cluster points of , the function is continuous at if and only if
Let be a metric space, , and . Prove that is a cluster point of if and only if .
Let and be metric spaces, , a cluster point of , and let be a function. Prove that is continuous at if and only if .