$d(x,y) = | x^{2} - y^{2}|$ and $ d(x,y) = | x^{3} - y^{3}|$ are metrics on $\mathbb R$ or not$?$ $d(x,y) = | x^{2} - y^{2}|$ and $ d(x,y) = | x^{3} - y^{3}|$ are metrics on $\mathbb R$ or not$?$
Clearly,

*

*$d(x,x) = 0$


*$d(x,y) = d(y,x)$


*$d(x,y) ≥ 0$ , for all $x,y$ for both.
Now, for fourth axiom.


*$d(x,z) = |x^{2} - z^{2}| = |x^{2} - y^{2} + y^{2} - z^{2}| ≤ |x^{2} - y^{2}| + |y^{2} - z^{2}| = d(x,y) + d(y,z)$
Similarly,
$d(x,z) = |x^{3} - z^{3}| = |x^{3} - y^{3} + y^{3} - z^{3}| ≤ |x^{3} - y^{3}| + |y^{3} - z^{3}| = d(x,y) + d(y,z)$
So both should be metrics. But answer is given that only the second one in metric. So what's wrong with my proof. I think something is wrong with my proof of fourth axiom.
I've just started metric spaces today.
Please suggest..
 A: You misstated the first condition.
As stated 
1) $d(x,x) = 0$ is not strong enough.
The condition should be 
2) $d(x,y) = 0 \iff x = y$.  
If $d(x,y) = |x^2 - y^2|$ then $d(-x, x) = |(-x)^2 - x^2| = 0$ but if $x \ne 0$ then $x \ne -x$ so the condition does not hold.
So $d(x,y) = |x^2 - y^2|$ is not a metric.
.......
But if $d(x,y) = |x^3 - y^3|$ then
$|x^3 - y^3| = 0 \iff x^3 - y^3 = 0\iff x^3 = y^3$. Since we are talking of $\mathbb R$ and not complex numbers and as $3$ is odd it is okay to assume that $x^3 = y^3\iff x = y$.  If you are parsnickity you can prove that but that is really more detail than I think we need.[1] 
So $d(x,y) = |x^3 - y^3|$ satisfies condition 1).
.........
Conditions 2,3 are trivial.
And condition 4) you did okay.
So $d(x,y)=|x^3 - y^3|$ is a metric.
Note:  Conditions 2,3,4 are all true for $d(x,y)= |x^2 - y^2|$ as well for the exact same reasons.  It's only condition 1 that fails.  But that's enough.
=========
[1] It's enough to assume that for any positive number $b > 0$ there is exactly one positive $c$ so that $c^n = b$. and that  $[(\pm) c]^n = (\pm -1)^n b$ so if $n$ is odd then $b$ and $-b$ have exactly one $n$th root that is the same sign as $b$ or $-b$ is.  If $n$ is even then $-b$ has no $n$th roots and $b$ has two, a positive and negative root, both equal in magnitude to $|c|$.
So for $n =3$ then  $x^3 = y^3 \iff x= y$ is an okay conclusion.  
But for $n = 2$ then $x^2 = y^2 \iff |x| = |y| \iff x = y$ OR $x = -y$ is the only conclusion we can reach.  And that isn't a good enough conclusion.
A: Recall the definition of a metric. A function $d: X \to \mathbb{R}$ on a space $X$ is a metric if:
1) $d(x,y) = 0$ if and only if $x=y$. 
2) $d(x,y) =d(y,x)\ \forall\ x,y \in X.$
3) $d(x,y) \le d(x,z) + d(y,z) \ \forall \ x,y,z \in X.$
Now we check above conditions on two of our metrics:
Case 1 : $d(x,y) = |x^2-y^2|$.
$(i)\ d(x,y) = 0 \Rightarrow |x^2-y^2| = 0 \Rightarrow x^2-y^2 = 0 \ (\text{as modulus is always} \ge 0) \Rightarrow x^2 =y^2.$
So any $x,y \in \mathbb{R}$ such that $x^2 =y^2$ gives $d(x,y) = 0.$ This contradicts our first condition for a metric. Hence $d(x,y) = |x^2-y^2|$ is not a metric on $\mathbb{R}$.
Case 2 : $d(x,y) = |x^3-y^3|$.
$(i)\ d(x,y) = 0 \Rightarrow |x^3-y^3| = 0 \Rightarrow x^3 - y^3 = 0 \Rightarrow (x-y)(x^2+xy+y^2) = 0 \Rightarrow x = y$ (as second term is never zero under the condition given). The other side is trivial as if $ x= y $ then $d(x,y) = |x^3-y^3| = 0$. 
$(ii)\ d(x,y) = |x^3-y^3| = |y^3-x^3| = d(y,x).$
$(iii)\ d(x,y) = |x^3- y^3| = |x^3-z^3+ z^3-y^3| \le |x^3- z^3|+ |z^3-y^3|$ (by the triangular inequality in modulus.)
$\Rightarrow d(x,y) \le d(x,z)+d(z,y). $
Hence $d(x,y) = |x^3-y^3|$ is a metric on $\mathbb{R}$.
A: Let $(X, d)$ be a metric space and let $f: X\longrightarrow X$ be an injective map. Then: $$d_f(x, y)=d(f(x), f(y)),$$ defines a new metric in $X$. In fact:


*

*$d_f(x, y)=0\Leftrightarrow d(f(x), f(y))=0\Leftrightarrow f(x)=f(y)\Leftrightarrow x=y$ (here is where we used $f$ is injective;

*$d_f(x, y)=d(f(x), f(y))=d(f(y), f(x))=d_f(y, x)$;

*Given $x, y, z\in X$ we have $$d_f(x, z)=d(f(x), f(y))\leq d(f(x), f(z))+d(f(z), f(y))=d_f(x, z)+d_f(y, z).$$
This will show $d(x, y)=|x^3-y^3|$ is in fact a metric. The another one is not a metric as already pointed out.
