# Is point to set distance continuous?

Assume $\mathbf{d}:\mathbb{R}^n\times\mathbb{R}^n\rightarrow\mathbb{R}_0^+$ is a metric such that the function $\psi(x)=\mathbf{d}(x,y)$ for any $y\in\mathbb{R}^n$ is continuous in the Euclidean metric. Moreover, assume that $\mathcal{A}\subseteq\mathbb{R}^n$ is a closed set. My question: is $\phi(x)=\mathbf{d}(x,\mathcal{A})$ a continuous function in Euclidean metric? Note that $\mathbf{d}(x,\mathcal{A})$ is point to set distance.

-
Is arbitrary minimum from R^X to R a continuous function? Gerhard "Ask Me About System Design" Paseman, 2011.08.29 –  Gerhard Paseman Aug 29 '11 at 23:45
(I deleted my earlier comment and removed the downvote because I clearly misread your question!) –  Phil Isett Aug 30 '11 at 0:33
Not a research level question. –  Anthony Quas Aug 30 '11 at 4:15

Yes, it is.

Being an infimum of a family of continuous functions, it's clear that the closed upper contour sets ${ x : \phi(x) \geq t }$ are closed. (This means the function $\phi$ is upper-semicontinuous. I always have to think of the characteristic function of a closed interval $[0,1]$ which is "above" the lowersemicontinuous characteristic function of $(0,1)$, to keep my head straight about which one's which.)

To see that the closed, lower contour sets ${ x : \phi(x) \leq t \}$ are closed, you can consider a convergent sequence $x_n \to x$ (convergent with respect to the Euclidean metric) with $\phi(x_n) \leq t$. Associated to this sequence, there are also points $y_n \in A$ which are a distance $d(x, y_n) \leq t + \delta$ of $x_n$. For $n$ large enough, $d(x, x_n) \leq \delta$ (because $\phi$ is continuous with respect to the Euclidean metric). Which means that $d(x, y_n) \leq t + 2 \delta$. Thus $d(x, A) \leq t + 2 \delta$ for all $\delta > 0$.

-
Thanks Phil! Sorry if the question was silly. –  Maj Aug 30 '11 at 18:25