- #1

amanda_ou812

- 48

- 1

**HELP! real analysis question: continuity and compactness**

## Homework Statement

Let (X,d) be a metric space, fix p ∈ X and define f : X → R by f (x) = d(p, x). Prove that f is continuous. Use this fact to give another proof of Proposition 1.126.

Proposition 1.126. Let (X, d) be a metric space, let K ⊆ X and let p ∈ X. If K is compact, then there is a point q0 ∈ K, such that dist(p, K) = d(p, q0).

## Homework Equations

## The Attempt at a Solution

I think I know how to do the first part of the question but I don't know how to do the second part.

part 1

given ε>0 let delta = ε, then when d(p, x)< delta we have abs( f(p) - f(x)) = abs( d(p, p) - d(p, x)) = abs (0 - d(p, x)) = d(p, x) < delta = ε.

part 2

I am not sure how to do this. Suppose K is compact and that f: K-> R is defined by f(q0) = d(p, q0). Well f continuous implies...I am not sure where to go from here...