3.11. Special Topics#

This section covers details on specific functions from the perspective of metric spaces

3.11.1. Distance from a Point#

Theorem 3.122 (Distance function is uniformly continuous)

Let (X,d) be a metric space. Fix some point aX. Define a function f:XR as:

f(x)=d(x,a)xX.

Then, f is uniformly continuous on X.

Proof. Let x,yX. Recall from triangle inequality that:

|d(x,a)d(y,a)|d(x,y).
  1. Let ϵ>0.

  2. Choose δ=ϵ.

  3. Assume d(x,y)<δ.

  4. Then

    |f(x)f(y)|=|d(x,a)d(y,a)|d(x,y)<δ=ϵ.
  5. Thus, d(x,y)<δ|f(x)f(y)|<ϵ.

  6. Thus, f is uniformly continuous.

3.11.2. Distance from a Set#

Recall from Definition 3.5 that the distance between a point xX and a set AX is given by:

d(x,A)=inf{d(x,a)aA}.

Proposition 3.32 (Distance from a singleton set)

For every x,yX,

d(x,{y})=d(x,y).

Proof. Let A={y} be a singleton set. Then

d(x,A)=d(x,{y})=inf{d(x,y)}=d(x,y).

Proposition 3.33 (Distance from a subset)

Let ABX. Then, for any xX

d(x,A)d(x,B).

Proof. We note that since AB, hence:

{d(x,a)aA}{d(x,a)aB}.

The infimum over a larger set is smaller. Hence,

d(x,B)d(x,A).

Proposition 3.34 (Distance from a containing subset)

Let xAX. Then

d(x,A)=0.

Proof. We note that:

d(x,x){d(x,a)aA}

since xA.

Thus,

d(x,A)=d(x,x)=0.

Theorem 3.123 (Continuity of set distance function)

Let AX be nonempty. Then, the function f:XR given by:

f(x)=d(x,A)=inf{d(x,a)aA}

is continuous.

We provided a proof in Example 3.16. We rephrase it here.

Proof. Let aX. We shall show that f is continuous at a.

  1. Let r>0.

  2. Consider the open ball/interval V=B(f(a),r) in R.

  3. Consider the open ball in X given by U=B(a,r).

  4. Let xU and let yA.

  5. Then, using triangle inequality:

    d(a,y)+d(x,a)d(x,y)

    and

    d(a,x)+d(x,y)d(a,y).
  6. Taking the infimum over yA in both the inequalities, we get:

    d(a,A)+d(x,a)d(x,A)

    and

    d(x,a)+d(x,A)d(a,A).
  7. Rewriting it further, we get:

    d(x,A)d(a,A)+d(x,a)

    and

    d(a,A)d(x,a)d(x,A).
  8. Since d(a,x)<r, hence, we obtain:

    d(a,A)r<d(x,A)<d(a,A)+r.
  9. Substituting f(x)=d(x,A) and f(a)=d(a,A),

    f(a)r<f(x)<f(a)+r.
  10. Thus, f(x)B(f(a),r)=V.

  11. In other words, f(U)V.

We have shown that for every r>0, there exists δ=r such that xB(a,δ) implies f(x)B(f(a),r). Thus, f is continuous at a.

Theorem 3.124 (Open neighborhoods of a set)

Let AX be nonempty. Let ϵ>0 and consider the set Aϵ given by

Aϵ={xX|d(x,A)<ϵ}.

Then Aϵ is open for every ϵ>0.

Proof. We established in Theorem 3.123 that f(x)=d(x,A) is continuous. The set Aϵ is the inverse image of the open interval (ϵ,ϵ) in R. Since f is continuous, hence the inverse image of an open interval is an open set.

Following is a direct proof.

  1. Let xAϵ.

  2. Then, there is yA such that d(x,y)<ϵ.

  3. Let δ>0 be small enough such that d(x,y)+δ<ϵ.

  4. Consider the open ball B(x,δ).

  5. For all zB(x,δ), we have:

    d(z,y)d(z,x)+d(x,y)<δ+d(x,y)<ϵ.
  6. Thus, d(z,A)<ϵ since yA.

  7. Thus, zAϵ.

  8. Thus, B(x,δ)Aϵ.

  9. Thus, Aϵ is open.

Theorem 3.125 (Closure and set distance)

Let AX be a nonempty set. Then, for any xX, d(x,A)=0 if and only if xclA.

In other words, the distance of a point from a set is zero if and only if the point is a closure point of the set.

Proof. Let xclA.

  1. Then either xA or xbdA.

  2. If xA, then by Proposition 3.34, d(x,A)=0.

  3. Now, assume xA and xbdA.

  4. Let r>0.

  5. Since xbdA, hence there exists yA such that d(x,y)<r.

  6. Therefore,

    d(x,A)=inf{d(x,y)|yA}<r.
  7. Since this is true for every r>0, hence d(x,A)=0.

Now assume that xclA.

  1. Thus, there exists an open ball B(x,r) for some r>0 such that B(x,r)A=.

  2. Therefore, for every aA, d(x,a)r>0.

  3. Therefore,

    d(x,A)=inf{d(x,a)|aA}r>0.

Corollary 3.4

Let AX be a nonempty closed set. Then, for any xX, d(x,A)=0 if and only if xA.

Proof. A closed set contains all its closure points. Thus, d(x,A)=0 if and only if x is a closure point of A if and only if xA.

Theorem 3.126 (Distance minimizer in a compact set)

Let A be a nonempty compact subset of X. Let xX. Then, there exists an aA such that

d(x,A)=d(x,a).

Proof. For a fixed xX, consider the real valued function f:XR given by:

f(y)=d(y,x)yX.

Then, f is continuous as it is a distance function from a singleton set {x}.

Hence, f(A) attains a minimum value at some aA. See Theorem 3.85.

Theorem 3.127 (Distance minimizer in a closed set)

Let X be a Euclidean metric space. Let AX be a nonempty closed set. Let xX. Then, there exists an aA such that

d(x,A)=d(x,a).

In other words, the infimum of the distance between x and points of A is realized at a point in A.

Proof. Since A is nonempty, we can pick some bA and compute r=d(x,b). Clearly,

d(x,A)d(x,b)=r.

Consider the set

C={aA|d(x,a)d(x,b)=r}=AB[x,r].

In other words, C is the intersection of A and the closed ball B[x,r] centered at x and of radius r. Since A is closed and B[x,r] is closed, hence C is closed.

It is easy to see that

d(x,A)=d(x,C).

For any points u,vC, we have:

d(u,v)d(u,x)+d(x,v)r+r=2r.

Thus, C is closed and bounded. By Heine-Borel theorem, C is compact.

Now, for a fixed xX, consider the function f:XR given by:

f(y)=d(y,x)yX.

Then, f is continuous.

  1. By Theorem 3.78, f(C) is compact (continuous images of compact sets are compact).

  2. But f(C)R.

  3. Hence, f(C) is closed and bounded as R is Euclidean (Heine-Borel theorem).

  4. Hence, f(C) attains a minimum value at some aC. See Theorem 3.85.

3.11.3. Distance Between Sets#

Recall from Definition 3.6 that the distance between two subsets of a metric space is given by

d(A,B)=inf{d(a,b)|aA,bB}.

Theorem 3.128 (Distance between disjoint compact and closed sets)

Let (X,d) be a metric space. Let A,BX be disjoint (i.e., AB=). Assume that A is compact and B is closed.

Then, there is δ>0 such that

|xy|δxA,yB.

In other words, the distance between A and B is nonzero; i.e., d(A,B)>0.

Proof. We prove this by contradiction.

  1. Assume that there is no such δ>0.

  2. Then there exist sequences {xn} of A and {yn} of B such that

    limn|xnyn|=0.
  3. Since A is compact, hence {xn} has a convergent subsequence, say {xnk} which converges to some xA.

  4. Now,

    |xynk||xxnk|+|xnkynk|.
  5. Since {xnyn} is a convergent sequence, hence {xnkynk} also converges to 0.

  6. Thus,

    limn|xynk|limn|xxnk|+limn|xnkynk|=0+0=0.
  7. Thus, {ynk} is a convergent sequence of B converging to x.

  8. Since B is closed, hence xB.

  9. But then, xAB.

  10. Thus, AB which is a contradiction.