Let $f:\mathbb{R}\rightarrow \mathbb{R}$. What conditions ensure that $d(x,y)=|f(x)-f(y)|$ defines a metric on $\mathbb{R}$
Let $g:[0,\infty) \to \mathbb{R}$. What conditions on $g$ ensure that $\phi(x,y) = g(|x-y|)$ defines a metric on $\mathbb{R}$.
For the first one I think the only condition is that it must be injective to ensure that there is only one kernel satisfying that is is positive definite with $d(x,y)=0$ iff $x = y$. The other two conditions for being metric seem to hold regardless of $f$.
For the second one I again think it needs to be injective, but I think it would also have to be surjective so we don't have a situation such as |5-4|=|4-5|=|1-0| etc.
Are the above two correct and can anyone spot anything else I have missed out? Thanks