Chapter 23
Chapter 23
...
...
...
...
...
...
...
...
...
...
...
Metric Spaces
...
...
...
C H A P T E R .
283
284 23. Metric Spaces
|x − y| ≤ |x − z | + |z − y|.
In English, this means that our path will be shorter if we go
directly from x to y as opposed to taking a detour through z, which
is as it should be. So we would want our general distance function
to satisfy something like this too; that is, in our new “d” notation we
want d(x, y) ≤ d(x, z) + d(z, y) for arbitrary points x, y, and z. So now
we will define something that acts like a distance on an arbitrary set
X and does all the important things that a distance should do.
Let X be a nonempty set. Then a metric on X is a function
d : X × X → R satisfying (i)–(iv) below.
Example 23.1.
Define a metric dd : R × R → R by
0 if x y
dd (x, y) .
1 if x
y
Proof.
It is clear that dd is a function from R × R → R. Now let x and
y be points of R. We begin with nonnegativity: dd (x, y) 0 or
dd (x, y) 1, so clearly dd (x, y) ≥ 0. Thus, the nonnegativity con-
dition holds. Furthermore, since dd (x, y) 0 if and only if x y,
the definiteness condition holds. For symmetry, note that if x
y,
then y
x and consequently dd (x, y) 1 dd (y, x). If x y, then
dd (x, y) 0 dd (y, x), establishing symmetry. Finally, to establish
the triangle inequality, note that if z is a point of R, then we have two
cases to consider. In the first case, if x y, then dd (x, y) 0 and the
nonnegativity condition implies that dd (x, y) 0 ≤ dd (x, z) + dd (z, y).
In the second case, x
y, which implies that z
x or z
y (or
both). Therefore, either dd (x, z) 1 or dd (z, y) 1 (or both). Thus,
dd (x, y) 1 ≤ dd (x, z) + dd (z, y), completing the proof of the triangle
inequality.
Example 23.2.
On R2 define a metric by
du ((x1 , x2 ), (y1 , y2 )) (x1 − y1 )2 + (x2 − y2 )2 .
Exercise 23.3.
We now have two examples of metrics on R and two on R2 . Here are
two more metrics on R2 . Before you begin the exercise, familiarize
yourself with the metrics by computing various distances. For exam-
ple, try to find the distance from the point (1, 3) to the points (−3, 4)
using the various metrics below.
(a) Show that dtc ((x1 , x2 ), (y1 , y2 )) |x1 − y1 | + |x2 − y2 | is a metric
on R2 . This metric, dtc , is called the taxicab metric. Why would
it be called that?
(b) Show that dm ((x1 , x2 ), (y1 , y2 )) max{|x1 − y1 |, |x2 − y2 |} is also
a metric on R2 . The metric dm is sometimes called the max
metric.
number L such that for every > 0, there exists a real number
N such that |xn − L| < for all n ≥ N.” We return to the idea of
finding the limit of a sequence, but this time in a metric space. So
given a sequence (xn ) of points in a metric space (X, d), then (as
we did before) we say that (xn ) converges in X if there exists a
point x ∈ X such that for every > 0, there exists a real number N
such that d(xn , x) < for all n ≥ N. The value x is called the limit
of the sequence, we say that the sequence converges to x and, as
before, we write xn → x or limn→∞ xn x. If the sequence does
not converge, we say that it diverges. If we consider X R with
the usual metric, this is exactly the same definition that we had in
Chapter 19. Since we allow all sorts of choices for X now, we would
like to take this opportunity to point out that the point x must be in
the space X—not in some larger space that happens to contain X. If
it is clear that x belongs to X, we will often say that the sequence
converges, rather than “the sequence converges in X.” Also, note
that as the metric d changes, the distance between pairs of points
changes as well. Therefore, it is conceivable that some sequences
will converge in one metric, but not in another.
Exercise 23.4.
Complete the sentences.
(a) Let (xn ) be a sequence in a metric space X with metric d. Let
x ∈ X. Then (xn ) does not converge to x if . . . .
(b) Let (xn ) be a sequence in a metric space (X, d). Then (xn ) does
not converge if . . . .
We’ll break tradition and give you the answer to part (a) of the
above exercise here, because we need it: A sequence (xn ) does not
converge to x if there exists an > 0 such that for every real number
N, there exists m ∈ N such that m ≥ N and d(xm , x) ≥ . While an
answer to (b) might read “a sequence (xn ) does not converge if for
every x ∈ X, the sequence does not converge to x,” this will probably
not be the most useful formulation of the answer. We leave the more
useful version to you.
2 8 8 23. Metric Spaces
Example 23.5.
We know that 1/n > 0 in R with the usual metric. Show that
(1/n, 1/n) (0, 0) in R2 with the usual metric.
Proof.
Let e > 0, and let N be a real number with N > \[2/e. If n is an
integer with n N, then
du((1/n, 1/n), (0, 0)) = (1/n 0)2 + (1/n 0)2
Example 23.6.
In Chapter 19, we showed that the sequence (1/n) converges to 0
in R with the usual metric. Does (1/n) converge to 0 in the discrete
metric?
R2
We claim that the sequence (in R with the discrete metric) does
not converge to 0. To see this, let 1/2. For every N ∈ R, there
exists an integer n ≥ N. Since 1/n
0, we know that dd (1/n, 0) 1.
Hence for 1/2, and for every N ∈ R, there exists an integer
n ≥ N such that xn 1/n satisfies dd (xn , 0) dd (1/n, 0) 1 ≥ 1/2.
Thus (1/n) does not converge to 0.
In the discrete metric, every point is “far” from every other point.
This makes it very hard to converge.
Exercise 23.7.
Consider R with the discrete metric. Describe the convergent
sequences in this metric space.
Theorem 23.8.
If a sequence (xn ) in a metric space (X, d) converges, then the limit is
unique.
Solutions to Exercises
Solution to Exercise (23.3).
Parts (a) and (b) are very similar, so we will work part (a) only.
By definition dtc is a function from R × R to R. Now let (x1 , x2 )
and (y1 , y2 ) be elements of R2 . We will first show the nonneg-
ativity. Because |a| ≥ 0 for all real numbers a, we know that
dtc ((x1 , x2 ), (y1 , y2 )) |x1 − y1 | + |x2 − y2 | ≥ 0, showing that
nonnegativity of dtc holds. For definiteness, we point out that
dtc ((x1 , x2 ), (y1 , y2 )) 0 if and only if |x1 − y1 | + |x2 − y2 | 0. This
last equality holds if and only if |x1 − y1 | 0 and |x2 − y2 | 0.
290 23. Metric Spaces
To prove that the triangle inequality holds for dtc , let (z1 , z2 ) ∈ R2 .
Then
Problems
Unless otherwise specified, assume that you are working in a general
metric space (X, d).
Problem 23.1.
(a) Suppose a student writes the following: A metric is a function
satisfying (i)–(iv) below.
(i) (Nonnegativity) d(x, y) ≥ 0,
(ii) (Definiteness) d(x, y) 0, if and only if x y,
(iii) (Symmetry) d(x, y) d(y, x), and
(iv) (Triangle inequality) if z is a point in X, then
Problem 23.2.
(a) In R, find the distance of the number 1 to the number 3 in the
usual metric and in the discrete metric.
(b) In R2 , find the distance of the point (1, 3) to the point (2, 5) in
the usual metric, the taxicab metric, the max metric, and the
discrete metric.
292 23. Metric Spaces
Problem 23.3.
(a) Sketch the set {(x, y) ∈ R2 : du ((x, y), (0, 0)) < 1}, where du is
the usual metric.
(b) Sketch the set {(x, y) ∈ R2 : dtc ((x, y), (0, 0)) < 1}, where dtc is
the taxicab metric.
(c) Sketch the set {(x, y) ∈ R2 : dm ((x, y), (0, 0)) < 1}, where dm is
the max metric.
(d) Sketch the set {(x, y) ∈ R2 : dd ((x, y), (0, 0)) < 1}, where dd is
the discrete metric.
(e) Sketch the set {(x, y, z) ∈ R3 : du ((x, y, z), (0, 0, 0)) < 1}, where
du is the usual metric. (See Example 23.2 for the definition if
you need it.)
Problem 23.4.
(a) We defined the max metric on R2 . Define the max metric on
Rn and prove that it is a metric.
(b) We defined the taxicab metric on R2 . Define the taxicab
metric on Rn and prove that it is a metric.
Problem 23.5.
(a) Show that d : R × R → R defined by
d((x1 , x2 ), (y1 , y2 )) |x1 − y1 |
is not a metric on R2 .
(b) Is d : R × R → R defined by
d((x1 , x2 ), (y1 , y2 )) (x1 − y1 )2 + (x2 − y2 )2
a metric on R2 ?
Problem 23.6.
Let (X, d) be a metric space. Let α be a real number and define a
new function dα on X × X by dα (x, y) αd(x, y). Is dα a metric on
X? If not, what assumptions must be placed on α to assure that dα is
a metric? Prove your answer.
Problem 23.7.
A set F in a metric space (X, d) is bounded if there exists a positive
number M such that d(x, y) ≤ M for all x, y ∈ F.
23. Metric Spaces 293
Problem 23.8.
Let X be a set with a metric d. Define a function db : X × X → R by
Problem 23.9.
Show that in a metric space (X, d) the metric satisfies
for all x, y, z ∈ X.
Problem 23.10.
Let X be the space of polynomials with real coefficients. Define a
function d from X × X → R by d(p, q) |p(0) − q(0)|. Is d a metric?
If so, prove it. If not, why not?
Problem 23.11.
The following exercise is only appropriate if you have had integration in
calculus.
2 9 4 23. Metric Spaces
=fJo
for all f,g X.
(a) Show that d is a metric.
(b) Find the distance between ex and sin(πx/2).
Problem 23.12.
Choose a fixed point X0 in R2. If du denotes the usual (or Euclidean)
metric on R , then we define d : R × R2
I
2 2
R by
du(x, y) if x and y are on a straight
line through x0
du(x, X0) + du(x0, y) otherwise.
Figure 23.2 illustrates this function for three pairs of points in the
plane. Prove that d is a metric on R2.
This metric is sometimes called the "French railway system met-
ric." (See [39, p. 56].) Why? Think of x0 as Paris, and you'll note that
all trains pass through Paris, whether they need to or not.
Problem 23.13.
Prove each of the following.
(a) Consider R2 with the max metric. Prove that (1/n, 2/n) >
(0,0).
(b) Consider R with the usual metric. Prove that ( 1) n n/(3n+1) •
0.
x3
(c) Consider R2 with the max metric. Does ((−1)n , 2/n)) converge
in this space?
Problem 23.14.
Consider Z with the usual metric.
(a) Show that a sequence that is eventually constant converges;
that is, if there exists an integer m such that xn xk for all
n, k ≥ m, then the sequence converges.
(b) Can you give other examples of convergent sequences in
(Z, du )? Explain your answer.
Problem 23.15.
Let (X, d) be a metric space, and let (xn ) be a convergent sequence
in X.
(a) Prove that there exists x ∈ X and a natural number K such that
d(xn , x) ≤ K for all n ∈ N.
(You should know a similar problem.)
(b) Prove that the set {xn : n ∈ N} is bounded, as defined in Problem
23.7; that is, prove that there exists a positive number M such
that d(xn , xm ) ≤ M for all n, m ∈ N.
Problem 23.16.
In Problem 19.14, part (c), we defined the term Cauchy sequence
and proved some facts about such sequences. This problem asks you
to do the same in a general metric space.
(a) Define Cauchy sequence in a metric space (X, d).
(b) Prove that if (xn ) converges in (X, d), then (xn ) is Cauchy.
Problem 23.17.
(This problem uses Problem 23.16.) Let X R \ Q with√the usual
metric du . Prove that the sequence (xn ), where xn 2/n, is a
Cauchy sequence in X, but (xn ) does not converge in X.