Key idea of this section
For non-empty compact A, B ⊂ X:
h(A, B) = max{ supa∈A d(a, B), supb∈B d(b, A) }
If (X, d) is complete, then (𝒦(X), h) is complete.Fractals are sets, and to speak of a sequence of sets converging to a fractal — the stages of the Koch construction converging to the Koch curve, say — we need a topology on a space of sets. The right choice for compact sets is the Hausdorff metric, introduced by Hausdorff in his Grundzüge der Mengenlehre (1914).
Distance from a point to a set
Let (X, d) be a metric space. For x ∈ X and a non-empty set A ⊂ X, put d(x, A) = inf{d(x, a) : a ∈ A}. The function x ↦ d(x, A) is 1-Lipschitz: for any a ∈ A, d(x, a) ≤ d(x, y) + d(y, a), and taking the infimum over a gives d(x, A) ≤ d(x, y) + d(y, A). If A is compact the infimum is attained.
For ε > 0 define the closed ε-neighbourhood of A as
Aε = { x ∈ X : d(x, A) ≤ ε }
Definition of the Hausdorff metric
Let 𝒦(X) be the collection of non-empty compact subsets of X. For A, B ∈ 𝒦(X) define
h(A, B) = max{ supa∈A d(a, B), supb∈B d(b, A) }
= inf{ ε ≥ 0 : A ⊂ Bε and B ⊂ Aε }
The two expressions agree: A ⊂ Bε says exactly that supa∈A d(a, B) ≤ ε, and since both suprema are attained on compact sets, the infimum in the second line is attained and equals the maximum in the first.
Theorem 1.1. h is a metric on 𝒦(X).
Proof. Finiteness: a compact set is bounded and d(·, B) is continuous, so the suprema are finite. Symmetry is built into the definition. If h(A, B) = 0 then every a ∈ A has d(a, B) = 0, so a lies in the closure of B, which is B itself; hence A ⊂ B, and by symmetry A = B. For the triangle inequality, let A, B, C ∈ 𝒦(X) and a ∈ A. For every c ∈ C we have d(a, B) ≤ d(a, c) + d(c, B) ≤ d(a, c) + h(C, B). Taking the infimum over c, d(a, B) ≤ d(a, C) + h(C, B) ≤ h(A, C) + h(C, B). The same bound holds for d(b, A) with b ∈ B, so h(A, B) ≤ h(A, C) + h(C, B). ∎
Two warnings. The Hausdorff metric is not a measure of how much the sets overlap: h({0}, [0, 1]) = 1 although {0} ⊂ [0, 1]. And it is not continuous with respect to Lebesgue measure: the finite sets Pₙ = {k/n : 0 ≤ k ≤ n} have measure zero but h(Pₙ, [0, 1]) = 1/(2n) → 0. Fractal approximations behave in exactly this way: the stages of a construction may have positive area while the limit has none.
Worked example. Let A = [0, 1] and B = [0, 3] in ℝ. Every point of A lies in B, so supa∈A d(a, B) = 0. The point of B farthest from A is 3, at distance 2. Hence h(A, B) = 2. More generally, for intervals h([a, b], [c, d]) = max{|a − c|, |b − d|}, because the distance from a point to an interval is a convex function of the point and is therefore maximised at an endpoint.
Completeness
Theorem 1.2. If (X, d) is complete, then (𝒦(X), h) is complete. If X is compact, then 𝒦(X) is compact.
Proof. Let (Aₙ) be Cauchy in 𝒦(X). Define A to be the set of points x ∈ X for which there exist n₁ < n₂ < ⋯ and points xk ∈ Ank with xk → x. (Equivalently, A = ⋂ₙ closure(⋃m≥n Am).) We show A is non-empty, compact, and that h(Aₙ, A) → 0.
Fix ε > 0 and choose N₁ < N₂ < ⋯ such that h(Am, Aₙ) < ε 2−j for m, n ≥ Nj; put N = N₁. Starting from any y₁ ∈ AN₁, pick yj+1 ∈ ANj+1 with d(yj, yj+1) < ε 2−j; this is possible because d(yj, ANj+1) ≤ h(ANj, ANj+1). The sequence (yj) is Cauchy, so it converges to some y ∈ A, and d(y₁, y) < ∑ ε 2−j = ε. This shows A is non-empty and, since y₁ ∈ AN was arbitrary (and the argument works from any n ≥ N), every point of Aₙ (n ≥ N) is within ε of A.
Conversely, if x ∈ A then x is a limit of points xk ∈ Ank; for n ≥ N and nk ≥ N large, d(x, Aₙ) ≤ d(x, xk) + h(Ank, Aₙ) < 2ε eventually. So h(Aₙ, A) ≤ 2ε for all n ≥ N.
Finally A is closed by construction (it is an intersection of closed sets) and totally bounded: a finite ε-net of AN, which exists because AN is compact, is a 3ε-net of A. A closed totally bounded subset of a complete space is compact. For the second statement, if X is compact then it is totally bounded, and the finite subsets of a finite ε-net of X form a finite ε-net of 𝒦(X) in h; so 𝒦(X) is complete and totally bounded, hence compact. ∎
The second half of Theorem 1.2 is the Blaschke selection theorem in its general form: every sequence of non-empty compact subsets of a compact metric space has a subsequence converging in the Hausdorff metric.
Two useful inequalities
Lemma 1.3. For A, B, C, D ∈ 𝒦(X), h(A ∪ B, C ∪ D) ≤ max{h(A, C), h(B, D)}.
Proof. If ε ≥ max{h(A, C), h(B, D)} then A ⊂ Cε ⊂ (C ∪ D)ε and B ⊂ Dε ⊂ (C ∪ D)ε; symmetrically C ∪ D ⊂ (A ∪ B)ε. ∎
Lemma 1.4. If f : X → X is Lipschitz with constant L, then h(f(A), f(B)) ≤ L·h(A, B).
Proof. If a ∈ A and b ∈ B with d(a, b) = d(a, B), then d(f(a), f(B)) ≤ d(f(a), f(b)) ≤ L d(a, B) ≤ L h(A, B). By symmetry the claim follows; note f(A) is compact because f is continuous. ∎
Exercise
- (a)Compute h([0, 1], [2, 5]) in ℝ.
- (b)Compute h(Pₙ, [0, 1]) where Pₙ = {0, 1/n, 2/n, …, 1}.
- (c)In ℝ², compute h(S, D), where S is the unit circle and D is the closed unit disc.
- (d)Give an example showing that the space of non-empty closed bounded subsets of a non-complete metric space need not be complete under h.
Show solution
Answers: (a) Endpoint differences are |0 − 2| = 2 and |1 − 5| = 4, so h = 4 (the point 5 is at distance 4 from [0, 1]). (b) Every point of Pₙ is in [0, 1]; the point of [0, 1] farthest from Pₙ is the midpoint of a gap, at distance 1/(2n). So h = 1/(2n). (c) S ⊂ D, and the point of D farthest from S is the origin, at distance 1, so h = 1. (d) In X = (0, 1] with the usual metric, the singletons {1/n} are Cauchy in h (h({1/n}, {1/m}) = |1/n − 1/m|) but have no limit in 𝒦(X), since the only candidate {0} is not a subset of X.