# Math Help - Proving a function is continuous in a metric spaces

1. ## Proving a function is continuous in a metric spaces

Let A be a non-empty set in a metric space (X,d). Define $f : X \rightarrow \mathbb{R}$ by $f(x) = inf \{d(a,x) : a \in A \}$
. Prove that f is continuous.

I dont see how to bound f(x) and f(y)

2. ## Re: Proving a function is continuous in a metric spaces

Hint The class of subsets of $\mathbb{R}$ in the form $G_{\alpha}=(\alpha,+\infty)$ or $H_{\beta}=(-\infty,\beta)$ is a subbasis of $(\mathbb{R},T_u)$ . Prove that $f^{-1}(G_{\alpha})$ and $f^{-1}(H_{\beta})$ are open sets.

3. ## Re: Proving a function is continuous in a metric spaces

Originally Posted by FGT12
Let A be a non-empty set in a metric space (X,d). Define $f : X \rightarrow \mathbb{R}$ by $f(x) = \inf \{d(a,x) : a \in A \}$. Prove that f is continuous.
Suppose that $a\in A$.
$f(x)=\inf\{d(x,t):t\in A\}\le d(x,a)$
$d(a,x)\le d(a,y)+d(y,x)$ or $d(a,x)-d(y,x)\le d(a,y)$ for each $a\in A$

Thus $f(x)-d(x,y)\le f(y)$ or $f(x)-f(y)\le d(x,y)$

Can you continue to prove that $|f(x)-f(y)|\le d(x,y)~?$

4. ## Re: Proving a function is continuous in a metric spaces

Originally Posted by Plato
$d(a,x)-d(y,x)\le d(a,y)$ for each $a\in A$

Thus $f(x)-d(x,y)\le f(y)$
How did you make this step?

I understand that f(x)≤d(a,x), but how did you introduce f(y)?

5. ## Re: Proving a function is continuous in a metric spaces

Originally Posted by ILikeSerena
How did you make this step?
I understand that f(x)≤d(a,x), but how did you introduce f(y)?
Note that $d(a,x)\le d(a,y)+d(y,x)$ or $d(a,x)-d(y,x)\le d(a,y)$ for each $a\in A$
implies that $f(x)-d(x,y)$ is a lower bound for the set $\{d(y,a):a\in A\}~.$

6. ## Re: Proving a function is continuous in a metric spaces

Originally Posted by Plato
Note that $d(a,x)\le d(a,y)+d(y,x)$ or $d(a,x)-d(y,x)\le d(a,y)$ for each $a\in A$
implies that $f(x)-d(x,y)$ is a lower bound for the set $\{d(y,a):a\in A\}~.$
Thanks!
I got it now.