19-10-2023

Problem: et $(X, d)$ be a metric space. Fix a point $x_0 \in X$. Prove that the function \[ f: X \to \mathbb{R} ,~ x \mapsto d(x, x_0) \] is continuous.
Solution: Let $\varepsilon > 0$ be given. Choose $\delta = \epsilon $. Consider \begin{align*} \left\vert f(x) - f(y) \right\vert & = \left\vert d(x,x_0) - d(y, x_0)\right\vert \\ & = \left\vert d(x,x_0) - d(x_0,y) \right\vert \\ & \leq d \left( x,y \right), \end{align*} where the last inequality follows from the triangle inequality. So we proved that if \[ d(x,y) \lt \delta , \text{ then } \left\vert f(x) - f(y) \right\vert \lt \varepsilon \] and hence, the function $f$ is continuous.