Prove that for any 1-1 function $f : \mathbb R \to \mathbb R$, the function $d : \mathbb R \to \mathbb R$ defined by $$ d(x, y) = |f (x) − f (y)| $$ is a metric on $\mathbb R$.
I need to prove these properties:
$d(x,y)\ge0$
$d(x,y)=0$ iff $x=y$
$d(x,y)=d(y,x)$
Triangle inequality: $d(x, y) + d(y, z) \ge d(x, z)$
I was able to prove first three but couldn't prove the last one.
If you know that it's true for the identity function, then: $$|f(x)-f(z)|=|f(x)-f(y)+f(y)-f(z)|=|(f(x)-f(y))+(f(y)-f(z))|\leq |f(x)-f(y)|+|f(y)-f(z)|$$