Ma · Mathematics

Proofs of the AM-GM Inequality

Published By the 9to5Science editorial team

At a glance

  1. 1. State the inequality

    For nonnegative numbers, their arithmetic mean is at least their geometric mean.

  2. 2. Check two numbers

    The identity (√a − √b)² ≥ 0 proves the two-number case.

  3. 3. Extend to n numbers

    Use concavity of the logarithm or maximize the product at a fixed sum.

  4. 4. Check equality

    Equality holds exactly when all the numbers are equal.

The arithmetic mean–geometric mean inequality (AM-GM) compares the average of nonnegative numbers with the geometric mean of those numbers. It is useful in optimization and in proofs where sums and products appear together.

For a1,…,an≥0a_1,\ldots,a_n\geq 0, the inequality is

a1+⋯+ann≥(a1a2⋯an)1/n.\frac{a_1+\cdots+a_n}{n}\geq (a_1a_2\cdots a_n)^{1/n}.

Equality holds if and only if a1=⋯=ana_1=\cdots=a_n. Here are several ways to prove it, from a one-line argument for two numbers to general proofs for any finite number of terms.

Proof for two numbers

For a,b≥0a,b\geq 0, a square is always nonnegative:

(a−b)2≥0.(\sqrt a-\sqrt b)^2\geq 0.

Expanding and rearranging gives

a+b≥2ab,soa+b2≥ab.a+b\geq 2\sqrt{ab}, \qquad\text{so}\qquad \frac{a+b}{2}\geq\sqrt{ab}.

The square is zero exactly when a=ba=b, which gives the equality condition. This proof is often the quickest way to establish AM-GM for two terms.

Proof by maximizing the product at a fixed sum

Fix a sum S>0S>0 and consider all nonnegative nn-tuples with that sum. This set is closed and bounded, so the product a1a2⋯ana_1a_2\cdots a_n has a maximum on it. The maximum is positive: the choice ai=S/na_i=S/n has positive product. Therefore a maximizing tuple cannot have a zero entry.

Suppose two entries of a maximizing tuple are unequal, say ai≠aja_i\ne a_j. Keep their sum fixed and replace both by their average. Their product changes from aiaja_i a_j to

(ai+aj2)2,\left(\frac{a_i+a_j}{2}\right)^2,

which is larger because

(ai+aj2)2−aiaj=(ai−aj)24>0.\left(\frac{a_i+a_j}{2}\right)^2-a_i a_j =\frac{(a_i-a_j)^2}{4}>0.

The other entries and the total sum do not change, so this replacement increases the full product. That contradicts maximality. Thus all entries at the maximum must be equal, and the maximum product is (S/n)n(S/n)^n.

For any tuple with sum SS, its product is therefore at most (S/n)n(S/n)^n. Taking nonnegative nnth roots gives

(a1a2⋯an)1/n≤Sn,(a_1a_2\cdots a_n)^{1/n}\leq \frac{S}{n},

which is AM-GM. If S=0S=0, every entry is zero and the result is immediate.

Proof using the logarithm

First suppose all ai>0a_i>0. The natural logarithm is concave on the positive real numbers because

(ln⁡x)′′=−1x2<0.(\ln x)''=-\frac{1}{x^2}<0.

The concavity inequality for an average says that the logarithm of the arithmetic mean is at least the mean of the logarithms:

ln⁡(a1+⋯+ann)≥ln⁡a1+⋯+ln⁡ann.\ln\left(\frac{a_1+\cdots+a_n}{n}\right) \geq \frac{\ln a_1+\cdots+\ln a_n}{n}.

The right-hand side equals ln⁡((a1⋯an)1/n)\ln((a_1\cdots a_n)^{1/n}). Since ln⁡\ln is increasing, exponentiating proves AM-GM. Strict concavity shows equality is possible only when all the aia_i are equal.

If some ai=0a_i=0, the geometric mean is zero, while the arithmetic mean is nonnegative, so the inequality holds directly. This handles the cases where the logarithm proof cannot be applied.

Worked example

For 2,8,2,8, and 88, the arithmetic mean is

2+8+83=6,\frac{2+8+8}{3}=6,

while the geometric mean is

(2⋅8⋅8)1/3=1281/3≈5.04.(2\cdot 8\cdot 8)^{1/3}=128^{1/3}\approx 5.04.

Thus 6≥5.046\geq 5.04, as AM-GM predicts. The inequality is strict because the three numbers are not all equal.

Common mistakes

  • Mixing up the two means: The arithmetic mean is a sum divided by the number of terms; the geometric mean is the corresponding product raised to the reciprocal of that number.
  • Forgetting the domain: The standard real-valued statement assumes nonnegative inputs. The logarithm proof specifically requires positive inputs, so handle zero entries separately.
  • Claiming equality too broadly: Equality requires every input to be the same, not merely that some pair of inputs match.
  • Using a mismatched number of terms: For three numbers, for example, the geometric mean is (abc)1/3(abc)^{1/3}, not (abc)1/2(abc)^{1/2}.

Weighted AM-GM

A useful extension assigns nonnegative weights wiw_i whose sum is 11. For positive aia_i, concavity of ln⁡\ln gives

ln⁡(∑i=1nwiai)≥∑i=1nwiln⁡ai,\ln\left(\sum_{i=1}^n w_i a_i\right) \geq \sum_{i=1}^n w_i\ln a_i,

so

∑i=1nwiai≥∏i=1naiwi.\sum_{i=1}^n w_i a_i\geq \prod_{i=1}^n a_i^{w_i}.

The ordinary inequality is the special case wi=1/nw_i=1/n. For positive inputs, equality in the weighted version holds when all inputs with positive weight are equal.

References

  1. Inequalities
  2. A Course of Pure Mathematics

Spotted an error? Send a correction. Read how we write and check articles in our editorial policy.