Prove: $d(a,b)=|f(a)-f(b)|$ is a metric on $\mathbb{R}\Rightarrow $ $f$ is injective
$d(a,b)=0\iff a=b$ so we have:
$|f(a)-f(b)|=0\iff a=b$
But $|f(a)-f(b)|=0\Rightarrow f(a)=f(b)$
So $f(a)=f(b)\Rightarrow a=b$
Is it correct? am I missing something?
Prove: $d(a,b)=|f(a)-f(b)|$ is a metric on $\mathbb{R}\Rightarrow $ $f$ is injective
$d(a,b)=0\iff a=b$ so we have:
$|f(a)-f(b)|=0\iff a=b$
But $|f(a)-f(b)|=0\Rightarrow f(a)=f(b)$
So $f(a)=f(b)\Rightarrow a=b$
Is it correct? am I missing something?
Let $f(a)=f(b)$. Then $0=|f(a)-f(b)| = d(a,b)$ and so $a=b$ since $d$ is a metric.