# Homework Help: Continuity on metric spaces.

1. Jul 9, 2011

### l888l888l888

1. The problem statement, all variables and given/known data

T is a compact metric space with metric d. f:T->T is continous and for every x in T f(x)=x. Need to show g:T->R is continous, g(x)=d(f(x),x).

2. Relevant equations

3. The attempt at a solution
f is continous for all a in T if given any epsilon>0 there is a delta>0 st d(x,a)<delta implies d(f(x),f(a))<epsilon. Need to show there is a delta st d(x,a)< delta implies |g(x)-g(a)|<epsilon.
by a previous problem i did... |g(x)-g(a)|=|d(f(x),x)-d(f(a),a)|<= d(f(x),f(a))+d(x,a)<d(f(x),f(a)) + delta. This is where I got stuck. from the assumption that f is continous we got from there that d(f(x),f(a))<epsilon. but if i say that then i would have...|g(x)-g(a)|<epsilon + delta and inorder for |g(x)-g(a)|to be <epsilon we would have to choose delta to be 0 which it cant be because it has to be greater than 0. any suggestions on what i should do?

2. Jul 9, 2011

### micromass

Hi l888l888l888!

This must be true for every epsilon, so also for $\varepsilon/2$. So, what happens to the following if you take

$$|g(x)-g(a)|<\varepsilon/2$$

3. Jul 9, 2011

### l888l888l888

hello micromass!!! im not really understanding your question. can you clarify? did you mean d(f(x),f(a))<epsilon/2?

4. Jul 9, 2011

### micromass

I'm so sorry!! What was I thinking...

But yes, that is what I meant. You can take $d(f(x),f(a))<\varepsilon/2$

5. Jul 9, 2011

### l888l888l888

Actually, I think I have it now. correct me if im wrong...
f is continous for all a in T if given any epsilon>0 there is a delta>0 st d(x,a)<delta implies d(f(x),f(a))<epsilon/2. Need to show there is a delta st d(x,a)< delta implies |g(x)-g(a)|<epsilon.
|g(x)-g(a)|=|d(f(x),x)-d(f(a),a)|<= d(f(x),f(a))+d(x,a)<epsilon/2 + delta. choose delta to be epsilon/2. so therefore |g(x)-g(a)|=|d(f(x),x)-d(f(a),a)|<= d(f(x),f(a))+d(x,a)<epsilon/2 + epsilon/2=epsilon, as desired...

6. Jul 9, 2011

Seems good!