{
  "id": "arithmetic-geometric-mean-inequality",
  "title": "Arithmetic–Geometric Mean Inequality",
  "lang": "en",
  "source_lang": "en",
  "summary": "The arithmetic–geometric mean inequality compares additive and multiplicative averages, with equality precisely when all positively weighted inputs are equal.",
  "category": "mathematics",
  "subcategory": "algebra",
  "type": "concept",
  "aliases": [
    "AM–GM inequality",
    "AM–GM",
    "arithmetic mean–geometric mean inequality"
  ],
  "generated_at": "2026-11-04",
  "model": "pro/gpt-6.1-sol",
  "url": "https://aiwiki.page/en/arithmetic-geometric-mean-inequality/",
  "translations": {
    "zh-Hans": {
      "url": "https://aiwiki.page/zh/arithmetic-geometric-mean-inequality/",
      "json": "https://aiwiki.page/zh/arithmetic-geometric-mean-inequality.json"
    }
  },
  "sections": [
    {
      "heading": "",
      "text": "The arithmetic–geometric mean inequality states that the arithmetic mean of finitely many nonnegative real numbers is at least their geometric mean. For \\(n\\) numbers \\(x_1,\\ldots,x_n\\), it takes the form\n\n\\[\\frac{x_1+\\cdots+x_n}{n}\\geq (x_1\\cdots x_n)^{1/n},\\]\n\nwith 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.\n\nDespite 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."
    },
    {
      "heading": "Statement, domain, and equality",
      "text": "For a positive integer \\(n\\) and nonnegative real numbers \\(x_1,\\ldots,x_n\\), define\n\n\\[A=\\frac1n\\sum_{i=1}^{n}x_i, \\qquad G=\\left(\\prod_{i=1}^{n}x_i\\right)^{1/n}.\\]\n\nThe AM–GM inequality is \\(A\\geq G\\). Its equivalent product form is\n\n\\[\\prod_{i=1}^{n}x_i \\leq \\left(\\frac{\\sum_{i=1}^{n}x_i}{n}\\right)^n.\\]\n\nFor \\(n=1\\), equality is automatic. For \\(n\\geq2\\), equality holds precisely when \\(x_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.\n\nThe boundary cases require some care but no additional theorem. If at least one input is zero, then \\(G=0\\), so the inequality follows from \\(A\\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,9\\) have arithmetic mean \\(14/3\\) and geometric mean \\(36^{1/3}\\), approximately \\(3.302\\). The strict inequality reflects the unequal values rather than any particular ordering of them.\n\nBoth means are homogeneous of degree one: multiplying every input by \\(c\\geq0\\) multiplies both \\(A\\) and \\(G\\) by \\(c\\). Consequently, when \\(A>0\\), setting \\(y_i=x_i/A\\) reduces the theorem to\n\n\\[\\frac1n\\sum_{i=1}^{n}y_i=1 \\quad\\Longrightarrow\\quad \\prod_{i=1}^{n}y_i\\leq1.\\]\n\nAlternatively, for positive inputs, normalization by \\(G\\) gives the equivalent assertion that numbers whose product is \\(1\\) have sum at least \\(n\\). These normalizations are useful because they separate overall scale from variation among the inputs.\n\nThe 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."
    },
    {
      "heading": "Geometric origins and historical development",
      "text": "For two nonnegative numbers \\(a\\) and \\(b\\), AM–GM says\n\n\\[ab\\leq \\left(\\frac{a+b}{2}\\right)^2.\\]\n\nGeometrically, a rectangle with side lengths \\(a,b\\) has no greater area than a square whose side is their average. Since both figures have perimeter \\(2(a+b)\\), the square maximizes area among rectangles of a given perimeter. The exact area deficit is\n\n\\[\\left(\\frac{a+b}{2}\\right)^2-ab =\\left(\\frac{a-b}{2}\\right)^2.\\]\n\nThus the geometric statement already contains both the inequality and its equality condition.\n\nA closely related identity appears in Book II, Proposition 5, of Euclid’s Elements. In modern notation, if a segment of length \\(a+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.\n\nAnother construction uses a semicircle with diameter \\(a+b\\). From the point dividing the diameter into lengths \\(a\\) and \\(b\\), erect a perpendicular meeting the semicircle. The altitude theorem for a right triangle gives the perpendicular length as \\(\\sqrt{ab}\\). This length cannot exceed the radius \\((a+b)/2\\). Equality occurs exactly when the dividing point is the center, so \\(a=b\\). The construction makes the geometric mean visible as a length, not merely as a root of a product.\n\nThe 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."
    },
    {
      "heading": "Elementary proofs and the role of equalization",
      "text": "For two inputs, the standard proof begins with a nonnegative square:\n\n\\[(\\sqrt a-\\sqrt b)^2\\geq0.\\]\n\nExpanding yields \\(a+b\\geq2\\sqrt{ab}\\), with equality exactly when \\(a=b\\). An alternative starts from \\((a-b)^2\\geq0\\), obtaining \\((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\\geq0\\).\n\nCauchy’s proof extends this result through induction in two directions. Suppose AM–GM holds for \\(m\\) inputs. Split \\(2m\\) inputs into two blocks, with arithmetic means \\(A_1,A_2\\) and geometric means \\(G_1,G_2\\). Then\n\n\\[\\frac{A_1+A_2}{2} \\geq\\sqrt{A_1A_2} \\geq\\sqrt{G_1G_2}.\\]\n\nThe last expression is the geometric mean of all \\(2m\\) inputs. Beginning with two inputs therefore establishes the result for \\(2,4,8,\\ldots\\) inputs.\n\nFor the backward step, suppose the result is known for \\(n\\) inputs and consider \\(n-1\\) positive numbers with arithmetic mean \\(A\\) and product \\(P\\). Append \\(A\\) as the final input. The arithmetic mean of the enlarged collection is still \\(A\\), so\n\n\\[A\\geq (PA)^{1/n}.\\]\n\nRaising to the \\(n\\)th power and dividing by \\(A>0\\) gives \\(A^{n-1}\\geq P\\), the desired result for \\(n-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.\n\nA different proof makes equalization explicit. Fix a positive sum \\(S\\) and consider the product on the set\n\n\\[x_i\\geq0,\\qquad \\sum_i x_i=S.\\]\n\nThis 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\\); hence a maximizing tuple has no zero entries. If two entries \\(a,b\\) were unequal, replacing them by their common average would preserve the sum but increase their product, since\n\n\\[\\left(\\frac{a+b}{2}\\right)^2-ab=\\frac{(a-b)^2}{4}>0.\\]\n\nThe 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."
    },
    {
      "heading": "Weighted AM–GM, logarithms, and convexity",
      "text": "Let \\(w_1,\\ldots,w_n\\geq0\\) satisfy \\(\\sum_iw_i=1\\). For positive \\(x_i\\), the weighted inequality is\n\n\\[A_w=\\sum_{i=1}^{n}w_ix_i \\geq \\prod_{i=1}^{n}x_i^{w_i}=G_w.\\]\n\nTerms 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/n\\), this is ordinary AM–GM.\n\nFor rational weights, the weighted theorem follows by repetition. Write \\(w_i=m_i/N\\), where the nonnegative integers \\(m_i\\) sum to \\(N\\). Apply ordinary AM–GM to a list containing \\(m_i\\) copies of \\(x_i\\). Its arithmetic mean is \\(\\sum_iw_ix_i\\), and its geometric mean is \\(\\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.\n\nThe most compact analytic proof uses Jensen’s inequality. The natural logarithm is strictly concave on \\((0,\\infty)\\), since\n\n\\[\\frac{d^2}{dx^2}\\log x=-\\frac1{x^2}<0.\\]\n\nTherefore,\n\n\\[\\log\\left(\\sum_iw_ix_i\\right) \\geq \\sum_iw_i\\log x_i = \\log\\left(\\prod_ix_i^{w_i}\\right).\\]\n\nApplying 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.\n\nA related proof uses the tangent-line inequality\n\n\\[\\log t\\leq t-1\\qquad(t>0),\\]\n\nwith equality only at \\(t=1\\). Substituting \\(t=x_i/A_w\\), multiplying by \\(w_i\\), and summing gives\n\n\\[\\sum_iw_i\\log(x_i/A_w)\\leq \\sum_iw_i(x_i/A_w-1)=0.\\]\n\nThis is exactly \\(\\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."
    },
    {
      "heading": "The hierarchy of means and related inequalities",
      "text": "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\n\n\\[H_w=\\left(\\sum_i\\frac{w_i}{x_i}\\right)^{-1}, \\qquad Q_w=\\left(\\sum_iw_ix_i^2\\right)^{1/2}.\\]\n\nThen\n\n\\[H_w\\leq G_w\\leq A_w\\leq Q_w.\\]\n\nThe first inequality follows by applying weighted AM–GM to \\(1/x_i\\) and taking reciprocals. The last follows from\n\n\\[\\sum_iw_i(x_i-A_w)^2 =\\sum_iw_ix_i^2-A_w^2\\geq0.\\]\n\nThus 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.\n\nThese comparisons are instances of the power mean inequality. For \\(r\\neq0\\), set\n\n\\[M_r=\\left(\\sum_iw_ix_i^r\\right)^{1/r},\\]\n\nand define \\(M_0=G_w\\). For positive inputs, \\(M_r\\) is nondecreasing in \\(r\\). The orders \\(-1,0,1,2\\) yield the harmonic, geometric, arithmetic, and quadratic means. The geometric case is obtained continuously at order zero: writing \\(x_i^r=\\exp(r\\log x_i)\\) gives\n\n\\[\\lim_{r\\to0}\\log M_r=\\sum_iw_i\\log x_i.\\]\n\nThis limiting construction explains why the geometric mean appears between means defined by negative and positive powers.\n\nWeighted AM–GM also gives Young’s inequality for products. If \\(p,q>1\\) satisfy \\(1/p+1/q=1\\), apply it with weights \\(1/p,1/q\\) to \\(a^p,b^q\\):\n\n\\[ab\\leq\\frac{a^p}{p}+\\frac{b^q}{q}.\\]\n\nFor \\(a,b\\geq0\\), equality holds exactly when \\(a^p=b^q\\). This form separates a product into additive terms with conjugate exponents, making it useful in estimates involving integrals and differential equations.\n\nYoung’s inequality leads directly to Hölder’s inequality. For nonzero finite sequences \\(a_i,b_i\\), normalize\n\n\\[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}}.\\]\n\nApplying Young’s inequality term by term and summing gives \\(\\sum_i u_iv_i\\leq1\\), hence\n\n\\[\\sum_i|a_ib_i| \\leq \\left(\\sum_i|a_i|^p\\right)^{1/p} \\left(\\sum_i|b_i|^q\\right)^{1/q}.\\]\n\nFor \\(p=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."
    },
    {
      "heading": "Optimization and geometric programming",
      "text": "The most direct optimization consequence is the fixed-sum product bound:\n\n\\[x_1+\\cdots+x_n=S \\quad\\Longrightarrow\\quad x_1\\cdots x_n\\leq(S/n)^n.\\]\n\nFor \\(S>0\\), the unique maximizing tuple is \\(x_i=S/n\\). Conversely, fixing a positive product \\(P\\) gives\n\n\\[x_1+\\cdots+x_n\\geq nP^{1/n},\\]\n\nagain with equality only at equal inputs. These are global statements: no examination of local critical points is needed.\n\nFor a rectangular box with side lengths \\(a,b,c\\) and fixed total edge length \\(4(a+b+c)\\), AM–GM shows that volume \\(abc\\) is largest for a cube. For fixed volume \\(V=abc\\), applying AM–GM to \\(ab,bc,ca\\) yields\n\n\\[ab+bc+ca\\geq3(abc)^{2/3}=3V^{2/3}.\\]\n\nHence the surface area is at least \\(6V^{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.\n\nWeighted AM–GM handles unequal resource requirements. If \\(c_i,x_i,\\alpha_i>0\\) and\n\n\\[\\sum_i c_ix_i=B,\\]\n\nconsider maximizing \\(\\prod_i x_i^{\\alpha_i}\\). Write \\(\\alpha=\\sum_i\\alpha_i\\) and \\(w_i=\\alpha_i/\\alpha\\). Then\n\n\\[B=\\sum_iw_i\\frac{c_ix_i}{w_i} \\geq \\prod_i\\left(\\frac{c_ix_i}{w_i}\\right)^{w_i}.\\]\n\nThe equality condition gives\n\n\\[x_i=\\frac{Bw_i}{c_i} =\\frac{B\\alpha_i}{c_i\\sum_j\\alpha_j}.\\]\n\nThis 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.\n\nA broader computational setting is geometric programming. Here a monomial has the form\n\n\\[c\\,x_1^{a_1}\\cdots x_n^{a_n}, \\qquad c>0,\\quad x_i>0,\\]\n\nwith arbitrary real exponents, and a posynomial is a finite sum of such expressions. Under the transformation \\(y_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.\n\nAM–GM supplies useful monomial lower bounds for these sums. For positive terms \\(u_k\\) and positive weights \\(\\alpha_k\\) summing to one,\n\n\\[\\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}.\\]\n\nAt a chosen positive point, selecting \\(\\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."
    },
    {
      "heading": "Probability, integral forms, and entropy",
      "text": "Let \\(X\\) be a positive random variable with finite expectation and integrable logarithm. The integral version of AM–GM is\n\n\\[\\exp\\bigl(\\mathbb E[\\log X]\\bigr)\\leq\\mathbb E[X].\\]\n\nIt follows from Jensen’s inequality on the underlying probability space. The left side is the geometric expectation of \\(X\\), while the right side is its arithmetic expectation. Strict concavity implies equality precisely when \\(X\\) is constant almost surely. A finite weighted inequality is the special case in which \\(X\\) takes value \\(x_i\\) with probability \\(w_i\\).\n\nMore generally, for a positive measurable function \\(f\\) on a measure space with finite positive total measure \\(m\\), the normalized integral form is\n\n\\[\\exp\\left(\\frac1m\\int\\log f\\,d\\mu\\right) \\leq \\frac1m\\int f\\,d\\mu,\\]\n\nunder the corresponding integrability assumptions. Normalization is essential: the averaging measure must have total mass one. If \\(f\\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.\n\nThe connection with information theory is especially explicit. Let \\(p_i,q_i>0\\) be two probability distributions on the same finite set. Weighted AM–GM applied to \\(q_i/p_i\\), with weights \\(p_i\\), gives\n\n\\[\\prod_i\\left(\\frac{q_i}{p_i}\\right)^{p_i} \\leq \\sum_i p_i\\frac{q_i}{p_i}=1.\\]\n\nTaking negative logarithms yields\n\n\\[D_{\\mathrm{KL}}(p\\|q) =\\sum_i p_i\\log\\frac{p_i}{q_i}\\geq0,\\]\n\nthe nonnegativity of Kullback–Leibler divergence. Equality holds only when \\(p=q\\). Choosing \\(q_i=1/n\\) gives the entropy bound\n\n\\[-\\sum_i p_i\\log p_i\\leq\\log n,\\]\n\nwith equality at the uniform distribution.\n\nThe log-sum inequality is another equivalent formulation. For positive \\(a_i,b_i\\), write \\(A=\\sum_i a_i\\) and \\(B=\\sum_i b_i\\). Weighted AM–GM with weights \\(a_i/A\\), applied to \\(b_i/a_i\\), gives\n\n\\[\\sum_i a_i\\log\\frac{a_i}{b_i} \\geq A\\log\\frac AB.\\]\n\nEquality holds when all ratios \\(a_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."
    },
    {
      "heading": "Quantitative refinements and stability",
      "text": "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:\n\n\\[\\frac{a+b}{2}-\\sqrt{ab} =\\frac12(\\sqrt a-\\sqrt b)^2.\\]\n\nThe AM–GM gap therefore measures a squared distance between square roots. It is not simply proportional to \\((a-b)^2\\) at every scale, because the means scale linearly while that squared difference scales quadratically.\n\nA weighted extension provides a useful general lower bound. Let\n\n\\[A_w=\\sum_iw_ix_i,\\qquad G_w=\\prod_i x_i^{w_i},\\qquad s=\\sum_iw_i\\sqrt{x_i}.\\]\n\nApplying weighted AM–GM to the square roots gives \\(s^2\\geq G_w\\). Consequently,\n\n\\[A_w-G_w \\geq A_w-s^2 =\\sum_iw_i(\\sqrt{x_i}-s)^2.\\]\n\nThe 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.\n\nSharper comparisons with ordinary variance are available when every input lies in a fixed interval \\(0<m\\leq x_i\\leq M\\). Set\n\n\\[V_w=\\sum_iw_i(x_i-A_w)^2.\\]\n\nThe second derivative of \\(-\\log x\\) lies between \\(1/M^2\\) and \\(1/m^2\\). Taylor’s theorem around \\(A_w\\), followed by weighted averaging, cancels the linear term and gives\n\n\\[\\frac{V_w}{2M^2} \\leq \\log\\frac{A_w}{G_w} \\leq \\frac{V_w}{2m^2}.\\]\n\nThus, 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.\n\nThe local behavior is particularly transparent after normalization. Write\n\n\\[x_i=A_w(1+\\varepsilon_i), \\qquad \\sum_iw_i\\varepsilon_i=0.\\]\n\nWhen all \\(\\varepsilon_i\\) are small, the Taylor expansion of the logarithm gives\n\n\\[\\log\\frac{A_w}{G_w} = \\frac12\\sum_iw_i\\varepsilon_i^2 + O\\left(\\sum_iw_i|\\varepsilon_i|^3\\right).\\]\n\nTo leading order,\n\n\\[A_w-G_w \\approx \\frac{V_w}{2A_w}.\\]\n\nThis explains why the gap is second order near equality: first-order changes cancel because the weighted mean is fixed.\n\nThere is also an exact information-theoretic expression. For positive weights and inputs, define \\(q_i=w_ix_i/A_w\\). Then \\(\\sum_iq_i=1\\), and\n\n\\[D_{\\mathrm{KL}}(w\\|q) =\\sum_iw_i\\log\\frac{w_i}{q_i} =\\log\\frac{A_w}{G_w}.\\]\n\nThe 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."
    },
    {
      "heading": "Matrix and operator extensions",
      "text": "For a positive semidefinite matrix, the scalar inequality applies to its nonnegative eigenvalues. If \\(A\\) is an \\(n\\times n\\) real symmetric or complex Hermitian positive semidefinite matrix, then\n\n\\[(\\det A)^{1/n}\\leq\\frac{\\operatorname{tr}A}{n}.\\]\n\nHere 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=cI\\) for some \\(c\\geq0\\).\n\nThis inequality has a geometric interpretation for positive definite matrices. The ellipsoid\n\n\\[\\{x\\in\\mathbb R^n:x^{\\mathsf T}A^{-1}x\\leq1\\}\\]\n\nhas principal semiaxis lengths \\(\\sqrt{\\lambda_1},\\ldots,\\sqrt{\\lambda_n}\\), and its volume is proportional to \\(\\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.\n\nA different extension compares matrices themselves. For positive definite \\(A,B\\) and \\(0\\leq\\theta\\leq1\\), their weighted matrix geometric mean is\n\n\\[A\\#_\\theta B = A^{1/2} \\left(A^{-1/2}BA^{-1/2}\\right)^\\theta A^{1/2}.\\]\n\nFractional powers are defined through the spectral decomposition. The matrix arithmetic–geometric mean inequality is\n\n\\[A\\#_\\theta B\\preceq(1-\\theta)A+\\theta B,\\]\n\nwhere the Loewner order \\(X\\preceq Y\\) means that \\(Y-X\\) is positive semidefinite. This order compares quadratic forms rather than individual matrix entries.\n\nTo prove it, put \\(C=A^{-1/2}BA^{-1/2}\\). Scalar weighted AM–GM gives\n\n\\[t^\\theta\\leq(1-\\theta)+\\theta t \\qquad(t>0).\\]\n\nApplying this inequality to each eigenvalue of \\(C\\) yields\n\n\\[C^\\theta\\preceq(1-\\theta)I+\\theta C.\\]\n\nMultiplication on both sides by \\(A^{1/2}\\) preserves positive semidefiniteness and gives the stated result. For \\(0<\\theta<1\\), equality holds exactly when \\(A=B\\).\n\nNoncommutativity explains the form of the definition. In general, \\(A^{1-\\theta}B^\\theta\\) need not be Hermitian, so it cannot simply replace the scalar weighted product in an order inequality. When \\(A\\) and \\(B\\) commute, they can be simultaneously diagonalized, and the matrix geometric mean reduces to \\(A^{1-\\theta}B^\\theta\\). For noncommuting matrices, the conjugation by \\(A^{1/2}\\) provides a positive definite, coordinate-compatible construction that still retains the scalar comparison."
    },
    {
      "heading": "Numerical evaluation and practical interpretation",
      "text": "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\n\n\\[G_w=\\exp\\left(\\sum_iw_i\\log x_i\\right).\\]\n\nThis 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.\n\nThe 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_i x_i>0\\) and \\(y_i=x_i/s\\). Then\n\n\\[A_w=s\\sum_iw_iy_i,\\qquad G_w=s\\exp\\left(\\sum_iw_i\\log y_i\\right),\\]\n\nand every \\(y_i\\) lies in \\((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.\n\nNear equality, the subtraction \\(A_w-G_w\\) can suffer cancellation. If\n\n\\[\\delta=\\log(A_w/G_w),\\]\n\nthen\n\n\\[A_w-G_w=A_w(1-e^{-\\delta}).\\]\n\nFor small \\(\\delta\\), a numerical routine designed to evaluate \\(e^z-1\\) accurately can compute the factor as \\(-\\operatorname{expm1}(-\\delta)\\). Computing \\(\\delta\\) itself still requires care: with \\(x_i=A_w(1+\\varepsilon_i)\\), logarithm routines specialized for \\(\\log(1+\\varepsilon_i)\\) can retain small deviations more accurately than first rounding \\(1+\\varepsilon_i\\) and then applying a general logarithm. These issues concern numerical stability, not exceptions to the exact inequality.\n\nInterpretation 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 \\(r_1,\\ldots,r_n\\), the constant factor producing the same cumulative product is\n\n\\[g=(r_1\\cdots r_n)^{1/n}, \\qquad g^n=\\prod_i r_i.\\]\n\nAM–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.\n\nWhen 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 \\(x_i/s\\) make this invariance explicit. Thus the theorem’s homogeneity governs both its exact mathematical form and its reliable numerical use."
    }
  ],
  "links": [
    "mathematical-analysis",
    "geometry",
    "probability",
    "mathematical-optimization",
    "integer",
    "real-number",
    "logarithm",
    "permutation",
    "euclids-elements",
    "right-triangle",
    "augustin-louis-cauchy",
    "mathematical-proof",
    "mathematical-induction",
    "euclidean-space",
    "extreme-value-theorem",
    "jensens-inequality",
    "natural-logarithm",
    "exponential-function",
    "harmonic-mean",
    "variance",
    "youngs-inequality",
    "holders-inequality",
    "cauchy-schwarz-inequality",
    "lagrange-multipliers",
    "convex-optimization",
    "random-variable",
    "expected-value",
    "probability-space",
    "almost-surely",
    "information-theory",
    "probability-distribution",
    "kullback-leibler-divergence",
    "information-entropy",
    "derivative",
    "taylor-series",
    "matrix",
    "eigenvalues-and-eigenvectors",
    "determinant",
    "matrix-trace",
    "spectral-theorem",
    "floating-point-arithmetic",
    "numerical-stability"
  ],
  "sources": [],
  "license": "https://creativecommons.org/licenses/by/4.0/"
}