The distance function on a metric space

Let $$(X,d)$$ be a metric space and $$A\subset X$$ and $$x\in X$$. Then

• $$x\to d(x,A)$$ is a uniformly continuous function.

• If $$\partial A=\{x\in X\,:\,d(x,A)=0\}\cap\{x\in X\,:\,d(x,X-A)=0\}$$, then $$\partial A$$ is closed for any $$A\subset X$$.

• If $$A,B$$ are subsets of $$X$$ then $$d(A, B)=d(B,A)$$.

If the function is uniformly continuous then $$d(x,y)<\delta$$ implies $$d(d(x,A)-d(y,A))<\epsilon$$ , I can not handle the last expression. Difficulty continues for 3rd choice also. At least give me some hints. And for the 2nd choice I think it is true, as it is intersection of two closed sets. As finite intersection of closed sets closed $$\partial A$$ closed. And logic for former two sets closed is that the sets are preimage of closed set (singleton $$\{0\}$$ is closed as $$\mathbb R$$ is $$T_1$$) under continuous map. I am not very much sure about my ideas and want a verification.

• I have shared my difficulties and thoughts. Please give me some hint at least. Commented Jan 15, 2014 at 23:47
• By the way, you first point is also proved here : math.stackexchange.com/questions/48850/… Commented Jan 22, 2014 at 12:45
• See also: Distance is (uniformly) continuous. Commented Nov 26, 2018 at 19:55

Let $(X,d)$ be a metric space and $A$ be any non-empty subset of $X$. Then, for any $x \in X$, let $d(x,A)$ be :

$$d(x,A) = \inf \limits_{z \in A} d(x,z)$$

• It is true that the mapping $x \, \longmapsto \, d(x,A)$ is uniformly continuous as it is lipschitz continuous (with a lipschitz constant equal to 1). (If you don't know about "lipschitz continuity", have a look here.) Let us prove that :

$$\forall (x,y) \in X^{2}, \, \big\vert d(x,A) - d(y,A) \big\vert \leq d(x,y)$$

Let $(x,y) \in X^{2}$ and let $z \in A$. It follows from the triangular inequality for $d$ that :

$$d(x,z) \leq d(x,y) + d(y,z) \tag{1}$$

Note that, by definition : $\forall z \in A, \, d(x,A) \leq d(x,z)$. Using this idea a first time gives :

$$d(x,A) \leq d(x,z) \leq d(x,y) + d(y,z)$$

Using the same idea again leads to :

$$d(x,A) - d(y,A) \leq d(x,y) \tag{2}$$

By symmetry ($x$ and $y$ play symmetric roles here), we have :

$$d(y,A) - d(x,A) \leq d(x,y) \tag{3}$$

Eventually, $(2)$ and $(3)$ write :

$$d(y,A) - d(x,y) \leq d(x,A) \leq d(y,A) + d(x,y)$$

which is exactly :

$$\big\vert d(x,A) - d(y,A) \big\vert \leq d(x,y)$$

As a conclusion, $x \, \longmapsto \, d(x,A)$ is lipschitz continuous on $X$, so it is uniformly continuous on $X$.

• You are right, $\partial A$ is closed as it is the intersection of two closed sets. Each of the two sets are closed as they are the preimage of $\left\{ 0 \right\}$ (which is closed in $(\mathbb{R},\vert \cdot \vert)$) under the continuous mappings $x \, \longmapsto \, d(x,A)$ and $x \, \longmapsto \, d(x,X \smallsetminus A)$.
• Let $A$ and $B$ be two non-empty subsets of $X$. Since $d$ is a distance, $d(x,y)=d(y,x)$ for all $(x,y) \in X^{2}$. So, $d(A,B) = d(B,A)$ follows easily. By definition :

\begin{align*} d(A,B) &= \inf \limits_{x \in A} d(x,B) \\[2mm] &= \inf \limits_{x \in A} \inf \limits_{y \in B} d(x,y) \\[2mm] &= \inf \limits_{x \in A} \inf \limits_{y \in B} d(y,x) \\[2mm] &= \inf \limits_{y \in B} \inf \limits_{x \in A} d(y,x) \\[2mm] &= \inf \limits_{y \in B} d(y,A) \\[2mm] &= d(B,A) \\ \end{align*}