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}$.
Asked
Active
Viewed 438 times
-1
-
I guess you mean $d(x,y):=\sqrt\sum\cdots$ – drhab Jun 13 '15 at 13:14
1 Answers
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