# Proving inequality relation

I would like to get some help with the next problem:

I'm trying to prove that $$\sum_{i = 1}^n (x_i - y_i)^2 \le \sum_{i = 1}^n (x_i - z_i)^2 + \sum_{i = 1}^n (z_i - y_i)^2\;\;\;\;\;(1).$$

I tried this: $$\sum_{i = 1}^n (x_i - y_i)^2 =$$ $$= \sum_{i = 1}^n [x_i^2 -2x_iy_i + y_i^2 + (-2x_iz_i + z_i^2) + (z_i^2 - 2z_iy_i) - (-2x_iz_i + z_i^2) - (z_i^2 - 2z_iy_i)] =$$ $$= \sum_{i = 1}^n [(x_i^2 - 2x_iz_i + z_i^2) + (z_i^2 - 2z_iy_i + y_i^2) - 2z_i^2 -2x_iy_i + 2x_iz_i + 2z_iy_i] =$$ $$= \sum_{i = 1}^n (x_i - z_i)^2 + \sum_{i = 1}^n (z_i - y_i)^2 - 2\sum_{i = 1}^n z_i^2 - 2\sum_{i = 1}^n (x_iy_i - x_iz_i - z_iy_i).$$

I wanted to get an expression from which it would be easier to conclude that $$\sum_{i = 1}^n (x_i - y_i)^2$$ is smaller than the right side of the inequality $$(1)$$, but the last expression isn't useful.

EDIT: I apologise, because i made a huge mistake. It wasn't explicitly stated, so i oversaw it: I need to prove a different inequality: $$\sqrt{\sum_{i = 1}^n (x_i - y_i)^2} \le \sqrt{\sum_{i = 1}^n (x_i - z_i)^2} + \sqrt{\sum_{i = 1}^n (z_i - y_i)^2}.$$

EDIT 2: I think i solved it. Using Minkowski inequality, i got: $$\sqrt{\sum_{i = 1}^n (x_i - y_i)^2} = \sqrt{\sum_{i = 1}^n |x_i + (-y_i)|^2} = \sqrt{\sum_{i = 1}^n |x_i - z_i + z_i + (-y_i)|^2} \le \sqrt{\sum_{i = 1}^n |x_i - z_i|^2} + \sqrt{\sum_{i = 1}^n |z_i - y_i|^2} = \sqrt{\sum_{i = 1}^n (x_i - z_i)^2} + \sqrt{\sum_{i = 1}^n (z_i - y_i)^2}.$$

• This seems equivalent to saying 'the length $XY$ squared is no greater than the sum of squares of distances $XZ$ and $ZY$' where X, Y, Z are points in $n$-dimensional Euclidean space, given by their Cartesian coordinates. But that is false: suppose Z is a midpoint of XY, then $|XY|^2 = 4\times (|XY|/2)^2 > 2\times (|XY|/2)^2 = |XZ|^2+|ZY|^2.$ – CiaPan Mar 19 at 16:14
• @CiaPan : Well, i'm trying to prove that function $d(x, y) = \sum_{i = 1}^n (x_i - y_i)^2$ is metric. In the book they say it is, but don't provide the proof. Maybe they made a mistake or typo. – SlowLearner Mar 19 at 16:23

It is enought to prove for $$n=1$$: $$(x-y)^2\leq (x-z)^2+(z-y)^2$$

It is the same as $$0\leq 2z^2-2xz-2yz+2xy$$

and this is $$(z-x)(z-y)\geq 0$$ which is not true if, say $$x=1,z=2$$ and $$y=3$$.

So you have forgotten something.

• I didn't forget anything, which is even more confusing. – SlowLearner Mar 19 at 16:24
• Which book is this? – Maria Mazur Mar 19 at 16:24
• I don't know. I only have photos of the pages of the first chapter. I took the book from the library, but i didn't want to copy it whole, because of possible damaging, so i just made photos of the pages i need. :) I guess i don't care about copyrights. – SlowLearner Mar 19 at 16:37
• Never mind, just want to help – Maria Mazur Mar 19 at 16:39
• I'm sorry, but i didn't remember authors or the exact title. Anyway, it's about analysis and it's in Serbian. – SlowLearner Mar 19 at 16:41