# Let $d(x,y)=|x-y|$, when does $|x-y|^p$ define a metric?

For what $p$ does $|x-y|^p$ define a metric on $\mathbb{R}$?

One can show that $d_1 = \sqrt{|x-y|}=|x-y|^\frac{1}{2}$ defineds a metric. All requirements can be easily checked. On the other hand, $d_2 = |x-y|^2$ does not define a metric. For example,

$$|1-0|^2=1\text{ , but } |1-0.5|^2+|0.5-0|^2=0.5$$

I am curious for what $p$ does $|x-y|^p$ define a metric? I suspect that if $p>1$ then it cannot be a metric since we can use the similar arguments using $0,0.5$ and $1$.

• If $p>1$ then it dont defines a metric. Observe that the same example you used can be applied for any $p>1$. For $0< p\le 1$ it defines a metric. Check this. What I dont checked are the cases for negative values of $p$. Oct 16 '16 at 4:02
• See also this posts and other questions linked there. Perhaps also this post. Oct 16 '16 at 9:54

The only thing we need to check is the triangle inequality, i.e. for what $p$, do we have \begin{align} |x-y|^p \leq |x-z|^p+|z-y|^p. \end{align} It's clear that for $p>1$ the above inequality fails because \begin{align} 2^p=|1-(-1)|^p> |1-0|^p+|0-(-1)|^p = 2. \end{align} Suppose $0<p\leq 1$, then we see the triangle iequality does hold. Let us prove it. Observe \begin{align} |x+y| \leq (|x|+|y|)= (|x|^{p/p}+|y|^{p/p}) \leq (|x|^p+|y|^p)^{1/p} \end{align} which means \begin{align} |x+y|^p \leq |x|^p+|y|^p. \end{align} Lastly, for $p<0$, we see that $1/|x-y|^{|p|}$ doesn't satisfies the condition $d(x, x) = 0$.
• How do we get $(|x|^{p/p} + |y|^{p/p})\le (|x|^p + |y|^p)^{1/p}$? Oct 16 '16 at 15:01
• @3x89g2 The relation $(|x|^{p/p} + |y|^{p/p}) < (|x|^p + |y|^p)^{1/p}$ just states that the 1-norm is less than the p-norm, for $p\le 1$. This is true since in general, $p$-norms are decreasing with $p$, see math.stackexchange.com/questions/218046 Oct 9 '18 at 18:06