I found this inequality but I don't know where it comes from

here is the inequality:
##(\sum\limits_{i=1}^n |x_i-y_i|)^2= \ge \sum\limits_{i=1}^n(x_i-y_i)^2+2\sum\limits_{i \neq j}^n |x_i-y_i|\cdot |x_j-y_j|##
does it have a name/is the consequence of a theorem?
Thank you :)

jedishrfu
Mentor
1 person
jbunniii
Homework Helper
Gold Member
I believe it is actually an equality, assuming you mean the following:
\begin{align} \left(\sum_{i=1}^{n}|x_i - y_i|\right)^2 &= \sum_{i=1}^{n} \sum_{j=1}^{n} |x_i - y_i|\cdot |x_j - y_j| \\ &= \sum_{i=1}^{n} |x_i - y_i|^2 + \sum_{i=1}^{n} \sum_{j\neq i,j=1}^{n} |x_i - y_i|\cdot |x_j - y_j|\\ &= \sum_{i=1}^{n} |x_i - y_i|^2 + \sum_{i=1}^{n} \sum_{j=1}^{i-1} |x_i - y_i|\cdot |x_j - y_j| + \sum_{i=1}^{n} \sum_{j=i+1}^{n} |x_i - y_i|\cdot |x_j - y_j| \end{align}
By symmetry, the second two terms are equal to each other, so we have
$$\left(\sum_{i=1}^{n}|x_i - y_i|\right)^2 = \sum_{i=1}^{n} |x_i - y_i|^2 + 2\sum_{i=1}^{n} \sum_{j=1}^{i-1} |x_i - y_i|\cdot |x_j - y_j|$$
I don't know if this equality has a name, but it's a standard and often useful way to rewrite the left hand side.

jedishrfu
Mentor
its the triangle inequality. see the wiki article on it.

D H
Staff Emeritus