Let $f:\mathbb R \to \mathbb R$ be a non-constant function such that for any metric $d$ on $\mathbb R$ , $f:(\mathbb R,d)\to (\mathbb R,d)$ is continuous , then is $f$ the identity function i.e. $f(x)=x, \forall x \in \mathbb R$ ?
[ background : Similar in spirit to this one To characterize uncountable sets on which there exists a metric which makes the space connected , it is easy to see that if $f:\mathbb R \to \mathbb R$ is a function such that for any two metric $d_1,d_2$ on $\mathbb R$ , $f:(\mathbb R,d_1) \to (\mathbb R,d_2)$ is continuous , then taking $d_2$ to be discrete metric and $d_1$ to be euclidean metric , $f$ is seen to be constant . So I wondered what would happen if we want the same metric on both domain and co-domain , in this case I have not been able to make any progress ; the techniques used in Does there exist a metric $d$ on $\mathbb R$ such that the map $f:(\mathbb R,d) \to (\mathbb R,d)$ ; $f(x)=-x$ is not continuous? seems to be rather special , only holding for the particular function $f$ ... ]