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?