# Thread: Euclidean metric is a metric

1. ## Euclidean metric is a metric

I am trying to prove that the euclidean metric is a metric. I was able to prove the first three properties easily but the fourth is giving me trouble.

I have to prove that

$\displaystyle\sqrt{\sum_{i=1}^{n}(x_i-z_i)^2}\leq \sqrt{\sum_{i=1}^{n}(x_i-y_i)^2}+\sqrt{\sum_{i=1}^{n}(y_i-z_i)^2}$

Now in the outlined proof they ask you to first prove the CBS inequality and obtain the form

$\displaystyle\sum_{i=1}^{n}x_iy_i \leq \sqrt{\left(\sum_{i=1}^{n}x_i^2\right)\left(\sum_{ i=1}^{n}y_i^2\right)}$

And I've done this.

What I don't get is the jump from this to the proof of the fourth condition.

Could someone give me a hint (I'd actually prefer a hint rather then the whole solution if possible or a guide I want to get as much of this on my own as possible.)

Also, do I need to use $\sqrt{a+b}\leq \sqrt{a}+\sqrt{b}$ and if so how should I approach proving that?

2. $d^2(x,z)=\displaystyle\sum_{i=1}^n{(x_i-z_i)^2} =\displaystyle\sum_{i=1}^n(x_i-y_i+y_i-z_i)^2=$

$\displaystyle\sum_{i=1}^n(x_i-y_i)^2+\displaystyle\sum_{i=1}^n(y_i-z_i)^2+2\displaystyle\sum_{i=1}^n(x_i-y_i)(y_i-z_i)$

Now, use Cauchy Schwartz inequality:

$\displaystyle\sum_{i=1}^n(x_i-y_i)(y_i-z_i)\leq \left|\displaystyle\sum_{i=1}^n(x_i-y_i)(y_i-z_i)\right|\leq$

$\sqrt{\displaystyle\sum_{i=1}^n{(x_i-y_i)^2}}\sqrt{\displaystyle\sum_{i=1}^n{(y_i-z_i)^2}}$

You'll obtain:

$d^2(x,z)\leq \left(d(x,y)+d(y,z)\right)^2$

Fernando Revilla

3. $d^2(x,z)=\displaystyle\sum_{i=1}^n{(x_i-z_i)^2} =\displaystyle\sum_{i=1}^n(x_i-y_i+y_i-z_i)^2$

Makes everything crystal clear.

So from

$\displaystyle\sum_{i=1}^n(x_i-y_i)^2+\displaystyle\sum_{i=1}^n(y_i-z_i)^2+2\displaystyle\sum_{i=1}^n(x_i-y_i)(y_i-z_i)$

We get

$\displaystyle\sum_{i=1}^n(x_i-y_i)^2+\displaystyle\sum_{i=1}^n(y_i-z_i)^2+2\sqrt{\displaystyle\sum_{i=1}^n{(x_i-y_i)^2}}\sqrt{\displaystyle\sum_{i=1}^n{(y_i-z_i)^2}}$

Which becomes

$\displaystyle\sum_{i=1}^n{(x_i-z_i)^2\leq\left(\sqrt{\displaystyle\sum_{i=1}^n(x_ i-y_i)^2}+\sqrt{\displaystyle\sum_{i=1}^n(y_i-z_i)^2}\right)^2$

$\sqrt{\displaystyle\sum_{i=1}^n{(x_i-z_i)^2}}\leq\sqrt{\displaystyle\sum_{i=1}^n(x_i-y_i)^2}+\sqrt{\displaystyle\sum_{i=1}^n(y_i-z_i)^2}$

Thank you so much for the help.