Please note that the content of this book primarily consists of articles available from Wikipedia or other free sources online. In mathematics, the rearrangement inequality states that x_ny_1 + cdots + x_1y_n le x_{sigma (1)}y_1 + cdots + x_{sigma (n)}y_n le x_1y_1 + cdots + x_ny_n for every choice of real numbers x_1lecdotsle x_nquadtext{and}quad y_1lecdotsle y_n, and every permutation x_{sigma(1)},dots, x_{sigma(n)} of x1, . . ., xn. If the numbers are different, meaning that, x_1cdotsx_nquadtext{and}quad y_1cdotsy_n, then the lower bound is attained only for the permutation which reverses the order, i.e. (i) = n i + 1 for all i = 1, ..., n, and the upper bound is attained only for the identity, i.e. (i) = i for all i = 1, ..., n.