# Thread: Function from Metric Space to R is Continuous

1. ## Function from Metric Space to R is Continuous

Let $\displaystyle (M, d)$ be a metric space. Let $\displaystyle f:M\longrightarrow M$ be a continuous function. Let $\displaystyle g:M\longrightarrow\mathbb{R}$ be defined by $\displaystyle x\longmapsto d(x,f(x))$. Show that $\displaystyle g$ is continuous.

So what we know is that $\displaystyle f$ is continuous, so for any $\displaystyle \eta>0$, there exists $\displaystyle \mu>0$ such that:

$\displaystyle d(x,y)<\mu \Rightarrow d(f(x),f(y))<\eta$

But what we want to do for any $\displaystyle \epsilon>0$ is to produce $\displaystyle \delta>0$ such that:

$\displaystyle d(x,y)<\delta \Rightarrow |g(x)-g(y)|=|d(x,f(x))-d(y,f(y))|<\epsilon$

I have a feeling we'll want to produce $\displaystyle \delta$ in terms of $\displaystyle \epsilon, \eta, \mu$. I was thinking breaking something up using a triangle inequality, but I've tried a few different ways that have all led to dead ends.

2. You can use the inequality $\displaystyle |d(x,z)-d(y,z)|\leq d(x,y)$ and write $\displaystyle d(x,f(x))-d(y,f(y))=d(x,f(x))-d(x,f(y))+d(x,f(y))-d(y,f(y))$.

3. I already tried that and came up with a dead end. The result of that yields:

$\displaystyle |g(x)-g(y)|\leq d(f(x),f(y))+d(x,y)$

Which if we let those be less than $\displaystyle \eta, \mu$ respectively from the previous part, we get:

$\displaystyle |g(x)-g(y)|<\eta+\mu$

Which I just don't see how you could possibly get $\displaystyle \delta$ out of something of that sort.

4. Given $\displaystyle \eta$, we can find $\displaystyle \mu$ such that $\displaystyle d(f(x),f(y))\leq \frac{\eta}2$ if $\displaystyle d(x,y)\leq \mu$. We can choose this $\displaystyle \mu$ smaller than $\displaystyle \frac{\eta}2$.