Homework 3 – Math 118A, Fall 2020∗
Due on Thursday, October 22nd, 2020
Carlos J. García-Cervera
Update: October 15, 2020
1. Show that the following function defines a metric in R2:
d(x,y) =
{ √
(x1 − y1)2 + (x2 − y2)2, x2 · y2 ≥ 0,√
x21 + x
2
2 +

y21 + y
2
2, x2 · y2 < 0.
(1)
for any x,y ∈ R2.
2. Determine whether the following function is a metric in the set R+ of positive real
numbers, and if so, determine what a ball is in this metric:
d(x, y) =
∣∣∣ log(x
y
) ∣∣∣, x, y > 0. (2)
3. Let (X, d) be a metric space, and A ⊆ X . Define the distance from x to A by
d(x,A) = inf {d(x, y) : y ∈ A} . (3)
(a). Prove that ∣∣∣∣d(x,A)− d(y,A)∣∣∣∣ ≤ d(x, y) ∀x, y ∈ X.
∗All course materials (class lectures and discussions, handouts, homework assignments, examinations,
web materials, etc) and the intellectual content of the course itself are protected by United States Federal
Copyright Law, and the California Civil Code. The UC Policy 102.23 expressly prohibits students (and all
other persons) from recording lectures or discussions and from distributing or selling lecture notes and all
other course materials without the prior written permission of the instructor.
(b). Prove that d(x,A) = 0 if and only if x ∈ A.
4. Let A1, A2, A3, . . . be subsets of a metric space.
(a). If Bn = ∪ni=1Ai, prove that Bn = ∪ni=1Ai.
(b). If B = ∪∞i=1Ai, prove that B ⊇ ∪∞i=1Ai.
Give an example for which (b) above is strict.
5. Remember that

E denotes the set of interior points of a set E:
(a). Prove that the complement of

E is the closure of the complement of E:( ◦
E
)c
= Ec. (4)
(b). Do E and E always have the same interiors? Prove or give a counterexample.
(c). Do E and

E always have the same closures? Prove or give a counterexample.
2  Email:51zuoyejun

@gmail.com