Rearrangement inequality
For two real sequences sorted in the same order, the sum of their pairwise products is maximal; sorting them in opposite orders makes it minimal.
For two real sequences sorted in the same order, the sum of their pairwise products is maximal; sorting them in opposite orders makes it minimal.