Continuity and Metric Spaces How do I show that the function $f:X \to \mathbb R$ given by $$f(x)=\frac{d(a,x)}{d(a,b)}$$ is continuous.
Given that $(X,d)$ is a metric space, and $a,b$ are distinct points in $X$.

If $d(x,y)<d(a,b)\cdot\varepsilon$ then
$$
|f(x)-f(y)| = \left|\frac{d(a,x)}{d(a,b)} - \frac{d(a,y)}{d(a,b)}\right| \le \frac{d(x,y)}{d(a,b)}<\varepsilon.
$$
The first inequality follows from two instances of the triangle inequality: $d(a,x)+d(x,y)\ge d(a,y)$ and $d(a,y)+d(y,x)\ge d(a,x)$.
So given $\varepsilon>0$, let $\delta =d(a,b)\cdot\varepsilon$.
