# Need help understanding this question about showing continuity in a metric space.

Let $E$ be a set and $x$ a point in a metric space. Define $\rho(x,E)=\inf_{y\in E}\rho(x,y)$. Show that for a fixed $E$, the function $f$ given by $f(x)=\rho(x,E)$ is continuous.

So what I know is $\inf_{y\in E}\rho(x,y)$ is unique and it's the "distance" of $x$ from the set $E$. Also, in order to show continuity, I must show that $\forall\epsilon\exists\delta>0$ such that if $d(x,y)<\delta$, then $d'(f(x),f(y))<\epsilon$. I think, I need to show that the difference between $\inf_{y\in E}\rho(x,E)$ and $\inf_{y\in E}\rho(z,E)$ gets smaller as $x$ and $z$ gets "closer" to each other. Is this what I need to show?

For this to work, $E$ needs to be nonempty. What is the case here is that $$|f(x)-f(y)|\le d(x,y).$$ This "Lipschitz condition" readily implies the continuity of $f$.
To prove the Lipschitz condition, take $\eta>0$. There is $z\in E$ such that $d(x,z)<f(x)+\eta$. It follows that $d(y,z)<f(x)+d(x,y)+\eta$ so that $f(y)=d(y,E)<f(x)+d(x,y)+\eta$. As $\eta$ is arbitrary, $f(y)-f(x)\le d(x,y)$. Similarly, $f(x)-f(y)\le d(x,y)$.
The idea is correct. For any $\epsilon > 0$, and any $x$ in the metric space, you need to be able to show that whenever some $z$ is close enough to $x$, the difference between $\rho(x,E)$ and $\rho(z,E)$ is less than $\epsilon$
All you need here is the triangle inequality. Start by picking a point $p$ in $E$ that's almost $\rho(x,E)$ distant from $x$, and see how far it is from neighboring points of $x$.
• I'm not sure why I'll pick a $p$ in $E$, but good to know I am headed to the right direction. Is there a way to show that if I pick a point $u$ closer to $x$ than $z$, then $\inf_{y\in E}\rho(u,y)$ and $\inf_{y\in E}\rho(x,y)$ has a smaller difference? Thanks. – TheLast Cipher Jul 18 '18 at 5:50