-1

How can I prove that the function $d(x,y) = \displaystyle\sum_{i=1}^n (x_i-y_i)^2$ satisfies the triangle inequality $$ d(x,z) \leq d(x,y)+d(y,z)?$$ The book from which this problem came suggests that the Cauchy-Schwarz inequality of the form $$\displaystyle\sum_{i=1}^n (x_iy_i) \leq (\displaystyle\sum_{i=1}^n x_i^2 \displaystyle\sum_{i=1}^n y_i^2)^{1/2}$$ may be helpful. Also, $d: \mathbb{R} \times \mathbb{R} \rightarrow \mathbb{R}$.

JMill.
  • 393

1 Answers1

2

Use Cauchy-Schwarz and bilinearity to prove

$$\| a+b \|^2 \leq \| a \|^2 + \| b \|^2 + 2 \| a \| \| b \| = \left ( \| a \| + \| b \| \right )^2$$

Now take $a=x-y,b=y-z$ to get

$$\| x-z \|^2 \leq \left ( \| x-y \| + \| y-z \| \right )^2.$$

Take square roots to get your result (corrected to include the necessary square root).

Ian
  • 101,645