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:

\frac{a_1 + a_2 + \cdots + a_n}{n} \geq \sqrt[n]{a_1 \cdot a_2 \cdots 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.

Visual proof that AM is at least GM for two numbersA semicircle construction. A diameter has segments of length a and b. The arithmetic mean (a+b)/2 is the radius, and the geometric mean sqrt(ab) is the height of the perpendicular from the junction point to the semicircle. The radius is always at least the height. midpoint P a b √ab (a+b)/2 The radius (AM) always reaches the top of the semicircle. The chord height (GM) can never exceed it.
A semicircle with diameter $a + b$. The radius is $\frac{a+b}{2}$ (the AM). The perpendicular from $P$ to the semicircle has height $\sqrt{ab}$ (the GM). Since the perpendicular can never exceed the radius, $\text{AM} \geq \text{GM}$.

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:

  1. Express the quantity you want to optimize as a product.
  2. Express the constraint as a sum (or vice versa).
  3. Apply AM-GM to link the sum and product.
  4. 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.

Graph of f(x) = x + 1/x showing the minimum at x = 1A coordinate plane with the graph of y = x + 1/x for x greater than 0. The curve has a minimum at the point (1, 2). A horizontal dashed line at y = 2 shows the minimum value. The curve approaches infinity as x approaches 0 from the right and as x approaches infinity. x y 0 1 2 3 2 min = 2 at x = 1 y = 2 (AM-GM bound)
The graph of $f(x) = x + \frac{1}{x}$ for $x > 0$. The minimum is $2$, achieved at $x = 1$, exactly as AM-GM predicts. The dashed line $y = 2$ is the AM-GM lower bound.

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:

(a_1 b_1 + a_2 b_2 + \cdots + a_n b_n)^2 \leq (a_1^2 + a_2^2 + \cdots + a_n^2)(b_1^2 + b_2^2 + \cdots + b_n^2)

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:

Q(t) = \sum_{i=1}^{n} (a_i t - b_i)^2

Since Q(t) is a sum of squares, Q(t) \geq 0 for all real t. Expanding:

Q(t) = \left(\sum a_i^2\right) t^2 - 2\left(\sum a_i b_i\right) t + \left(\sum b_i^2\right)

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:

B^2 - 4AC \leq 0

Substituting A = \sum a_i^2, B = -2\sum a_i b_i, C = \sum b_i^2:

4\left(\sum a_i b_i\right)^2 - 4\left(\sum a_i^2\right)\left(\sum b_i^2\right) \leq 0

Divide by 4:

\left(\sum a_i b_i\right)^2 \leq \left(\sum a_i^2\right)\left(\sum b_i^2\right)

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.

Cauchy-Schwarz proof via a non-negative quadraticA parabola Q(t) that opens upward and lies entirely above the t-axis. The discriminant condition forces the parabola to have no real roots (or touch the axis at one point for equality). The minimum value of Q(t) is non-negative. t Q(t) discriminant ≤ 0 Q(t) ≥ 0 for all t Q(t) = Σ(aᵢt − bᵢ)² equality case: Q touches axis aᵢ/bᵢ = const.
The solid parabola represents $Q(t)$ in the general case — it stays above the $t$-axis, which forces the Cauchy-Schwarz inequality. The dashed parabola touches the axis at one point — the equality case, when all $a_i/b_i$ ratios are equal.

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):

(a \cdot 1 + b \cdot 1 + c \cdot 1)^2 \leq (a^2 + b^2 + c^2)(1^2 + 1^2 + 1^2)
144 \leq 3(a^2 + b^2 + c^2)
a^2 + b^2 + c^2 \geq 48

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:

w_1 a_1 + w_2 a_2 + \cdots + w_n a_n \geq a_1^{w_1} a_2^{w_2} \cdots a_n^{w_n}

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:

3 = x + y = \frac{x}{2} + \frac{x}{2} + y

Apply AM-GM to three terms \frac{x}{2}, \frac{x}{2}, y:

\frac{\frac{x}{2} + \frac{x}{2} + y}{3} \geq \sqrt[3]{\frac{x}{2} \cdot \frac{x}{2} \cdot y} = \sqrt[3]{\frac{x^2 y}{4}}

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.

Graph showing x^2*y subject to x + y = 3A curve plotting x^2*y as a function of x for x between 0 and 3 (with y = 3 - x). The curve starts at 0, rises to a maximum of 4 at x = 2, then returns to 0 at x = 3. x x²y 0 1 2 3 4 max = 4 at x = 2
The graph of $x^2(3-x)$ for $x \in [0, 3]$. The maximum value is $4$, achieved at $x = 2$ (and $y = 1$). AM-GM finds this maximum without differentiation.

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:

M_r = \left(\frac{a_1^r + a_2^r + \cdots + a_n^r}{n}\right)^{1/r}

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:

\text{HM} = M_{-1} \leq M_0 = \text{GM} \leq M_1 = \text{AM} \leq M_2 = \text{QM}

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.

The mean inequality chain: HM ≤ GM ≤ AM ≤ QMFour points on a number line representing HM, GM, AM, and QM for the numbers 2 and 8. HM = 3.2, GM = 4, AM = 5, QM = approximately 5.83. Arrows connect them showing the inequality chain. Mean inequality chain for a = 2, b = 8 0 1 2 3 4 5 6 7 HM 16/5 = 3.2 GM 4 AM 5 QM √34 ≈ 5.83 All four means coincide (= 5) when a = b = 5
For $a = 2$ and $b = 8$: HM $= \frac{16}{5} = 3.2$, GM $= 4$, AM $= 5$, QM $= \sqrt{34} \approx 5.83$. The inequality chain HM $\leq$ GM $\leq$ AM $\leq$ QM always holds. When $a = b$, all four means collapse to the same value.

Let us verify for a = 2, b = 8:

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.

Interactive AM-GM comparison with two draggable valuesA number line with two draggable points representing values a and b. The arithmetic mean and geometric mean are shown as markers between them. As the points move apart, the gap between AM and GM grows. 0 10 ↔ drag the red points
Drag $a$ and $b$ along the number line. When $a = b$, AM and GM are equal. As $a$ and $b$ separate, AM stays fixed at the midpoint while GM drops — the more unequal the inputs, the larger the AM-GM gap.

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.

Graph of (x+3)(x+5)/(x+4) for x greater than -3A coordinate plane showing the curve y = (x+3)(x+5)/(x+4) for x greater than -3. The curve starts near 0 at x = -3 and increases without bound. A dashed horizontal line at y = 0 represents the infimum. x y −3 −2 −1 0 infimum = 0 (not achieved) curve approaches y = 0 as x → −3⁺
The graph of $\frac{(x+3)(x+5)}{x+4}$ for $x > -3$. The function approaches $0$ as $x \to -3^+$ but never reaches it. There is no minimum — only an infimum of $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:

2a^2 + 2b^2 + 2c^2 - 2ab - 2bc - 2ca = (a^2 - 2ab + b^2) + (b^2 - 2bc + c^2) + (c^2 - 2ca + a^2)
= (a - b)^2 + (b - c)^2 + (c - a)^2

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 identity 2(a^2+b^2+c^2) - 2(ab+bc+ca) = (a-b)^2 + (b-c)^2 + (c-a)^2Three boxes representing the three squared terms (a-b)^2, (b-c)^2, and (c-a)^2, each labelled as non-negative. Their sum equals 2 times the left-hand side of the inequality. Below, a verification with a=1, b=2, c=4 showing 1 + 4 + 9 = 14 which is non-negative. 2(a² + b² + c²) − 2(ab + bc + ca) = sum of squares (a − b)² ≥ 0 (b − c)² ≥ 0 (c − a)² ≥ 0 + + Sum ≥ 0, so a² + b² + c² ≥ ab + bc + ca Check: a = 1, b = 2, c = 4 (1−2)² + (2−4)² + (4−1)² = 1 + 4 + 9 = 14 ≥ 0 ✓ LHS = 21, RHS = 14. Indeed 21 ≥ 14.
The key identity: $2(a^2 + b^2 + c^2 - ab - bc - ca) = (a-b)^2 + (b-c)^2 + (c-a)^2$. Since each square is non-negative, the inequality follows. The verification with $a = 1, b = 2, c = 4$ gives $21 \geq 14$.

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

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:

a^t(a-b)(a-c) + b^t(b-a)(b-c) + c^t(c-a)(c-b) \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

f(w_1 x_1 + \cdots + w_n x_n) \leq w_1 f(x_1) + \cdots + w_n f(x_n)

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