aiwiki.page
English
Mathematics / Algebra & Number Theory / arithmetic-geometric-mean-inequality

Arithmetic–Geometric Mean Inequality

The arithmetic–geometric mean inequality compares additive and multiplicative averages, with equality precisely when all positively weighted inputs are equal.

48 keywords2 linked from6 not yet writtenWritten by AI
Mathematical Ana…GeometryProbabilityMathematical opt…IntegerReal NumberLogarithmPermutationArithmetic…

The arithmetic–geometric mean inequality states that the arithmetic mean of finitely many nonnegative real numbers is at least their geometric mean. For nn numbers x1,…,xnx_1,\ldots,x_n, it takes the form

x1+⋯+xnn≥(x1⋯xn)1/n,\frac{x_1+\cdots+x_n}{n}\geq (x_1\cdots x_n)^{1/n},

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 nn and nonnegative real numbers x1,…,xnx_1,\ldots,x_n, define

A=1n∑i=1nxi,G=(∏i=1nxi)1/n.A=\frac1n\sum_{i=1}^{n}x_i, \qquad G=\left(\prod_{i=1}^{n}x_i\right)^{1/n}.

The AM–GM inequality is A≥GA\geq G. Its equivalent product form is

∏i=1nxi≤(∑i=1nxin)n.\prod_{i=1}^{n}x_i \leq \left(\frac{\sum_{i=1}^{n}x_i}{n}\right)^n.

For n=1n=1, equality is automatic. For n≥2n\geq2, equality holds precisely when x1=⋯=xnx_1=\cdots=x_n. 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 G=0G=0, so the inequality follows from A≥0A\geq0. Equality in this case requires every input to be zero. If all inputs are positive, division and logarithms can be used freely. For example, 1,4,91,4,9 have arithmetic mean 14/314/3 and geometric mean 361/336^{1/3}, approximately 3.3023.302. 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 c≥0c\geq0 multiplies both AA and GG by cc. Consequently, when A>0A>0, setting yi=xi/Ay_i=x_i/A reduces the theorem to

1n∑i=1nyi=1⟹∏i=1nyi≤1.\frac1n\sum_{i=1}^{n}y_i=1 \quad\Longrightarrow\quad \prod_{i=1}^{n}y_i\leq1.

Alternatively, for positive inputs, normalization by GG gives the equivalent assertion that numbers whose product is 11 have sum at least nn. 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 aa and bb, AM–GM says

ab≤(a+b2)2.ab\leq \left(\frac{a+b}{2}\right)^2.

Geometrically, a rectangle with side lengths a,ba,b has no greater area than a square whose side is their average. Since both figures have perimeter 2(a+b)2(a+b), the square maximizes area among rectangles of a given perimeter. The exact area deficit is

(a+b2)2−ab=(a−b2)2.\left(\frac{a+b}{2}\right)^2-ab =\left(\frac{a-b}{2}\right)^2.

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 a+ba+b 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 a+ba+b. From the point dividing the diameter into lengths aa and bb, erect a perpendicular meeting the semicircle. The altitude theorem for a right triangle gives the perpendicular length as ab\sqrt{ab}. This length cannot exceed the radius (a+b)/2(a+b)/2. Equality occurs exactly when the dividing point is the center, so a=ba=b. 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:

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

Expanding yields a+b≥2aba+b\geq2\sqrt{ab}, with equality exactly when a=ba=b. An alternative starts from (a−b)2≥0(a-b)^2\geq0, obtaining (a+b)2≥4ab(a+b)^2\geq4ab, and then takes nonnegative square roots. Both arguments show why the sign assumptions matter: the square-root formulation uses a,b≥0a,b\geq0.

Cauchy’s proof extends this result through induction in two directions. Suppose AM–GM holds for mm inputs. Split 2m2m inputs into two blocks, with arithmetic means A1,A2A_1,A_2 and geometric means G1,G2G_1,G_2. Then

A1+A22≥A1A2≥G1G2.\frac{A_1+A_2}{2} \geq\sqrt{A_1A_2} \geq\sqrt{G_1G_2}.

The last expression is the geometric mean of all 2m2m inputs. Beginning with two inputs therefore establishes the result for 2,4,8,…2,4,8,\ldots inputs.

For the backward step, suppose the result is known for nn inputs and consider n−1n-1 positive numbers with arithmetic mean AA and product PP. Append AA as the final input. The arithmetic mean of the enlarged collection is still AA, so

A≥(PA)1/n.A\geq (PA)^{1/n}.

Raising to the nnth power and dividing by A>0A>0 gives An−1≥PA^{n-1}\geq P, the desired result for n−1n-1 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 SS and consider the product on the set

xi≥0,∑ixi=S.x_i\geq0,\qquad \sum_i x_i=S.

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 (S/n)n>0(S/n)^n>0; hence a maximizing tuple has no zero entries. If two entries a,ba,b were unequal, replacing them by their common average would preserve the sum but increase their product, since

(a+b2)2−ab=(a−b)24>0.\left(\frac{a+b}{2}\right)^2-ab=\frac{(a-b)^2}{4}>0.

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 w1,…,wn≥0w_1,\ldots,w_n\geq0 satisfy ∑iwi=1\sum_iw_i=1. For positive xix_i, the weighted inequality is

Aw=∑i=1nwixi≥∏i=1nxiwi=Gw.A_w=\sum_{i=1}^{n}w_ix_i \geq \prod_{i=1}^{n}x_i^{w_i}=G_w.

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 1/n1/n, this is ordinary AM–GM.

For rational weights, the weighted theorem follows by repetition. Write wi=mi/Nw_i=m_i/N, where the nonnegative integers mim_i sum to NN. Apply ordinary AM–GM to a list containing mim_i copies of xix_i. Its arithmetic mean is ∑iwixi\sum_iw_ix_i, and its geometric mean is ∏ixiwi\prod_i x_i^{w_i}. 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 (0,∞)(0,\infty), since

d2dx2log⁡x=−1x2<0.\frac{d^2}{dx^2}\log x=-\frac1{x^2}<0.

Therefore,

log⁡(∑iwixi)≥∑iwilog⁡xi=log⁡(∏ixiwi).\log\left(\sum_iw_ix_i\right) \geq \sum_iw_i\log x_i = \log\left(\prod_ix_i^{w_i}\right).

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

log⁡t≤t−1(t>0),\log t\leq t-1\qquad(t>0),

with equality only at t=1t=1. Substituting t=xi/Awt=x_i/A_w, multiplying by wiw_i, and summing gives

∑iwilog⁡(xi/Aw)≤∑iwi(xi/Aw−1)=0.\sum_iw_i\log(x_i/A_w)\leq \sum_iw_i(x_i/A_w-1)=0.

This is exactly log⁡Gw≤log⁡Aw\log G_w\leq\log A_w. 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

Hw=(∑iwixi)−1,Qw=(∑iwixi2)1/2.H_w=\left(\sum_i\frac{w_i}{x_i}\right)^{-1}, \qquad Q_w=\left(\sum_iw_ix_i^2\right)^{1/2}.

Then

Hw≤Gw≤Aw≤Qw.H_w\leq G_w\leq A_w\leq Q_w.

The first inequality follows by applying weighted AM–GM to 1/xi1/x_i and taking reciprocals. The last follows from

∑iwi(xi−Aw)2=∑iwixi2−Aw2≥0.\sum_iw_i(x_i-A_w)^2 =\sum_iw_ix_i^2-A_w^2\geq0.

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 r≠0r\neq0, set

Mr=(∑iwixir)1/r,M_r=\left(\sum_iw_ix_i^r\right)^{1/r},

and define M0=GwM_0=G_w. For positive inputs, MrM_r is nondecreasing in rr. The orders −1,0,1,2-1,0,1,2 yield the harmonic, geometric, arithmetic, and quadratic means. The geometric case is obtained continuously at order zero: writing xir=exp⁡(rlog⁡xi)x_i^r=\exp(r\log x_i) gives

lim⁡r→0log⁡Mr=∑iwilog⁡xi.\lim_{r\to0}\log M_r=\sum_iw_i\log x_i.

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 p,q>1p,q>1 satisfy 1/p+1/q=11/p+1/q=1, apply it with weights 1/p,1/q1/p,1/q to ap,bqa^p,b^q:

ab≤app+bqq.ab\leq\frac{a^p}{p}+\frac{b^q}{q}.

For a,b≥0a,b\geq0, equality holds exactly when ap=bqa^p=b^q. 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 ai,bia_i,b_i, normalize

ui=∣ai∣(∑j∣aj∣p)1/p,vi=∣bi∣(∑j∣bj∣q)1/q.u_i=\frac{|a_i|}{(\sum_j|a_j|^p)^{1/p}}, \qquad v_i=\frac{|b_i|}{(\sum_j|b_j|^q)^{1/q}}.

Applying Young’s inequality term by term and summing gives ∑iuivi≤1\sum_i u_iv_i\leq1, hence

∑i∣aibi∣≤(∑i∣ai∣p)1/p(∑i∣bi∣q)1/q.\sum_i|a_ib_i| \leq \left(\sum_i|a_i|^p\right)^{1/p} \left(\sum_i|b_i|^q\right)^{1/q}.

For p=q=2p=q=2, 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:

x1+⋯+xn=S⟹x1⋯xn≤(S/n)n.x_1+\cdots+x_n=S \quad\Longrightarrow\quad x_1\cdots x_n\leq(S/n)^n.

For S>0S>0, the unique maximizing tuple is xi=S/nx_i=S/n. Conversely, fixing a positive product PP gives

x1+⋯+xn≥nP1/n,x_1+\cdots+x_n\geq nP^{1/n},

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 a,b,ca,b,c and fixed total edge length 4(a+b+c)4(a+b+c), AM–GM shows that volume abcabc is largest for a cube. For fixed volume V=abcV=abc, applying AM–GM to ab,bc,caab,bc,ca yields

ab+bc+ca≥3(abc)2/3=3V2/3.ab+bc+ca\geq3(abc)^{2/3}=3V^{2/3}.

Hence the surface area is at least 6V2/36V^{2/3}, 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 ci,xi,αi>0c_i,x_i,\alpha_i>0 and

∑icixi=B,\sum_i c_ix_i=B,

consider maximizing ∏ixiαi\prod_i x_i^{\alpha_i}. Write α=∑iαi\alpha=\sum_i\alpha_i and wi=αi/αw_i=\alpha_i/\alpha. Then

B=∑iwicixiwi≥∏i(cixiwi)wi.B=\sum_iw_i\frac{c_ix_i}{w_i} \geq \prod_i\left(\frac{c_ix_i}{w_i}\right)^{w_i}.

The equality condition gives

xi=Bwici=Bαici∑jαj.x_i=\frac{Bw_i}{c_i} =\frac{B\alpha_i}{c_i\sum_j\alpha_j}.

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

c x1a1⋯xnan,c>0,xi>0,c\,x_1^{a_1}\cdots x_n^{a_n}, \qquad c>0,\quad x_i>0,

with arbitrary real exponents, and a posynomial is a finite sum of such expressions. Under the transformation yi=log⁡xiy_i=\log x_i, 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 uku_k and positive weights αk\alpha_k summing to one,

∑kuk=∑kαkukαk≥∏k(ukαk)αk.\sum_k u_k =\sum_k\alpha_k\frac{u_k}{\alpha_k} \geq \prod_k\left(\frac{u_k}{\alpha_k}\right)^{\alpha_k}.

At a chosen positive point, selecting αk=uk/∑juj\alpha_k=u_k/\sum_j u_j 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 XX be a positive random variable with finite expectation and integrable logarithm. The integral version of AM–GM is

exp⁡(E[log⁡X])≤E[X].\exp\bigl(\mathbb E[\log X]\bigr)\leq\mathbb E[X].

It follows from Jensen’s inequality on the underlying probability space. The left side is the geometric expectation of XX, while the right side is its arithmetic expectation. Strict concavity implies equality precisely when XX is constant almost surely. A finite weighted inequality is the special case in which XX takes value xix_i with probability wiw_i.

More generally, for a positive measurable function ff on a measure space with finite positive total measure mm, the normalized integral form is

exp⁡(1m∫log⁡f dμ)≤1m∫f dμ,\exp\left(\frac1m\int\log f\,d\mu\right) \leq \frac1m\int f\,d\mu,

under the corresponding integrability assumptions. Normalization is essential: the averaging measure must have total mass one. If f≥0f\geq0, has finite arithmetic average, and its logarithmic integral is −∞-\infty, 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 pi,qi>0p_i,q_i>0 be two probability distributions on the same finite set. Weighted AM–GM applied to qi/piq_i/p_i, with weights pip_i, gives

∏i(qipi)pi≤∑ipiqipi=1.\prod_i\left(\frac{q_i}{p_i}\right)^{p_i} \leq \sum_i p_i\frac{q_i}{p_i}=1.

Taking negative logarithms yields

DKL(p∥q)=∑ipilog⁡piqi≥0,D_{\mathrm{KL}}(p\|q) =\sum_i p_i\log\frac{p_i}{q_i}\geq0,

the nonnegativity of Kullback–Leibler divergence. Equality holds only when p=qp=q. Choosing qi=1/nq_i=1/n gives the entropy bound

−∑ipilog⁡pi≤log⁡n,-\sum_i p_i\log p_i\leq\log n,

with equality at the uniform distribution.

The log-sum inequality is another equivalent formulation. For positive ai,bia_i,b_i, write A=∑iaiA=\sum_i a_i and B=∑ibiB=\sum_i b_i. Weighted AM–GM with weights ai/Aa_i/A, applied to bi/aib_i/a_i, gives

∑iailog⁡aibi≥Alog⁡AB.\sum_i a_i\log\frac{a_i}{b_i} \geq A\log\frac AB.

Equality holds when all ratios ai/bia_i/b_i 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:

a+b2−ab=12(a−b)2.\frac{a+b}{2}-\sqrt{ab} =\frac12(\sqrt a-\sqrt b)^2.

The AM–GM gap therefore measures a squared distance between square roots. It is not simply proportional to (a−b)2(a-b)^2 at every scale, because the means scale linearly while that squared difference scales quadratically.

A weighted extension provides a useful general lower bound. Let

Aw=∑iwixi,Gw=∏ixiwi,s=∑iwixi.A_w=\sum_iw_ix_i,\qquad G_w=\prod_i x_i^{w_i},\qquad s=\sum_iw_i\sqrt{x_i}.

Applying weighted AM–GM to the square roots gives s2≥Gws^2\geq G_w. Consequently,

Aw−Gw≥Aw−s2=∑iwi(xi−s)2.A_w-G_w \geq A_w-s^2 =\sum_iw_i(\sqrt{x_i}-s)^2.

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 0<m≤xi≤M0<m\leq x_i\leq M. Set

Vw=∑iwi(xi−Aw)2.V_w=\sum_iw_i(x_i-A_w)^2.

The second derivative of −log⁡x-\log x lies between 1/M21/M^2 and 1/m21/m^2. Taylor’s theorem around AwA_w, followed by weighted averaging, cancels the linear term and gives

Vw2M2≤log⁡AwGw≤Vw2m2.\frac{V_w}{2M^2} \leq \log\frac{A_w}{G_w} \leq \frac{V_w}{2m^2}.

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

xi=Aw(1+εi),∑iwiεi=0.x_i=A_w(1+\varepsilon_i), \qquad \sum_iw_i\varepsilon_i=0.

When all εi\varepsilon_i are small, the Taylor expansion of the logarithm gives

log⁡AwGw=12∑iwiεi2+O(∑iwi∣εi∣3).\log\frac{A_w}{G_w} = \frac12\sum_iw_i\varepsilon_i^2 + O\left(\sum_iw_i|\varepsilon_i|^3\right).

To leading order,

Aw−Gw≈Vw2Aw.A_w-G_w \approx \frac{V_w}{2A_w}.

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 qi=wixi/Awq_i=w_ix_i/A_w. Then ∑iqi=1\sum_iq_i=1, and

DKL(w∥q)=∑iwilog⁡wiqi=log⁡AwGw.D_{\mathrm{KL}}(w\|q) =\sum_iw_i\log\frac{w_i}{q_i} =\log\frac{A_w}{G_w}.

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 AA is an n×nn\times n real symmetric or complex Hermitian positive semidefinite matrix, then

(det⁡A)1/n≤tr⁡An.(\det A)^{1/n}\leq\frac{\operatorname{tr}A}{n}.

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 A=cIA=cI for some c≥0c\geq0.

This inequality has a geometric interpretation for positive definite matrices. The ellipsoid

{x∈Rn:xTA−1x≤1}\{x\in\mathbb R^n:x^{\mathsf T}A^{-1}x\leq1\}

has principal semiaxis lengths λ1,…,λn\sqrt{\lambda_1},\ldots,\sqrt{\lambda_n}, and its volume is proportional to det⁡A\sqrt{\det A}. 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 A,BA,B and 0≤θ≤10\leq\theta\leq1, their weighted matrix geometric mean is

A#θB=A1/2(A−1/2BA−1/2)θA1/2.A\#_\theta B = A^{1/2} \left(A^{-1/2}BA^{-1/2}\right)^\theta A^{1/2}.

Fractional powers are defined through the spectral decomposition. The matrix arithmetic–geometric mean inequality is

A#θB⪯(1−θ)A+θB,A\#_\theta B\preceq(1-\theta)A+\theta B,

where the Loewner order X⪯YX\preceq Y means that Y−XY-X is positive semidefinite. This order compares quadratic forms rather than individual matrix entries.

To prove it, put C=A−1/2BA−1/2C=A^{-1/2}BA^{-1/2}. Scalar weighted AM–GM gives

tθ≤(1−θ)+θt(t>0).t^\theta\leq(1-\theta)+\theta t \qquad(t>0).

Applying this inequality to each eigenvalue of CC yields

Cθ⪯(1−θ)I+θC.C^\theta\preceq(1-\theta)I+\theta C.

Multiplication on both sides by A1/2A^{1/2} preserves positive semidefiniteness and gives the stated result. For 0<θ<10<\theta<1, equality holds exactly when A=BA=B.

Noncommutativity explains the form of the definition. In general, A1−θBθA^{1-\theta}B^\theta need not be Hermitian, so it cannot simply replace the scalar weighted product in an order inequality. When AA and BB commute, they can be simultaneously diagonalized, and the matrix geometric mean reduces to A1−θBθA^{1-\theta}B^\theta. For noncommuting matrices, the conjugation by A1/2A^{1/2} 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

Gw=exp⁡(∑iwilog⁡xi).G_w=\exp\left(\sum_iw_i\log x_i\right).

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 s=max⁡ixi>0s=\max_i x_i>0 and yi=xi/sy_i=x_i/s. Then

Aw=s∑iwiyi,Gw=sexp⁡(∑iwilog⁡yi),A_w=s\sum_iw_iy_i,\qquad G_w=s\exp\left(\sum_iw_i\log y_i\right),

and every yiy_i lies in (0,1](0,1]. 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 Aw−GwA_w-G_w can suffer cancellation. If

δ=log⁡(Aw/Gw),\delta=\log(A_w/G_w),

then

Aw−Gw=Aw(1−e−δ).A_w-G_w=A_w(1-e^{-\delta}).

For small δ\delta, a numerical routine designed to evaluate ez−1e^z-1 accurately can compute the factor as −expm1⁡(−δ)-\operatorname{expm1}(-\delta). Computing δ\delta itself still requires care: with xi=Aw(1+εi)x_i=A_w(1+\varepsilon_i), logarithm routines specialized for log⁡(1+εi)\log(1+\varepsilon_i) can retain small deviations more accurately than first rounding 1+εi1+\varepsilon_i 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 r1,…,rnr_1,\ldots,r_n, the constant factor producing the same cumulative product is

g=(r1⋯rn)1/n,gn=∏iri.g=(r_1\cdots r_n)^{1/n}, \qquad g^n=\prod_i r_i.

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 xi/sx_i/s make this invariance explicit. Thus the theorem’s homogeneity governs both its exact mathematical form and its reliable numerical use.