On this page
You multiply two lists of numbers in pairs and add the products. Which pairing gives the biggest total? The rearrangement inequality answers that in one line, and it can shorten many olympiad and JEE-style "prove that" questions.
What is the rearrangement inequality?
Take two lists of real numbers and sort both in increasing order: a₁ ≤ a₂ ≤ … ≤ aₙ and b₁ ≤ b₂ ≤ … ≤ bₙ. Multiply them in pairs, in any order, and add.
The rearrangement inequality says the sum is largest when the lists are paired in the same order (a₁b₁ + a₂b₂ + … + aₙbₙ) and smallest when one list is reversed (a₁bₙ + a₂bₙ₋₁ + … + aₙb₁), as stated in the Wikipedia entry on the rearrangement inequality. Every other pairing lands between the two.
The article cites the 1952 second edition of *Inequalities* by G. H. Hardy, J. E. Littlewood and G. Pólya (Cambridge University Press), Section 10.2, Theorem 368. If the a's are all different, the maximum happens only for the same-order pairing and the minimum only for the reversed one.
Rearrangement inequality example: which pairing wins?
Take a = (1, 2, 3) and b = (4, 5, 6). There are six ways to pair them:
1·4 + 2·5 + 3·6 = 32 (same order: the maximum)
1·4 + 2·6 + 3·5 = 31
1·5 + 2·4 + 3·6 = 31
1·5 + 2·6 + 3·4 = 29
1·6 + 2·4 + 3·5 = 29
1·6 + 2·5 + 3·4 = 28 (reversed: the minimum)
Brilliant's rearrangement inequality page makes the same point with dollar bills: taking 4, 3, 2 and 1 notes of four kinds, give the biggest count to the biggest note. In rupees: 4×500 + 3×200 + 2×100 + 1×50 = ₹2,850, but backwards only 1×500 + 2×200 + 3×100 + 4×50 = ₹1,400.
Why does pairing large with large give the biggest sum?
Suppose some pairing has a "crossing": a smaller number aᵢ is paired with p, a larger number aⱼ is paired with q, and p > q. Swap the partners. The sum changes by aᵢq + aⱼp − aᵢp − aⱼq = (aⱼ − aᵢ)(p − q), which is never negative because both brackets are positive or zero.
So uncrossing never lowers the sum. Keep uncrossing until none are left and you reach the same-order pairing. The minimum works the same way in reverse.
How do you prove known inequalities with it?
Write one side as a sorted pairing of two lists and the other as a shuffled pairing of the same lists.
First, a² + b² + c² ≥ ab + bc + ca. Use the lists (a, b, c) and (a, b, c). They are sorted the same way, so a·a + b·b + c·c is the largest pairing. The sum a·b + b·c + c·a pairs the first list with (b, c, a), a rearrangement of the second, so it cannot be bigger. Brilliant's page gives this proof. With two numbers it reads x² + y² ≥ 2xy, also a case of the AM-GM inequality in JEE maths.
Next, Nesbitt's inequality: for positive a, b, c, a/(b+c) + b/(c+a) + c/(a+b) ≥ 3/2. Wikipedia's page on Nesbitt's inequality cites it as a problem A. M. Nesbitt published in the Educational Times in 1902, and gives a rearrangement proof:
The expression is symmetric, so assume a ≥ b ≥ c.
Then b + c ≤ c + a ≤ a + b, so 1/(b+c) ≥ 1/(c+a) ≥ 1/(a+b). The lists (a, b, c) and these reciprocals are sorted the same way.
The left side S is the sorted pairing. Shuffle once: S ≥ b/(b+c) + c/(c+a) + a/(a+b).
Shuffle the other way: S ≥ c/(b+c) + a/(c+a) + b/(a+b).
Add the two lines. Each fraction pair now has equal top and bottom, so 2S ≥ 3 and S ≥ 3/2.
How do you spot a rearrangement problem in an exam?
Look for a sum of products, or a fraction you can write as one: a/(b+c) is a times 1/(b+c).
Assume an order (a ≥ b ≥ c) only if swapping any two variables leaves the expression unchanged. If it is only cyclic, check both orders.
Write down the order of the second list; reciprocals flip it.
Compare with one shuffled pairing, or add two shuffles, as in Nesbitt.
For bounds on dot products, use the Cauchy–Schwarz inequality in its vector and Engel forms. Heading for olympiads? See how to start olympiad inequalities, polynomials and proofs.
If a step in your own proof does not follow, the Fermi Problem Library has worked problems with a step-by-step solver that explains the reasoning rather than printing an answer. If ordering and inequality rules feel shaky, the Fermi Concept Library gives each mathematics concept its own lesson.
Try it now: prove a³ + b³ + c³ ≥ a²b + b²c + c²a for positive a, b, c, using the lists (a², b², c²) and (a, b, c).



