MathLabs

Competition mathematics and problem solving

Olympiad inequalities

The core toolkit for proving inequalities in competition mathematics: AM–GM–HM a1+⋯+ann≥a1⋯ann\frac{a_1+\dots+a_n}{n} \ge \sqrt[n]{a_1\cdots a_n}, Cauchy–Schwarz (∑ai2)(∑bi2)≥(∑aibi)2\left(\sum a_i^2\right)\left(\sum b_i^2\right) \ge \left(\sum a_i b_i\right)^2 and its companion Titu's Lemma ∑ai2bi≥(∑ai)2∑bi\sum \frac{a_i^2}{b_i} \ge \frac{(\sum a_i)^2}{\sum b_i}, Rearrangement, Chebyshev, Jensen, and Schur's inequality ar(a−b)(a−c)+br(b−a)(b−c)+cr(c−a)(c−b)≥0a^r(a-b)(a-c) + b^r(b-a)(b-c) + c^r(c-a)(c-b) \ge 0. We give full proofs of Cauchy–Schwarz via the discriminant of ∑(ait−bi)2≥0\sum(a_i t - b_i)^2 \ge 0 and of Schur's inequality for r=1r=1, then apply these tools to signal-to-noise ratio bounds and Kullback–Leibler divergence.

IntuitionWhy Averages Behave the Way They Do

Take two positive numbers, say 44 and 99. Their arithmetic mean is 4+92=6.5\frac{4+9}{2}=6.5, but their geometric mean is 4⋅9=6\sqrt{4\cdot 9}=6. The geometric mean is always smaller (or equal, when the numbers are equal) — squeezing two unequal numbers together to multiply them "loses" more than adding them does. This single observation, generalized to nn numbers and combined with a handful of companion inequalities (Cauchy–Schwarz, Rearrangement, Chebyshev, Jensen, Schur), is the entire toolkit competition mathematicians use to prove that one algebraic expression is always at least as large as another — turning what looks like a search over infinitely many cases into a few lines of clean algebra.

Function plot visualizing the AM-GM gap as a downward parabola
The gap between arithmetic mean 6.56.5 and geometric mean 66 of 4,94,9 traced as a curve: adjust to see how f(x)=−x2+13f(x) = -x^2+13 visualizes the AM–GM gap (a+b2)2−ab=(a−b2)2≥0\left(\frac{a+b}{2}\right)^2 - ab = \left(\frac{a-b}{2}\right)^2 \ge 0.

SchoolAM–GM–HM and Cauchy–Schwarz

Definition: Three Means Compared

For positive reals a1,…,ana_1,\dots,a_n, the arithmetic mean is a1+⋯+ann\frac{a_1+\dots+a_n}{n}, the geometric mean is a1⋯ann\sqrt[n]{a_1\cdots a_n}, and the harmonic mean is n1a1+⋯+1an\frac{n}{\frac{1}{a_1}+\dots+\frac{1}{a_n}}. The AM–GM–HM chain states arithmetic ≥\ge geometric ≥\ge harmonic, with equality throughout exactly when a1=⋯=ana_1=\dots=a_n.

a1+⋯+ann≥a1⋯ann≥n1a1+⋯+1an\frac{a_1+\dots+a_n}{n} \ge \sqrt[n]{a_1\cdots a_n} \ge \frac{n}{\frac{1}{a_1}+\dots+\frac{1}{a_n}}

Cauchy–Schwarz sharpens this idea to dot products: (∑ai2)(∑bi2)≥(∑aibi)2\left(\sum a_i^2\right)\left(\sum b_i^2\right) \ge \left(\sum a_i b_i\right)^2. A direct corollary, Titu's Lemma (Engel form), is often more convenient for competition fractions: ∑ai2bi≥(∑ai)2∑bi\sum \frac{a_i^2}{b_i} \ge \frac{(\sum a_i)^2}{\sum b_i}, obtained by substituting ai→ai/bia_i \to a_i/\sqrt{b_i} and bi→bib_i \to \sqrt{b_i} into Cauchy–Schwarz.

∑ai2bi≥(∑ai)2∑bi\sum \frac{a_i^2}{b_i} \ge \frac{(\sum a_i)^2}{\sum b_i}
Which inequality to reach for
ToolBest for
AM–GMProducts vs. sums, fixed-sum optimization
Cauchy–Schwarz / TituSums of fractions, dot-product bounds
Rearrangement / ChebyshevSums of products of ordered sequences
JensenConvex/concave function of an average
SchurSymmetric three-variable inequalities

UndergraduateFull Proofs: Cauchy–Schwarz and Schur

For real numbers a1,…,ana_1,\dots,a_n and b1,…,bnb_1,\dots,b_n: (∑ai2)(∑bi2)≥(∑aibi)2\left(\sum a_i^2\right)\left(\sum b_i^2\right) \ge \left(\sum a_i b_i\right)^2, with equality iff the sequences are proportional.

Why is it true?

This single inequality (and its Engel-form corollary, Titu's Lemma) is the single most useful tool in olympiad inequality problems, converting sums of fractions or products into bounds that are easy to manipulate.

Proof

Step 1: Set up an auxiliary quadratic. Consider the real variable tt and the expression ∑i=1n(ait−bi)2\sum_{i=1}^n (a_i t - b_i)^2. Since it is a sum of squares of real numbers, it is always ≥0\ge 0 for every real tt: ∑(ait−bi)2≥0\sum(a_i t - b_i)^2 \ge 0.

**Step 2: Expand into a quadratic in tt.** Expanding, ∑(ait−bi)2=t2∑ai2−2t∑aibi+∑bi2\sum (a_i t - b_i)^2 = t^2 \sum a_i^2 - 2t \sum a_i b_i + \sum b_i^2. Write A=∑ai2A = \sum a_i^2, B=∑aibiB = \sum a_i b_i, C=∑bi2C = \sum b_i^2, so the expression is At2−2Bt+C≥0At^2 - 2Bt + C \ge 0 for all real tt.

Step 3: Handle the degenerate case. If A=0A = 0 then every ai=0a_i = 0, so both sides of the claimed inequality B2≤ACB^2 \le AC are 00, and the inequality holds trivially (with equality).

**Step 4: Use the discriminant when A>0A > 0.** A quadratic At2−2Bt+CAt^2 - 2Bt + C with positive leading coefficient AA that is ≥0\ge 0 for every real tt can have at most one real root, so its discriminant cannot be positive: (2B)2−4AC≤0(2B)^2 - 4AC \le 0, i.e. 4B2≤4AC4B^2 \le 4AC, i.e. B2≤ACB^2 \le AC.

Step 5: Conclude. Substituting back, (∑aibi)2≤(∑ai2)(∑bi2)\left(\sum a_i b_i\right)^2 \le \left(\sum a_i^2\right)\left(\sum b_i^2\right), which is exactly (∑ai2)(∑bi2)≥(∑aibi)2\left(\sum a_i^2\right)\left(\sum b_i^2\right) \ge \left(\sum a_i b_i\right)^2. Equality holds exactly when the discriminant is zero, i.e. the quadratic has a real double root t0t_0, i.e. ait0=bia_i t_0 = b_i for every ii — the sequences (ai)(a_i) and (bi)(b_i) are proportional.

For nonnegative reals a,b,ca,b,c: a(a−b)(a−c)+b(b−a)(b−c)+c(c−a)(c−b)≥0a(a-b)(a-c)+b(b-a)(b-c)+c(c-a)(c-b)\ge 0, with equality iff a=b=ca=b=c or two of them are equal and the third is 00.

Why is it true?

Schur's inequality is the standard closing move for symmetric three-variable competition inequalities that resist AM–GM or Cauchy–Schwarz directly, especially those involving a+b+ca+b+c, ab+bc+caab+bc+ca, abcabc simultaneously.

Proof

Step 1: Reduce by symmetry. The expression a(a−b)(a−c)+b(b−a)(b−c)+c(c−a)(c−b)a(a-b)(a-c)+b(b-a)(b-c)+c(c-a)(c-b) is symmetric in a,b,ca,b,c, so without loss of generality assume a≥b≥c≥0a \ge b \ge c \ge 0.

Step 2: Group the first two terms. Group a(a−b)(a−c)+b(b−a)(b−c)=(a−b)[a(a−c)−b(b−c)]a(a-b)(a-c) + b(b-a)(b-c) = (a-b)\big[a(a-c) - b(b-c)\big], factoring out the common factor (a−b)(a-b) from both terms (note b(b−a)(b−c)=−(a−b)⋅b(b−c)b(b-a)(b-c) = -(a-b)\cdot b(b-c)).

Step 3: Simplify the bracket. Expand a(a−c)−b(b−c)=a2−ac−b2+bc=(a2−b2)−c(a−b)=(a−b)(a+b)−c(a−b)=(a−b)(a+b−c)a(a-c) - b(b-c) = a^2 - ac - b^2 + bc = (a^2-b^2) - c(a-b) = (a-b)(a+b) - c(a-b) = (a-b)(a+b-c).

Step 4: Combine. Substituting back, the grouped terms equal (a−b)⋅(a−b)(a+b−c)=(a−b)2(a+b−c)(a-b)\cdot(a-b)(a+b-c) = (a-b)^2(a+b-c). So the full expression equals (a−b)2(a+b−c)+c(a−c)(b−c)(a-b)^2(a+b-c) + c(a-c)(b-c) (the last term is exactly the third original term, unchanged).

Step 5: Sign-check each piece. Since a≥b≥c≥0a \ge b \ge c \ge 0: (a−b)2≥0(a-b)^2 \ge 0 always. For the sign of a+b−ca+b-c: since a≥ca \ge c, we have a−c≥0a - c \ge 0, and b≥0b \ge 0, so a+b−c=(a−c)+b≥0a+b-c = (a-c)+b \ge 0. Hence (a−b)2(a+b−c)≥0(a-b)^2(a+b-c) \ge 0. For the second piece: c≥0c \ge 0, a−c≥0a-c \ge 0 (since a≥ca\ge c), and b−c≥0b - c \ge 0 (since b≥cb \ge c), so c(a−c)(b−c)≥0c(a-c)(b-c) \ge 0 as a product of three nonnegative numbers.

Step 6: Conclude. The full expression is a sum of two nonnegative terms, (a−b)2(a+b−c)+c(a−c)(b−c)≥0(a-b)^2(a+b-c) + c(a-c)(b-c) \ge 0, proving Schur's inequality for r=1r=1. Equality requires both pieces to vanish: either a=ba=b (making the first term 00) together with c(a−c)(b−c)=0c(a-c)(b-c)=0 (forced if additionally a=ca=c, giving a=b=ca=b=c, or c=0c=0 giving a=b,c=0a=b, c=0), matching the stated equality condition.

AdvancedReal-World Applications and Worked Examples

Cauchy–Schwarz is not just a competition trick: in signal processing, it bounds the correlation between a signal and a matched filter, giving the maximum achievable signal-to-noise ratio (SNR) of a matched-filter receiver. In information theory, Jensen's inequality (applied to the convex function −log⁡-\log) proves the Kullback–Leibler divergence DKL(P∥Q)=∑pilog⁡piqiD_{KL}(P\|Q) = \sum p_i \log\frac{p_i}{q_i} is always ≥0\ge 0 (Gibbs' inequality), the foundational fact making KL divergence a valid (if asymmetric) measure of distance between probability distributions, central to machine learning loss functions like cross-entropy.

Example: Matched-Filter SNR Bound via Cauchy–Schwarz

A receiver observes yi=si+niy_i = s_i + n_i for i=1,…,ni=1,\dots,n, where sis_i is a known signal and nin_i is noise with ∑ni2≤N\sum n_i^2 \le N. The receiver computes the correlation ∑siyi\sum s_i y_i. Use Cauchy–Schwarz to bound how much noise can corrupt this correlation, i.e. bound ∣∑sini∣|\sum s_i n_i|.

Solution

Step 1: Apply Cauchy–Schwarz directly to the sequences (si)(s_i) and (ni)(n_i): (∑sini)2≤(∑si2)(∑ni2)\left(\sum s_i n_i\right)^2 \le \left(\sum s_i^2\right)\left(\sum n_i^2\right).

Step 2: Substitute the noise energy bound ∑ni2≤N\sum n_i^2 \le N and write Es=∑si2E_s = \sum s_i^2 for the signal energy: (∑sini)2≤Es⋅N\left(\sum s_i n_i\right)^2 \le E_s \cdot N.

Step 3: Take square roots: ∣∑sini∣≤EsN|\sum s_i n_i| \le \sqrt{E_s N}. Meanwhile the noiseless correlation is exactly ∑si2=Es\sum s_i^2 = E_s, so the worst-case relative disturbance is EsNEs=N/Es\frac{\sqrt{E_s N}}{E_s} = \sqrt{N/E_s} — smaller when signal energy EsE_s is large relative to noise energy NN, which is exactly the intuitive statement that SNR (ratio Es/NE_s/N) controls detection reliability, and Cauchy–Schwarz shows the matched filter sis_i is in fact the optimal correlator (any other filter gives a weaker bound), by equality holding only when the noise happens to be proportional to sis_i itself.

Example: Proving Non-Negativity of KL Divergence via Jensen

For probability distributions p1,…,pnp_1,\dots,p_n and q1,…,qnq_1,\dots,q_n (all positive, summing to 11), prove Gibbs' inequality DKL(P∥Q)=∑ipilog⁡piqi≥0D_{KL}(P\|Q) = \sum_i p_i \log\frac{p_i}{q_i} \ge 0.

Solution

Step 1: Rewrite DKL(P∥Q)=−∑ipilog⁡qipi=∑ipi⋅(−log⁡qipi)D_{KL}(P\|Q) = -\sum_i p_i \log\frac{q_i}{p_i} = \sum_i p_i \cdot \left(-\log\frac{q_i}{p_i}\right), recognizing this as an expectation Ep[−log⁡qipi]\mathbb{E}_{p}\left[-\log \frac{q_i}{p_i}\right] weighted by the pip_i.

Step 2: Since −log⁡-\log is a convex function, Jensen's inequality gives E[−log⁡X]≥−log⁡E[X]\mathbb{E}[-\log X] \ge -\log \mathbb{E}[X] for any random variable XX (here X=qi/piX = q_i/p_i with probability pip_i).

Step 3: Compute E[X]=∑ipi⋅qipi=∑iqi=1\mathbb{E}[X] = \sum_i p_i \cdot \frac{q_i}{p_i} = \sum_i q_i = 1, since the qiq_i form a probability distribution.

Step 4: Combining, DKL(P∥Q)=E[−log⁡X]≥−log⁡E[X]=−log⁡1=0D_{KL}(P\|Q) = \mathbb{E}[-\log X] \ge -\log \mathbb{E}[X] = -\log 1 = 0, proving DKL(P∥Q)≥0D_{KL}(P\|Q) \ge 0, with equality iff qi/piq_i/p_i is constant for all ii (by the equality condition of Jensen for strictly convex −log⁡-\log), i.e. iff P=QP = Q.

In the proof of Cauchy–Schwarz via the discriminant of ∑(ait−bi)2≥0\sum(a_i t - b_i)^2 \ge 0, what property of the quadratic At2−2Bt+CAt^2-2Bt+C is used to conclude B2≤ACB^2 \le AC?

For which values of a,b,ca,b,c does Schur's inequality a(a−b)(a−c)+b(b−a)(b−c)+c(c−a)(c−b)≥0a(a-b)(a-c)+b(b-a)(b-c)+c(c-a)(c-b)\ge 0 hold with equality (besides a=b=ca=b=c)?

Titu's Lemma ∑ai2bi≥(∑ai)2∑bi\sum \frac{a_i^2}{b_i} \ge \frac{(\sum a_i)^2}{\sum b_i} is derived from Cauchy–Schwarz by which substitution?

In the Gibbs' inequality proof that DKL(P∥Q)≥0D_{KL}(P\|Q) \ge 0, which inequality is applied to the convex function −log⁡-\log?

References

  1. J. Michael Steele (2004). The Cauchy-Schwarz Master Class
  2. Radmila Bulajich Manfrino, José Antonio Gómez Ortega, Rogelio Valdez Delgado (2009). Inequalities: A Mathematical Olympiad Approach
  3. Thomas M. Cover, Joy A. Thomas (2006). Elements of Information Theory