# inequality with a sequence of real numbers

Given $n > 2$ and reals $x_1 \leqslant x_2 \leqslant \cdots \leqslant x_n$, show that $$\left(\sum_{i, j} |x_i - x_j|\right)^2 \leqslant \frac {2} {3} (n^2 - 1) \sum_{i, j} (x_i - x_j)^2.$$ Show that we have equality if and only if the sequence is an arithmetic progression.

IMO 2003/5

Let $m = {n \choose 2}$ and with $i \neq j$, let $y_1, y_2. \cdots, y_m$ be the positive reals $\{|x_i - x_j| : 1 \leqslant i, j \leqslant n \}$. By Cauchy-Schwartz inequality, we have $$\left(\sum_{1 \leqslant i \leqslant m} y_m\right)^2 \leqslant m \sum_{1 \leqslant i \leqslant m} y_m^2. \qquad \qquad \qquad \qquad (1)$$ That is,
$\begin {eqnarray} \left(\sum_{i, j} |x_i - x_j|\right)^2 & \leqslant & \frac {1} {2} (n^2 - n) \sum_{i, j} (x_i - x_j)^2 \nonumber \\ & \leqslant & \frac {2} {3} (n^2 - 1) \sum_{i, j} (x_i - x_j)^2. \end {eqnarray}$
In $(1)$, equality holds if and only if $y_1 = y_2 = \cdots = y_m$, that is, if $x_1, x_2, \cdots, x_n$ forms an arithmetic progression.