You are on page 1of 4

Solutions to Homework 2

1. Let X, Y , and Z be metric spaces, with metrics dX , dY , and dZ . Let


f : X → Y be continuous at a point p ∈ X, and let g : Y → Z be
continuous at f (p). Show that g ◦ f is continuous at p.
Solution: Let  > 0 be given. Because g is continuous at f (p), there
is an η > 0 such that dY (f (p), r) < η implies dZ (g(f (p)), g(r)) <  for
all r ∈ Y , and in particular for all r of the form g(q) for some q ∈ X.
Because f is continuous at p, there is a δ > 0 such that dX (p, q) < δ
implies dY (f (p), f (q)) < η for all q ∈ X. Thus dX (p, q) < δ implies
dZ (g(f (p)), g(f (q))) <  for all q ∈ X.
2. Let X be any set, and let dX be the discrete metric
(
0 if p = q, or
dX (p, q) =
1 if p 6= q.
(a) Show that this is a metric.
Solution: Clearly d is symmetric, d(p, p) = 0, and d(p, q) > 0 if
p 6= q. It remains to check the triangle inequality:
d(p, r) ≤ d(p, q) + d(q, r)
for all p, q, r ∈ X. We could analyze a series of cases (p = q = r,
or p = q 6= r, etc.) and see that the triangle inequality holds
in each case. Or we could ask, how could the triangle inequality
fail, knowing that all distances appearing in it are either 0 or 1?
Only if the left-hand side is 1 and the right-hand side is 0. But
if the right-hand side is 0 then d(p, q) = d(q, r) = 0, so p = q and
q = r, so p = r, so the left-hand side is 0, not 1.
(b) Let (Y, dY ) be another metric space (not necessarily discrete).
Show that every map f : X → Y is continuous.
Solution: Let p ∈ X and  > 0 be given, and let δ = 12 . If
dX (p, q) < δ = 12 then dX (p, q) = 0, so p = q, so dY (f (p), f (q)) =
0 < .

1
4. Let X = Q with the usual metric inherited from R. Show that the set

A = {x ∈ Q : x2 < 1}

is open but not closed, but that the set

B = {x ∈ Q : x2 < 2}

is both open and closed. (You can use the fact that 2 is irrational
without proving it.)
Solution: Notice that we can also describe A as

A = {x ∈ Q : |x| < 1}.

To see that A is open, let a ∈ A, and take  = 1 − |a| > 0; then for all
x ∈ Q, if |x − a| <  then

|x| ≤ |x − a| + |a| <  + |a| = 1,

so x ∈ A. To see that A is not closed, consider the sequence xn = 1− n1 ,


which stays in A but converges to 1 which is not in A.

We can also describe B as

B = {x ∈ Q : x2 ≤ 2},

because there is no x ∈ Q with x2 = 2. Thus we can describe it either


as √
B = {x ∈ Q : |x| < 2},
or as √
B = {x ∈ Q : |x| ≤ 2}.

To see that B is open, let a ∈ A, take  = 2−|a|, and argue as before.
To see √
that B is closed, let xn be a sequence of rational numbers with
|xn | ≤ 2, converging to a limit `. We have

|`| ≤ |` − xn | + |xn | ≤ |` − xn | + 2

√ is an n such that√|` − xn | < , so the


for all n. For every  > 0 there
√ side is less that 2 + : that is, |`| < 2 +  for all  > 0,
right-hand
so |`| ≤ 2.

3

Alternatively, we could show that Q \ B, which
√ is {x ∈ Q : |x| > 2},
is open. Let x ∈ Q \ B, and let  = |x| − 2. Then for all y ∈ Q we
have
|x| ≤ |x − y| + |y|,
so
|y| ≥ |x| − |x − y|,
so if |x − y| <  then
√ √
|y| > |x| − (|x| − 2. 2) =
√ √
Or you might prefer to consider two cases, x > 2 and x < − 2.

5. Optional: Let
W = {1, 12 , 13 , 14 , . . . , 0}
with the usual metric inherited from R. Let X be another metric
space. Given a sequence p1 , p2 , . . . ∈ X and a point ` ∈ X, show that
the function f : W → X defined by
(
f ( n1 ) = pn ,
f (0) = `

is continuous if and only if pn → `.


Solution: First suppose that f is continuous. The sequence n1 con-
verges to 0 in W , so by Homework 1, Problem 3 we see that the
sequence f ( n1 ) = pn converges to f (0) = `.
Conversely, suppose that pn → `. We want to show that f is contin-
uous at every w ∈ W . There are two cases: either w = n1 , or w = 0.
Let  > 0 be given.
If w = n1 , let δ = n1 − n+1
1 1
= n(n+1) . If w0 ∈ W satisfies d(w, w0 ) < δ,
then w0 = w, so d(f (w), f (w0 )) = 0 < .
If w = 0, choose N such that d(pn , `) <  for all n > N , and let
δ = 1/N . If w0 ∈ W satisfies d(w, w0 ) < δ = 1/N , then either
w0 = 0, so d(f (w), f (w0 )) = 0 < , or w0 = 1/n for some n > N ,
so d(f (w), f (w0 )) = d(`, pn ) < .

You might also like