I am wondering, what is the necessary and sufficient condition for the function $\hat{f}(x,y)= |f(x)-f(y)| $ from $\mathbb{R}$ to $\mathbb{R}$ to be a distance on $\mathbb{R}$?
Asked
Active
Viewed 78 times
0
-
2You mean $f(x,y) = |g(x) - g(y)|$? Like the $f$ at the start on two variables, is not the $f$ in side the absolute value. (That is a absolute value sign, right?) – Frames Catherine White Sep 18 '16 at 10:50
-
4 properties: https://en.wikipedia.org/wiki/Metric_%28mathematics%29#Definition – msm Sep 18 '16 at 11:15
1 Answers
3
An obvious necessary condition is that $f$ is injective, because we want $$ \hat{f}(x,y)=0\quad\text{if and only if}\quad x=y $$ So from $|f(x)-f(y)|=0$, in other terms $f(x)=f(y)$, we need to be able to deduce $x=y$, which is precisely injectivity.
There is no problem for $\hat{f}(y,x)=\hat{f}(x,y)$, so we are left with the triangle inequality. Now \begin{align} \hat{f}(x,z) &=|f(x)-f(z)|\\[4px] &=|f(x)-f(y)+f(y)-f(z)|\\[4px] &\le|f(x)-f(y)|+|f(y)-f(z)|\\[4px] &=\hat{f}(x,y)+\hat{f}(y,z) \end{align} because of the standard triangle inequality for the absolute value.
egreg
- 238,574