Skip to main content

ProofsPath · 12 min

The Cauchy-Schwarz Inequality

Important
For:GeneralResearch

The Cauchy-Schwarz Inequality

Why This Matters

The Cauchy-Schwarz inequality is the bilinear backbone of olympiad inequalities. Its statement:

For real numbers a1,,ana_1, \ldots, a_n and b1,,bnb_1, \ldots, b_n, (i=1naibi)2(i=1nai2)(i=1nbi2),\left(\sum_{i=1}^n a_i b_i\right)^2 \le \left(\sum_{i=1}^n a_i^2\right)\left(\sum_{i=1}^n b_i^2\right), with equality if and only if (a1,,an)(a_1, \ldots, a_n) and (b1,,bn)(b_1, \ldots, b_n) are proportional (or one is the zero vector).

Cauchy-Schwarz is to bilinear sums what AM-GM is to additive and multiplicative structure: a fundamental lower bound, true in great generality, with one-line proofs in dozens of forms. Every olympiad student should know the statement, the equality case, at least one proof, and the Engel form (Titu's lemma) ai2bi(ai)2bi\sum \frac{a_i^2}{b_i} \ge \frac{(\sum a_i)^2}{\sum b_i}, which is the form most contest problems actually need.

Recognize Cauchy-Schwarz when:

  • You have a sum of products and want to bound it by a product of sums (or the reverse).
  • You have ratios with squared numerators or denominators (ai2bi\sum \frac{a_i^2}{b_i} or ai21ai2\sum a_i^2 \sum \frac{1}{a_i^2}).
  • A vector or inner-product geometry interpretation simplifies the problem.
  • The equality case is "vectors proportional", which is a strong cue.

The inequality lives in any inner-product space. The finite-sum form above is the discrete case; integral and L2L^2-norm forms generalize it. Olympiad applications are almost entirely the discrete case.

The Inequality

Theorem

Cauchy-Schwarz Inequality (1821 / 1859 / 1885)

Statement

(i=1naibi)2(i=1nai2)(i=1nbi2)\left(\sum_{i=1}^n a_i b_i\right)^2 \le \left(\sum_{i=1}^n a_i^2\right)\left(\sum_{i=1}^n b_i^2\right), with equality iff there exist scalars (λ,μ)(\lambda, \mu) not both zero with λai=μbi\lambda a_i = \mu b_i for all ii.

Intuition

Geometric reading: (aibi)2=a,b2a2b2\left(\sum a_i b_i\right)^2 = \langle \mathbf{a}, \mathbf{b} \rangle^2 \le \|\mathbf{a}\|^2 \|\mathbf{b}\|^2. The angle θ\theta between a\mathbf{a} and b\mathbf{b} satisfies cos2θ1\cos^2 \theta \le 1, with equality iff θ=0\theta = 0 or π\pi, i.e., the vectors are parallel.

The inequality is exactly cosθ1|\cos \theta| \le 1 for the angle between two vectors. That is the whole content.

Proof Sketch

Discriminant proof. Consider the quadratic in tt: f(t)=i=1n(ai+tbi)2=t2bi2+2taibi+ai2.f(t) = \sum_{i=1}^n (a_i + t b_i)^2 = t^2 \sum b_i^2 + 2 t \sum a_i b_i + \sum a_i^2. This is non-negative for all real tt (sum of squares). Hence its discriminant is non-positive: 4(aibi)24(ai2)(bi2)0,4 \left(\sum a_i b_i\right)^2 - 4 \left(\sum a_i^2\right) \left(\sum b_i^2\right) \le 0, which is Cauchy-Schwarz. Equality iff f(t)=0f(t) = 0 for some tt, i.e., ai=tbia_i = -t b_i for all ii, i.e., proportional.

Lagrange identity. Direct algebra: (ai2)(bi2)(aibi)2=i<j(aibjajbi)2.\left(\sum a_i^2\right) \left(\sum b_i^2\right) - \left(\sum a_i b_i\right)^2 = \sum_{i < j} (a_i b_j - a_j b_i)^2. The right side is a sum of squares, hence non-negative. Equality iff every aibjajbi=0a_i b_j - a_j b_i = 0, i.e., proportional.

Engel form / Titu's lemma. For positive bib_i, i=1nai2bi(i=1nai)2i=1nbi.\sum_{i=1}^n \frac{a_i^2}{b_i} \ge \frac{(\sum_{i=1}^n a_i)^2}{\sum_{i=1}^n b_i}. This rearranges to the standard form by setting a~i=aibi\tilde{a}_i = \frac{a_i}{\sqrt{b_i}}, b~i=bi\tilde{b}_i = \sqrt{b_i} and expanding.

Why It Matters

Cauchy-Schwarz is the most-cited inequality in olympiad solutions after AM-GM. The Engel form (Titu's lemma) is especially powerful: it converts a sum-of-fractions inequality into a comparison of single ratios, which is often immediate from the problem hypothesis.

The inequality also generalizes in many directions: Holder's inequality (with exponents p,qp, q summing reciprocally to 1 instead of just p=q=2p = q = 2), the Cauchy-Schwarz inequality on inner-product spaces, the integral form (fg)2f2g2\left(\int f g\right)^2 \le \int f^2 \int g^2, and the matrix-trace form. The same proof technique (discriminant, expanding a square, Lagrange identity) adapts to all of these.

Failure Mode

The inequality (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) is square. Without the square, you cannot conclude aibiai2bi2\sum a_i b_i \le \sqrt{\sum a_i^2} \sqrt{\sum b_i^2} unless aibi0\sum a_i b_i \ge 0. For sums of products with negative terms, the inequality bounds aibi|\sum a_i b_i|, not aibi\sum a_i b_i itself.

The Engel form ai2bi(ai)2bi\sum \frac{a_i^2}{b_i} \ge \frac{(\sum a_i)^2}{\sum b_i} requires bi>0b_i > 0. If any bi=0b_i = 0 the fraction is undefined. If any bi<0b_i < 0 the inequality direction can flip.

Worked Example: The Engel Form in Action

Example

The Engel form (Titu's lemma) at n=3

Problem. For positive reals a,b,c,x,y,za, b, c, x, y, z, show a2x+b2y+c2z(a+b+c)2x+y+z.\frac{a^2}{x} + \frac{b^2}{y} + \frac{c^2}{z} \ge \frac{(a + b + c)^2}{x + y + z}.

Solution. This is exactly the Engel form (Titu's lemma) at n=3n = 3. Apply Cauchy-Schwarz to the sequences (ax,by,cz)\left(\frac{a}{\sqrt{x}}, \frac{b}{\sqrt{y}}, \frac{c}{\sqrt{z}}\right) and (x,y,z)\left(\sqrt{x}, \sqrt{y}, \sqrt{z}\right): (axx+byy+czz)2(a2x+b2y+c2z)(x+y+z).\left(\frac{a}{\sqrt{x}} \cdot \sqrt{x} + \frac{b}{\sqrt{y}} \cdot \sqrt{y} + \frac{c}{\sqrt{z}} \cdot \sqrt{z}\right)^2 \le \left(\frac{a^2}{x} + \frac{b^2}{y} + \frac{c^2}{z}\right) (x + y + z). The left side is (a+b+c)2(a + b + c)^2. Dividing by x+y+zx + y + z gives the result.

Equality iff a/xx=b/yy=c/zz\frac{a/\sqrt{x}}{\sqrt{x}} = \frac{b/\sqrt{y}}{\sqrt{y}} = \frac{c/\sqrt{z}}{\sqrt{z}}, i.e., ax=by=cz\frac{a}{x} = \frac{b}{y} = \frac{c}{z}.

The Engel form is what you actually use in 80% of contest problems. Recognizing the pattern (thing)2(positive thing)\sum \frac{(\text{thing})^2}{(\text{positive thing})} is the entry point.

Worked Example: A Classic Olympiad

Example

Nesbitt's inequality

Problem. For positive reals a,b,ca, b, c, show ab+c+bc+a+ca+b32.\frac{a}{b + c} + \frac{b}{c + a} + \frac{c}{a + b} \ge \frac{3}{2}.

Solution (via Engel). Rewrite each fraction as a2a(b+c)\frac{a^2}{a(b + c)}: ab+c=a2a(b+c)(a+b+c)2a(b+c)=(a+b+c)22(ab+bc+ca).\sum \frac{a}{b + c} = \sum \frac{a^2}{a(b + c)} \ge \frac{(a + b + c)^2}{\sum a(b + c)} = \frac{(a + b + c)^2}{2(ab + bc + ca)}.

It remains to show (a+b+c)22(ab+bc+ca)32\frac{(a + b + c)^2}{2(ab + bc + ca)} \ge \frac{3}{2}, i.e., (a+b+c)23(ab+bc+ca)(a + b + c)^2 \ge 3(ab + bc + ca). Expand the left: a2+b2+c2+2(ab+bc+ca)3(ab+bc+ca)a^2 + b^2 + c^2 + 2(ab + bc + ca) \ge 3(ab + bc + ca), i.e., a2+b2+c2ab+bc+caa^2 + b^2 + c^2 \ge ab + bc + ca, which is the classic SOS identity 12((ab)2+(bc)2+(ca)2)0\frac{1}{2}((a - b)^2 + (b - c)^2 + (c - a)^2) \ge 0.

Equality at a=b=ca = b = c.

Two-step pattern: Engel reduces to a polynomial inequality; SOS or direct expansion finishes.

The Recognition Process

When facing an inequality, ask:

  1. Is there a sum of products and a product of sums? That is the standard CS form.
  2. Is there a sum of fractions with squared numerators? The Engel form fits: ai2bi(ai)2bi\sum \frac{a_i^2}{b_i} \ge \frac{(\sum a_i)^2}{\sum b_i} with bi>0b_i > 0.
  3. Is the equality case "vectors proportional"? A strong indicator that CS is the right tool.
  4. Can you write each term as aibia_i b_i for a clever choice of aia_i and bib_i? The trick in many problems is the creative choice of which factors play the roles of aa and bb.
  5. Should you use Holder instead? If the inequality is "more than bilinear" (cubic ratios, mixed exponents), Holder's (aip)1/p(biq)1/qaibi\left(\sum a_i^p\right)^{1/p} \left(\sum b_i^q\right)^{1/q} \ge \sum a_i b_i for 1/p+1/q=11/p + 1/q = 1 is often the extension you need.

Common Mistakes

Watch Out

Forgetting the square

Cauchy-Schwarz is (aibi)2\left(\sum a_i b_i\right)^2 \le \cdots, not aibi\sum a_i b_i \le \cdots. The square matters when the sum of products can be negative. Always check signs before removing the square.

Watch Out

Wrong choice of $a_i$ and $b_i$

The art of using CS is choosing the right pair of sequences. A generic choice usually gives a useless bound. Look at the LHS and RHS of what you want to prove; reverse-engineer what aibia_i b_i products would produce the LHS and what ai2a_i^2 and bi2b_i^2 sums would produce the RHS.

Watch Out

Equality conditions glossed over

The equality case (ai/bia_i / b_i constant) is essential for optimization problems. Many writeups apply CS, get a bound, and forget to check whether equality is achievable in the problem's constraints. If equality cannot be achieved, the bound is not tight.

Watch Out

CS does not always give the tightest bound

For some inequalities, CS gives the right answer; for others, it gives a bound that is strictly weaker than the truth. If CS gives a bound that the problem hypothesis says cannot be achieved, you have not solved the problem. Either CS is the wrong tool or you need a sharper variant (Holder, rearrangement, SOS).

Watch Out

Engel form requires $b_i > 0$

The Engel form ai2bi(ai)2bi\sum \frac{a_i^2}{b_i} \ge \frac{(\sum a_i)^2}{\sum b_i} needs every bi>0b_i > 0. If a bib_i is zero or negative, this form fails (the LHS is undefined or the inequality flips). Verify positivity before applying.

Exercises

ExerciseCore

Problem

For real numbers a,b,ca, b, c, show (a+b+c)23(a2+b2+c2)(a + b + c)^2 \le 3(a^2 + b^2 + c^2).

ExerciseCore

Problem

For positive reals a1,,ana_1, \ldots, a_n, show ai1ain2\sum a_i \cdot \sum \frac{1}{a_i} \ge n^2.

ExerciseAdvanced

Problem

Show that for positive reals a,b,ca, b, c with a+b+c=1a + b + c = 1, 11a+11b+11c92.\frac{1}{1 - a} + \frac{1}{1 - b} + \frac{1}{1 - c} \ge \frac{9}{2}.

Cross-Network Links

  • ProofsPath: am-gm-inequality is the multiplicative cousin; power-mean-inequality generalizes both; jensen-for-convex-functions is the convexity-based generalization; rearrangement-inequality handles cases CS does not.
  • TheoremPath: inner-product-spaces-and-orthogonality is the abstract setting where Cauchy-Schwarz lives in full generality; maximum-likelihood-estimation uses Cauchy-Schwarz in proofs of the Cramer-Rao lower bound; matrix-norms uses CS in the operator-norm submultiplicativity proof.

References

See structured references block. Primary entry points: Steele Cauchy-Schwarz Master Class for the canonical olympiad treatment with dozens of variations and exercises; Hardy-Littlewood-Polya Inequalities Ch 2 for the classical analytic perspective; Engel Ch 7 for contest applications.