TITLE: Show that $d_x : X \rightarrow \mathbb{R}$ is a continuous function
QUESTION [0 upvotes]: Let (X,d) be a metric space, $x \in X$, $r>0$.
Show that $d_x : X \rightarrow \mathbb{R}$ with $d_x(y) = d(x,y)$ is a continuous function
Since X and $\mathbb{R}$ are both metric  spaces I will try to show continuity using the following definition:
$\forall \epsilon > 0, \exists \delta >0 s.t. \forall y \in X d(y,y') < \delta \implies d_{\mathbb{R}} (d_x(y),d_x(y'))< \epsilon$
$\iff$
$\forall \epsilon > 0, \exists \delta >0 s.t. \forall y \in X d(y,y') < \delta \implies \mid d_x(y)-d_x(y')\mid< \epsilon$ (I supposed that the metric on $\mathbb{R}$ is $d_{\mathbb{R}}(x,y) = \mid x - y \mid$)
$\iff$
$\forall \epsilon > 0, \exists \delta >0 s.t. \forall y \in X d(y,y') < \delta \implies \mid d(x,y)-d(x,y')\mid< \epsilon$
Questions
I am kind of stuck and I have 2 questions:

Am I going the right direction
I feel like I should compare $d(y,y')$ and $\mid d(x,y)-d(x,y')\mid$ But don't know how

REPLY [3 votes]: Your idea is totally fine. Just use the reverse triangle inequality:
$$
|d(x,y)-d(x,y')|\leq d(y,y').
$$
Your desired estimate follows immediately.
{"set_name": "stack_exchange", "score": 0, "question_id": 1969656}