92 CHAPTER 3. METRIC SPACES

≤ d (x,z)− (d (y,z)− ε)≤ d (x,y)+d (y,z)−d (y,z)+ ε = d (x,y)+ ε

Since ε is arbitrary, |dist(x,S)−dist(y,S)| ≤ d (x,y). The situation is completely similarif dist(x,S)< dist(y,S) . ■

Then this shows that x→ dist(x,S) is a continuous real valued function.This is about partitions of unity in metric space. Assume here that closed balls are

compact. For example, you might be considering Rp with d (x,y)≡ |x−y|.

Definition 3.12.2 Define spt( f ) (support of f ) to be the closure of the set {x :f (x) ̸= 0}. If V is an open set, Cc(V ) will be the set of continuous functions f , definedon Ω having spt( f )⊆V .

Definition 3.12.3 If K is a compact subset of an open set, V , then K ≺ φ ≺ V ifφ ∈Cc(V ), φ(K) = {1}, φ(Ω) ⊆ [0,1],where Ω denotes the whole metric space. Also forφ ∈Cc(Ω), K ≺ φ if φ(Ω)⊆ [0,1] and φ(K) = 1. φ ≺V if φ(Ω)⊆ [0,1] and spt(φ)⊆V.

Lemma 3.12.4 Let (Ω,d) be a metric space in which closed balls are compact. Then ifK is a compact subset of an open set V, then there exists φ such that K ≺ φ ≺V.

Proof: Since K is compact, the distance between K and VC is positive, δ > 0. Other-wise there would be xn ∈ K and yn ∈VC with d (xn,yn)< 1/n. Taking a subsequence, stilldenoted with n, we can assume xn→ x and yn→ x but this would imply x is in both K andVC which is not possible. Now consider {B(x,δ/2)} for x ∈ K. This is an open cover andthe closure of each ball is contained in V . Since K is compact, finitely many of these ballscover K. Denote their union as W . Then W is compact because it is the finite union of theclosed balls. Hence K ⊆W ⊆W ⊆V . Now consider

φ (x)≡dist(x,WC

)dist(x,K)+dist(x,WC)

the denominator is never zero because x cannot be in both K and WC. Thus φ is continuousby Lemma 3.12.1. also if x ∈ K, then φ (x) = 1 and if x /∈W, then φ (x) = 0. ■

Theorem 3.12.5 (Partition of unity) Let K be a compact subset of a metric spacein which closed balls are compact and suppose K ⊆V = ∪n

i=1Vi, Vi open. Then there existψ i ≺Vi with ∑

ni=1 ψ i(x) = 1 for all x ∈ K.

Proof: Let K1 = K \∪ni=2Vi. Thus K1 is compact and K1 ⊆ V1. Let K1 ⊆W1 ⊆W 1 ⊆

V1 with W 1compact. To obtain W1, use Lemma 3.12.4 to get f such that K1 ≺ f ≺V1 and letW1≡{x : f (x) ̸= 0} .Thus W1,V2, · · ·Vn covers K and W 1⊆V1. Let K2 =K \(∪n

i=3Vi∪W1).Then K2 is compact and K2 ⊆ V2. Let K2 ⊆W2 ⊆W 2 ⊆ V2 W 2 compact. Continue thisway finally obtaining W1, · · · ,Wn, K ⊆W1 ∪ ·· · ∪Wn, and W i ⊆ Vi W i compact. Now letW i ⊆Ui ⊆U i ⊆Vi, U i compact.

Wi Ui Vi