Triangle inequality to prove metric

317 Views Asked by At

I'm trying to prove that $$d(p,q)=2\sqrt{\left\vert p-q\right\vert} $$ is a metric. Now the first axioms are quite obvious, but I'm having difficulties trying to prove triangle equality for this. It's easy if you square the distance i.e. $d(p,q)^2$ which would give

$$d(p,q)^2=4\left\vert p-q\right\vert=4\left\vert p-r+r-q\right\vert\leq 4\left\vert p-r\right\vert+4\left\vert r-q\right\vert=d(p,r)^2+d(r,q)^2$$

but if you take square root from both sides you would get

$$2\sqrt{\left\vert p-q\right\vert}\leq \sqrt{4\left\vert p-r \right\vert+\left|r-q\right\vert}$$

which doesn't work. I'm not sure if this can be done this way so I hope that someone can give me an answer.

2

There are 2 best solutions below

0
On BEST ANSWER

Hint: The following claim should be useful

Claim: If $a,b \geq 0$, then $\sqrt{a + b } \leq \sqrt{a} + \sqrt{b} $. This follows from the fact that $2 \sqrt{ab} \geq 0 $. Adding $a+b$ in both sides give:

$$ a + 2\sqrt{ab} + b \geq a +b \iff (\sqrt{a} + \sqrt{b})^2 \geq a + b \iff \sqrt{a} + \sqrt{b} \geq \sqrt{a+b} $$

0
On

$$\left|p-r\right|\leq\left|p-q\right|+\left|q-r\right|\leq\left(\sqrt{\left|p-q\right|}+\sqrt{\left|q-r\right|}\right)^{2}$$

So:

$$\sqrt{\left|p-r\right|}\leq\sqrt{\left|p-q\right|}+\sqrt{\left|q-r\right|}$$