The arithmetic–geometric mean inequality states that the arithmetic mean of finitely many nonnegative real numbers is at least their geometric mean. For numbers , it takes the form
with equality if and only if all the numbers are equal. It expresses a basic relationship between addition and multiplication: among collections with a fixed sum, the product is largest when the entries are equal.
Despite its elementary statement, the inequality is a central tool in mathematical analysis, geometry, probability, and optimization. Its weighted form connects directly with concavity, logarithms, and entropy. Its proofs range from rearranging a square to general arguments about convex functions, while its extensions include comparisons among other means, integral inequalities, and inequalities for positive definite matrices.
Statement, domain, and equality
For a positive integer and nonnegative real numbers , define
The AM–GM inequality is . Its equivalent product form is
For , equality is automatic. For , equality holds precisely when . Nonnegativity is essential: arbitrary negative inputs do not support the same statement, even when a real root of the product happens to exist.
The boundary cases require some care but no additional theorem. If at least one input is zero, then , so the inequality follows from . Equality in this case requires every input to be zero. If all inputs are positive, division and logarithms can be used freely. For example, have arithmetic mean and geometric mean , approximately . The strict inequality reflects the unequal values rather than any particular ordering of them.
Both means are homogeneous of degree one: multiplying every input by multiplies both and by . Consequently, when , setting reduces the theorem to
Alternatively, for positive inputs, normalization by gives the equivalent assertion that numbers whose product is have sum at least . These normalizations are useful because they separate overall scale from variation among the inputs.
The inequality is symmetric under permutations of the inputs. It concerns a fixed collection of numbers, not a statistical assumption about how they were obtained. It also compares two means, rather than defining the arithmetic–geometric mean iteration, a different construction that repeatedly replaces a pair by its arithmetic and geometric means. Although that iteration uses the same two operations, its convergence and applications are separate topics.
Geometric origins and historical development
For two nonnegative numbers and , AM–GM says
Geometrically, a rectangle with side lengths has no greater area than a square whose side is their average. Since both figures have perimeter , the square maximizes area among rectangles of a given perimeter. The exact area deficit is
Thus the geometric statement already contains both the inequality and its equality condition.
A closely related identity appears in Book II, Proposition 5, of Euclid’s Elements. In modern notation, if a segment of length is divided equally and unequally, the rectangle on the unequal parts, together with a square measuring the displacement from the midpoint, equals the square on half the whole segment. Translating that geometric construction into algebra gives the displayed identity. It is therefore an ancient geometric antecedent of the two-variable inequality, rather than a statement of the full modern weighted theorem.
Another construction uses a semicircle with diameter . From the point dividing the diameter into lengths and , erect a perpendicular meeting the semicircle. The altitude theorem for a right triangle gives the perpendicular length as . This length cannot exceed the radius . Equality occurs exactly when the dividing point is the center, so . The construction makes the geometric mean visible as a length, not merely as a root of a product.
The passage from two quantities to arbitrarily many is a separate logical step. A particularly influential proof appears in Augustin-Louis Cauchy’s Cours d’analyse of 1821. It establishes the inequality for powers of two and then descends to every smaller number of terms. This approach is often called forward–backward induction or Cauchy induction. In the twentieth century, works such as G. H. Hardy, J. E. Littlewood, and George Pólya’s Inequalities, first published in 1934, placed AM–GM within a systematic theory of means, convexity, and related inequalities. Modern treatments accordingly present it both as an elementary geometric fact and as a special instance of a broader analytic principle.
Elementary proofs and the role of equalization
For two inputs, the standard proof begins with a nonnegative square:
Expanding yields , with equality exactly when . An alternative starts from , obtaining , and then takes nonnegative square roots. Both arguments show why the sign assumptions matter: the square-root formulation uses .
Cauchy’s proof extends this result through induction in two directions. Suppose AM–GM holds for inputs. Split inputs into two blocks, with arithmetic means and geometric means . Then
The last expression is the geometric mean of all inputs. Beginning with two inputs therefore establishes the result for inputs.
For the backward step, suppose the result is known for inputs and consider positive numbers with arithmetic mean and product . Append as the final input. The arithmetic mean of the enlarged collection is still , so
Raising to the th power and dividing by gives , the desired result for inputs. Every positive integer lies below a power of two, so the forward and backward steps cover all finite collections. Zero inputs can be handled separately. Tracking equality through these steps shows that all original inputs must coincide.
A different proof makes equalization explicit. Fix a positive sum and consider the product on the set
This is a closed, bounded subset of finite-dimensional Euclidean space, so the continuous product attains a maximum by the extreme value theorem. Its maximum is positive because the equal tuple has product ; hence a maximizing tuple has no zero entries. If two entries were unequal, replacing them by their common average would preserve the sum but increase their product, since
The remaining positive factors preserve this increase. Thus every maximizing tuple is equal, proving the inequality and its sharp equality condition. This argument captures a general optimization principle: under a fixed additive constraint, balancing positive factors increases their product.
Weighted AM–GM, logarithms, and convexity
Let satisfy . For positive , the weighted inequality is
Terms with zero weight may simply be omitted. Equality holds if and only if all inputs with positive weight are equal. Nonnegative inputs are allowed by continuity, with a zero input carrying positive weight making the geometric mean zero. When every weight is , this is ordinary AM–GM.
For rational weights, the weighted theorem follows by repetition. Write , where the nonnegative integers sum to . Apply ordinary AM–GM to a list containing copies of . Its arithmetic mean is , and its geometric mean is . General real weights follow by approximating the weights with rational ones and using continuity. This derivation explains weights as relative multiplicities, while the limiting argument extends the interpretation beyond literal counts.
The most compact analytic proof uses Jensen’s inequality. The natural logarithm is strictly concave on , since
Therefore,
Applying the increasing exponential function gives weighted AM–GM. Strict concavity supplies the equality condition. In this form, the theorem states that taking an average before applying the logarithm produces a value at least as large as averaging the logarithms.
A related proof uses the tangent-line inequality
with equality only at . Substituting , multiplying by , and summing gives
This is exactly . Conversely, two-variable weighted AM–GM for all weights asserts the defining concavity inequality for the logarithm. The connection is therefore an equivalence, not merely a convenient proof technique. It also explains why logarithmic transformations are so effective in multiplicative optimization: products become sums, while their relation to additive averages is controlled by concavity.
The hierarchy of means and related inequalities
AM–GM occupies the middle of a larger hierarchy. For positive inputs and weights summing to one, define the harmonic mean and quadratic mean by
Then
The first inequality follows by applying weighted AM–GM to and taking reciprocals. The last follows from
Thus the arithmetic–quadratic comparison is also the nonnegativity of a weighted variance. Each equality, after zero-weight entries are removed, requires all inputs to be equal.
These comparisons are instances of the power mean inequality. For , set
and define . For positive inputs, is nondecreasing in . The orders yield the harmonic, geometric, arithmetic, and quadratic means. The geometric case is obtained continuously at order zero: writing gives
This limiting construction explains why the geometric mean appears between means defined by negative and positive powers.
Weighted AM–GM also gives Young’s inequality for products. If satisfy , apply it with weights to :
For , equality holds exactly when . This form separates a product into additive terms with conjugate exponents, making it useful in estimates involving integrals and differential equations.
Young’s inequality leads directly to Hölder’s inequality. For nonzero finite sequences , normalize
Applying Young’s inequality term by term and summing gives , hence
For , this is the familiar finite-dimensional Cauchy–Schwarz inequality. AM–GM is therefore connected not only to other averages but also to basic bounds governing products in normed spaces.
Optimization and geometric programming
The most direct optimization consequence is the fixed-sum product bound:
For , the unique maximizing tuple is . Conversely, fixing a positive product gives
again with equality only at equal inputs. These are global statements: no examination of local critical points is needed.
For a rectangular box with side lengths and fixed total edge length , AM–GM shows that volume is largest for a cube. For fixed volume , applying AM–GM to yields
Hence the surface area is at least , with equality for a cube. The geometric constraint determines which quantities should enter the inequality: side lengths for a fixed edge sum, but face areas for a fixed volume.
Weighted AM–GM handles unequal resource requirements. If and
consider maximizing . Write and . Then
The equality condition gives
This supplies the exact global optimum, including the correct allocation proportions. Maximizing the logarithm of the objective and using Lagrange multipliers leads to the same equations, but AM–GM also provides a direct certificate of the bound.
A broader computational setting is geometric programming. Here a monomial has the form
with arbitrary real exponents, and a posynomial is a finite sum of such expressions. Under the transformation , a monomial becomes the exponential of an affine function. Taking the logarithm of a posynomial produces a log-sum-exp function, which is convex. Standard geometric programs thereby become problems in convex optimization.
AM–GM supplies useful monomial lower bounds for these sums. For positive terms and positive weights summing to one,
At a chosen positive point, selecting makes the bound exact there. Such bounds underlie approximation and duality arguments in multiplicative optimization; their usefulness depends on preserving the direction of the inequality when they replace a sum.
Probability, integral forms, and entropy
Let be a positive random variable with finite expectation and integrable logarithm. The integral version of AM–GM is
It follows from Jensen’s inequality on the underlying probability space. The left side is the geometric expectation of , while the right side is its arithmetic expectation. Strict concavity implies equality precisely when is constant almost surely. A finite weighted inequality is the special case in which takes value with probability .
More generally, for a positive measurable function on a measure space with finite positive total measure , the normalized integral form is
under the corresponding integrability assumptions. Normalization is essential: the averaging measure must have total mass one. If , has finite arithmetic average, and its logarithmic integral is , the geometric average may be defined as zero, so the inequality still holds. This convention captures the effect of sufficiently strong concentration near zero.
The connection with information theory is especially explicit. Let be two probability distributions on the same finite set. Weighted AM–GM applied to , with weights , gives
Taking negative logarithms yields
the nonnegativity of Kullback–Leibler divergence. Equality holds only when . Choosing gives the entropy bound
with equality at the uniform distribution.
The log-sum inequality is another equivalent formulation. For positive , write and . Weighted AM–GM with weights , applied to , gives
Equality holds when all ratios are equal. Unlike a termwise bound, this controls a sum of logarithmic ratios by the corresponding aggregated quantities. It is used to establish convexity and information-loss properties of divergence. The finite inequality thus extends naturally to averaging over distributions and to comparisons between distributions themselves.
Quantitative refinements and stability
The equality condition says that the means coincide only for equal inputs. A stability estimate asks a stronger question: if the means are close, how nearly equal must the inputs be? For two numbers there is an exact answer:
The AM–GM gap therefore measures a squared distance between square roots. It is not simply proportional to at every scale, because the means scale linearly while that squared difference scales quadratically.
A weighted extension provides a useful general lower bound. Let
Applying weighted AM–GM to the square roots gives . Consequently,
The right side is the weighted variance of the square roots. This bound holds for nonnegative inputs, with the usual convention of omitting zero weights, and gives a direct quantitative measure of dispersion without requiring a positive lower bound on the inputs.
Sharper comparisons with ordinary variance are available when every input lies in a fixed interval . Set
The second derivative of lies between and . Taylor’s theorem around , followed by weighted averaging, cancels the linear term and gives
Thus, on a fixed positive interval, the logarithmic AM–GM gap is comparable to variance. The lower-bound assumption is important: logarithms become singular near zero, and a tiny input can substantially depress the geometric mean.
The local behavior is particularly transparent after normalization. Write
When all are small, the Taylor expansion of the logarithm gives
To leading order,
This explains why the gap is second order near equality: first-order changes cancel because the weighted mean is fixed.
There is also an exact information-theoretic expression. For positive weights and inputs, define . Then , and
The logarithmic gap is therefore precisely a divergence between the original weights and weights reallocated in proportion to input size. Equal inputs leave the weights unchanged; unequal inputs redistribute their mass.
Matrix and operator extensions
For a positive semidefinite matrix, the scalar inequality applies to its nonnegative eigenvalues. If is an real symmetric or complex Hermitian positive semidefinite matrix, then
Here the determinant is the product of the eigenvalues, while the trace is their sum. The spectral theorem therefore reduces the result directly to scalar AM–GM. Equality holds exactly when every eigenvalue is equal, equivalently when for some .
This inequality has a geometric interpretation for positive definite matrices. The ellipsoid
has principal semiaxis lengths , and its volume is proportional to . A fixed trace fixes the sum of squared semiaxis lengths. The determinant bound says that volume is largest when all semiaxes are equal, so the ellipsoid is a ball. This is a higher-dimensional analogue of the rectangle-and-square comparison, although the fixed geometric quantity is now a sum of squared lengths.
A different extension compares matrices themselves. For positive definite and , their weighted matrix geometric mean is
Fractional powers are defined through the spectral decomposition. The matrix arithmetic–geometric mean inequality is
where the Loewner order means that is positive semidefinite. This order compares quadratic forms rather than individual matrix entries.
To prove it, put . Scalar weighted AM–GM gives
Applying this inequality to each eigenvalue of yields
Multiplication on both sides by preserves positive semidefiniteness and gives the stated result. For , equality holds exactly when .
Noncommutativity explains the form of the definition. In general, need not be Hermitian, so it cannot simply replace the scalar weighted product in an order inequality. When and commute, they can be simultaneously diagonalized, and the matrix geometric mean reduces to . For noncommuting matrices, the conjugation by provides a positive definite, coordinate-compatible construction that still retains the scalar comparison.
Numerical evaluation and practical interpretation
Directly computing a geometric mean as a product followed by a root can be unreliable in floating-point arithmetic. A product of many moderate numbers may overflow or underflow even when its geometric mean is representable. For positive inputs, the usual alternative is
This avoids forming the full product. Zero inputs with positive weights must be handled separately, because their geometric mean is zero and their logarithms are not finite. Inputs with zero weight should be omitted before evaluation.
The arithmetic mean can also overflow if a large sum is formed before division. Scaling offers a simple way to evaluate and compare the means. Let and . Then
and every lies in . Comparing the normalized means removes the common scale. Accurate summation remains important when there are many terms or highly unequal weights; logarithmic evaluation addresses range problems but does not eliminate rounding error.
Near equality, the subtraction can suffer cancellation. If
then
For small , a numerical routine designed to evaluate accurately can compute the factor as . Computing itself still requires care: with , logarithm routines specialized for can retain small deviations more accurately than first rounding and then applying a general logarithm. These issues concern numerical stability, not exceptions to the exact inequality.
Interpretation also depends on how the quantities combine. An arithmetic mean describes an additive average. A geometric mean describes an average multiplicative factor: for positive factors , the constant factor producing the same cumulative product is
AM–GM states that this equivalent constant factor does not exceed the arithmetic average of the factors. It does not assert that one mean is universally preferable; each answers a different question.
When inputs represent physical quantities, they must be commensurable for their arithmetic mean to be meaningful. A change of units then rescales both means by the same positive factor, leaving their comparison unchanged. For logarithmic calculations, dimensionless ratios such as make this invariance explicit. Thus the theorem’s homogeneity governs both its exact mathematical form and its reliable numerical use.