# Increasing function induces a metric in $\mathbb{R}$

Let $$f:\mathbb{R} \rightarrow \mathbb{R}$$ be a strictly increasing function. Show that $$d(x,y) = |f(x) - f(y)|$$ is a metric in $$\mathbb{R}$$.

The first two properties (non-negativity and symmetry) are straightforward to prove, but the triangular inequality is a lot harder for me!

• Use that the absolute value satisfies the triangle inequality. – Martin R Sep 3 '20 at 17:15

You can simply use the fact that $$D(x,y)=|x-y|$$ for $$x,y\in\Re$$ is a metric on reals. So $$|f(x)-f(y)|\le |f(x)-f(z)|+|f(z)-f(y)|$$ which is what you wanted.
• @Ralph The fact that $f$ is increasing does not matter for the triangular inequality. It does matter for the last point of the definition of a distance. – TheSilverDoe Sep 3 '20 at 17:49
$$d(x,z) = |f(x)-f(z)| \leq |f(x)-f(y)|+|f(y)-f(z)| = d(x,y)+d(y,z)$$
• $$d(x,z) = |f(x)-f(z)| \leq |f(x)-f(y)|+|f(y)-f(z)| = d(x,y)+d(y,z)$$
• $$d(x,y)=0 \iff |f(x)-f(y)|=0 \iff f(x)=f(y)$$, or $$f$$ is strictly increasing so it's injective, i.e: $$x=y$$ ( for the other implication $$x=y \implies d(x,y)=0$$)