Is $f(x,y) = d(x,y)$ a continuous function from a Metric space $X \times X$ to $\mathbb R$? where $(X , d)$ is a metric space.
My Attempt :
I think it is.
If we take any open ball of radius $\epsilon > 0 $ , $(a-\epsilon , a+\epsilon)$ in $\mathbb R$. , We will get an open preimage in $X \times X$.
The preimage will be the union of all $A \times B$ where $A$ and $B $ are open balls of radius $\frac{\epsilon}{2}$ in $X$ whose centers are $a$ units apart.
Have I gone wrong anywhere?
Can anyone please check If I am correct or wrong?