# Chebyshev's sum inequality

In mathematics, Chebyshev's sum inequality, named after Pafnuty Chebyshev, states that if

${\displaystyle a_{1}\geq a_{2}\geq \cdots \geq a_{n}}$

and

${\displaystyle b_{1}\geq b_{2}\geq \cdots \geq b_{n},}$

then

${\displaystyle {1 \over n}\sum _{k=1}^{n}a_{k}b_{k}\geq \left({1 \over n}\sum _{k=1}^{n}a_{k}\right)\left({1 \over n}\sum _{k=1}^{n}b_{k}\right).}$

Similarly, if

${\displaystyle a_{1}\leq a_{2}\leq \cdots \leq a_{n}}$

and

${\displaystyle b_{1}\geq b_{2}\geq \cdots \geq b_{n},}$

then

${\displaystyle {1 \over n}\sum _{k=1}^{n}a_{k}b_{k}\leq \left({1 \over n}\sum _{k=1}^{n}a_{k}\right)\left({1 \over n}\sum _{k=1}^{n}b_{k}\right).}$[1]

## Proof

Consider the sum

${\displaystyle S=\sum _{j=1}^{n}\sum _{k=1}^{n}(a_{j}-a_{k})(b_{j}-b_{k}).}$

The two sequences are non-increasing, therefore aj − ak and bj − bk have the same sign for any jk. Hence S ≥ 0.

Opening the brackets, we deduce:

${\displaystyle 0\leq 2n\sum _{j=1}^{n}a_{j}b_{j}-2\sum _{j=1}^{n}a_{j}\,\sum _{j=1}^{n}b_{j},}$

hence

${\displaystyle {\frac {1}{n}}\sum _{j=1}^{n}a_{j}b_{j}\geq \left({\frac {1}{n}}\sum _{j=1}^{n}a_{j}\right)\,\left({\frac {1}{n}}\sum _{j=1}^{n}b_{j}\right).}$

An alternative proof is simply obtained with the rearrangement inequality, writing that

${\displaystyle \sum _{i=0}^{n-1}a_{i}\sum _{j=0}^{n-1}b_{j}=\sum _{i=0}^{n-1}\sum _{j=0}^{n-1}a_{i}b_{j}=\sum _{i=0}^{n-1}\sum _{k=0}^{n-1}a_{i}b_{i+k~{\text{mod}}~n}=\sum _{k=0}^{n-1}\sum _{i=0}^{n-1}a_{i}b_{i+k~{\text{mod}}~n}\leq \sum _{k=0}^{n-1}\sum _{i=0}^{n-1}a_{i}b_{i}=n\sum _{i}a_{i}b_{i}.}$

## Continuous version

There is also a continuous version of Chebyshev's sum inequality:

If f and g are real-valued, integrable functions over [a,b], both non-increasing or both non-decreasing, then

${\displaystyle {\frac {1}{b-a}}\int _{a}^{b}f(x)g(x)\,dx\geq \left[{\frac {1}{b-a}}\int _{a}^{b}f(x)\,dx\right]\left[{\frac {1}{b-a}}\int _{a}^{b}g(x)\,dx\right]}$

with the inequality reversed if one is non-increasing and the other is non-decreasing.