In short
The AM-GM inequality says the arithmetic mean of non-negative numbers is at least their geometric mean, with equality when all numbers are equal. It is a powerful tool for finding minimum (or maximum) values without calculus. The Cauchy-Schwarz inequality bounds the dot product of two sequences and has an elegant one-line proof. Weighted means and the power mean inequality generalise both, placing AM, GM, HM, and more exotic means into a single hierarchy.
A farmer has 100 metres of fencing and wants to enclose the largest possible rectangular area. If the rectangle has sides x and y, then 2x + 2y = 100 (the perimeter) and the area is A = xy. From the perimeter constraint, x + y = 50. What is the largest value of xy given that x + y = 50? You could use calculus — set A = x(50 - x), differentiate, find the critical point. But there is a one-line solution using the AM-GM inequality: \frac{x + y}{2} \geq \sqrt{xy}, so 25 \geq \sqrt{xy}, so xy \leq 625. Equality holds when x = y = 25. Maximum area: 625 square metres, achieved by a square.
That is the power of AM-GM: it turns optimization into algebra, no derivatives needed.
AM-GM: the inequality that optimizes
AM-GM inequality
For non-negative real numbers a_1, a_2, \ldots, a_n:
Equality holds if and only if a_1 = a_2 = \cdots = a_n.
The left side is the arithmetic mean (AM) — the average. The right side is the geometric mean (GM) — the nth root of the product. The inequality says: the average is always at least the geometric mean.
For two variables: \frac{a + b}{2} \geq \sqrt{ab}, which rearranges to a + b \geq 2\sqrt{ab}, or equivalently (\sqrt{a} - \sqrt{b})^2 \geq 0. That last form makes the proof obvious — a square is always non-negative.
Why does the perpendicular have height \sqrt{ab}? Place P at distance a from the left end and b from the right end. The perpendicular from P to the semicircle has length h where h^2 = a \cdot b (this is a standard result from the properties of a circle — the product of the two segments of a chord through a point equals the square of the half-chord perpendicular to the diameter). So h = \sqrt{ab}.
Using AM-GM for optimization
The equality condition — a_1 = a_2 = \cdots = a_n — is what makes AM-GM a tool for finding extrema. The strategy:
- Express the quantity you want to optimize as a product.
- Express the constraint as a sum (or vice versa).
- Apply AM-GM to link the sum and product.
- Check that equality is achievable (all variables equal).
Example: minimising a sum given a product. Find the minimum value of x + \frac{1}{x} for x > 0.
By AM-GM: x + \frac{1}{x} \geq 2\sqrt{x \cdot \frac{1}{x}} = 2\sqrt{1} = 2. Equality when x = \frac{1}{x}, i.e., x = 1.
Minimum value: 2, achieved at x = 1.
Example: three variables. Find the minimum of a + b + c given abc = 27 and a, b, c > 0.
By AM-GM: \frac{a + b + c}{3} \geq \sqrt[3]{abc} = \sqrt[3]{27} = 3. So a + b + c \geq 9. Equality when a = b = c = 3.
The Cauchy-Schwarz inequality
Cauchy-Schwarz inequality
For real numbers a_1, a_2, \ldots, a_n and b_1, b_2, \ldots, b_n:
Equality holds if and only if \frac{a_1}{b_1} = \frac{a_2}{b_2} = \cdots = \frac{a_n}{b_n} (or some b_i = 0 with the corresponding a_i = 0).
In compact notation: \left(\sum a_i b_i\right)^2 \leq \left(\sum a_i^2\right)\left(\sum b_i^2\right).
Proof
Consider the quadratic function in t:
Since Q(t) is a sum of squares, Q(t) \geq 0 for all real t. Expanding:
This is a quadratic in t with non-negative values everywhere. A quadratic At^2 + Bt + C \geq 0 for all t precisely when its discriminant is \leq 0:
Substituting A = \sum a_i^2, B = -2\sum a_i b_i, C = \sum b_i^2:
Divide by 4:
That is the Cauchy-Schwarz inequality. Equality holds when Q(t) = 0 for some t, meaning every term (a_i t - b_i)^2 = 0, meaning a_i t = b_i for all i — the sequences are proportional.
A quick application
Suppose a + b + c = 12 and you want a lower bound on a^2 + b^2 + c^2. Apply Cauchy-Schwarz with the sequences (a, b, c) and (1, 1, 1):
Equality when \frac{a}{1} = \frac{b}{1} = \frac{c}{1}, i.e., a = b = c = 4.
Weighted means
The ordinary AM and GM give equal weight to all terms. In many problems, the terms deserve unequal weights.
Weighted AM-GM inequality
For non-negative real numbers a_1, \ldots, a_n and positive weights w_1, \ldots, w_n with w_1 + w_2 + \cdots + w_n = 1:
The left side is the weighted arithmetic mean. The right side is the weighted geometric mean. Equality holds if and only if a_1 = a_2 = \cdots = a_n.
When all weights are equal (w_i = \frac{1}{n}), this reduces to the standard AM-GM.
Example. Find the maximum of x^2 y given x + y = 3, x, y > 0.
Rewrite the constraint to apply weighted AM-GM. The product x^2 y has x appearing twice and y once, suggesting weights \frac{2}{3} and \frac{1}{3}. Split the constraint:
Apply AM-GM to three terms \frac{x}{2}, \frac{x}{2}, y:
So 1 \geq \sqrt[3]{\frac{x^2 y}{4}}, giving x^2 y \leq 4. Equality when \frac{x}{2} = y, i.e., x = 2, y = 1.
The power mean inequality
All the classical means — harmonic, geometric, arithmetic, quadratic — fit into a single family parametrised by a real number r.
Power mean (arithmetic mean of $m$th power)
For positive reals a_1, \ldots, a_n and a real number r \neq 0:
The limiting cases: M_0 = \sqrt[n]{a_1 a_2 \cdots a_n} (geometric mean), M_{-1} = \frac{n}{\frac{1}{a_1} + \cdots + \frac{1}{a_n}} (harmonic mean).
The power mean inequality states: if r < s, then M_r \leq M_s, with equality if and only if all a_i are equal. This gives the familiar chain:
Each mean is a different "average" of the same numbers, and they are ordered from smallest (HM) to largest (QM). The AM-GM inequality is just one link in this chain.
Let us verify for a = 2, b = 8:
- HM = \frac{2}{\frac{1}{2} + \frac{1}{8}} = \frac{2}{\frac{5}{8}} = \frac{16}{5} = 3.2
- GM = \sqrt{2 \cdot 8} = \sqrt{16} = 4
- AM = \frac{2 + 8}{2} = 5
- QM = \sqrt{\frac{4 + 64}{2}} = \sqrt{34} \approx 5.83
Indeed 3.2 < 4 < 5 < 5.83.
Interactive: see how AM and GM respond to unequal inputs
Drag the two points to set the values of a and b. The figure shows AM (arithmetic mean) and GM (geometric mean). Watch the gap between them grow as a and b become more unequal, and shrink to zero when a = b.
Two worked examples
Example 1: Find the minimum of $\frac{(x+3)(x+5)}{x+4}$ for $x > -3$
Step 1. Substitute u = x + 4 (so u > 1). The expression becomes \frac{(u-1)(u+1)}{u} = \frac{u^2 - 1}{u} = u - \frac{1}{u}.
Why: shifting by 4 centres the expression around the denominator, revealing a simpler structure.
Step 2. Since u > 1 > 0, both u and \frac{1}{u} are positive. But we need u - \frac{1}{u}, not u + \frac{1}{u}. Write f(u) = u - \frac{1}{u}.
Why: AM-GM applies to sums of positive terms, but here we have a difference. We need a different approach — or note that f is increasing for u > 0 (since f'(u) = 1 + \frac{1}{u^2} > 0), so the minimum on (1, \infty) is at the left boundary.
Step 3. As u \to 1^+ (i.e., x \to -3^+), f(u) \to 1 - 1 = 0. But u = 1 corresponds to x = -3, which is excluded (since x > -3). So f(u) > 0 for all u > 1, and the infimum is 0 (not achieved).
Step 4. At u = 2 (i.e., x = -2): f(2) = 2 - \frac{1}{2} = \frac{3}{2}. At u = 5 (i.e., x = 1): f(5) = 5 - \frac{1}{5} = \frac{24}{5}. The function is increasing, confirming no interior minimum.
Result: The expression has no minimum on x > -3; it can be made arbitrarily close to 0 but never equals 0. The infimum is 0.
This example shows that AM-GM does not always apply directly. The substitution revealed the structure, but the constraint u > 1 (not u > 0) prevented AM-GM from producing an achievable minimum. Recognising when equality is not achievable is as important as applying the inequality.
Example 2: Prove that $a^2 + b^2 + c^2 \geq ab + bc + ca$ for all real $a, b, c$
Step 1. Rearrange: a^2 + b^2 + c^2 - ab - bc - ca \geq 0.
Why: bringing everything to one side reduces the problem to showing a single expression is non-negative.
Step 2. Multiply both sides by 2: 2a^2 + 2b^2 + 2c^2 - 2ab - 2bc - 2ca \geq 0.
Why: multiplying by 2 (positive) preserves the inequality and allows a clean decomposition into squares.
Step 3. Rewrite as a sum of squares:
Why: each pair contributes one squared difference. This is the core algebraic identity that makes the inequality obvious.
Step 4. Each squared term is \geq 0, so the sum is \geq 0. Equality holds when a - b = 0, b - c = 0, c - a = 0, i.e., a = b = c.
Result: a^2 + b^2 + c^2 \geq ab + bc + ca for all reals, with equality when a = b = c.
The "multiply by 2 and complete the square" trick is a standard technique for proving symmetric inequalities. The resulting sum of squares makes the inequality self-evident — no external theorem needed.
Common confusions
-
"AM-GM works for negative numbers." It does not. The geometric mean \sqrt[n]{a_1 \cdots a_n} is undefined (or complex) when any a_i is negative and n is even. AM-GM requires all terms to be non-negative.
-
"AM-GM gives me the minimum, so I just apply it and I'm done." You must also check the equality condition. If the constraint does not allow all variables to be equal, AM-GM gives a bound that may not be achieved. The minimum might not exist, or it might occur at a boundary.
-
"Cauchy-Schwarz is just AM-GM squared." They are different inequalities with different equality conditions. AM-GM requires all terms equal; Cauchy-Schwarz requires proportional sequences. They are both consequences of the power mean inequality, but neither implies the other in general.
-
"The power mean M_0 is undefined because r = 0 gives division by zero." M_0 is defined as the limiting case r \to 0, which gives the geometric mean. The formula \left(\frac{\sum a_i^r}{n}\right)^{1/r} requires a limit argument, but the result is well-defined: M_0 = \sqrt[n]{a_1 \cdots a_n}.
-
"Weighted AM-GM requires integer weights." The weights can be any positive reals summing to 1. Fractional weights like \frac{1}{3} and \frac{2}{3} are not only allowed but common in optimization problems.
Going deeper
If you can apply AM-GM (with equality condition), state and prove Cauchy-Schwarz, and understand the power mean chain HM \leq GM \leq AM \leq QM, you have the core toolkit of algebraic inequalities. What follows extends these ideas.
Schur's inequality
For non-negative reals a, b, c and t \geq 0:
For t = 1, this becomes a^3 + b^3 + c^3 + abc \geq ab(a+b) + bc(b+c) + ca(c+a), a useful inequality in competition mathematics. The proof uses the same "sum of non-negative terms" strategy as the worked example above.
Jensen's inequality: the general framework
AM-GM and the power mean inequality are both special cases of Jensen's inequality: if f is convex and w_1, \ldots, w_n are positive weights summing to 1, then
Taking f(x) = e^x and x_i = \ln a_i recovers the weighted AM-GM inequality. Taking f(x) = x^2 recovers the QM-AM inequality. Jensen's inequality is the single principle behind all mean inequalities — once you learn it, the entire hierarchy becomes one theorem.
Where this leads next
- AM-GM-HM Inequality — the prerequisite article covering the basic AM-GM-HM chain with proofs for two variables.
- Quadratic Inequalities — the quadratic discriminant condition used in the Cauchy-Schwarz proof.
- Modulus Inequalities — the triangle inequality and its connections to absolute-value reasoning.
- Mathematical Induction — the technique used to prove AM-GM for general n (the forward-backward induction method).
- Quadratic Expression and Function — the discriminant-based argument central to Cauchy-Schwarz.