In mathematics, the inequality of arithmetic and geometric means, or more briefly the AM–GM inequality, states that the arithmetic mean of a list of non-negative real numbers is greater than or equal to the geometric mean of the same list; and further, that the two means are equal if and only if every number in the list is the same (in which case they are both that number). The simplest non-trivial case is for two non-negative numbers x and y, that is,
x + y 2 ≥ x y {\displaystyle {\frac {x+y}{2}}\geq {\sqrt {xy}}}
with equality if and only if x = y. This follows from the fact that the square of a real number is always non-negative (greater than or equal to zero) and from the identity (a ± b)2 = a2 ± 2ab + b2:
0 ≤ ( x − y ) 2 = x 2 − 2 x y + y 2 = x 2 + 2 x y + y 2 − 4 x y = ( x + y ) 2 − 4 x y . {\displaystyle {\begin{aligned}0&\leq (x-y)^{2}\\&=x^{2}-2xy+y^{2}\\&=x^{2}+2xy+y^{2}-4xy\\&=(x+y)^{2}-4xy.\end{aligned}}}
Hence (x + y)2 ≥ 4xy, with equality when (x − y)2 = 0, i.e. x = y. The AM–GM inequality then follows from taking the positive square root of both sides and then dividing both sides by 2. For a geometrical interpretation, consider a rectangle with sides of length x and y; it has perimeter 2x + 2y and area xy. Similarly, a square with all sides of length √xy has the perimeter 4√xy and the same area as the rectangle. The simplest non-trivial case of the AM–GM inequality implies for the perimeters that 2x + 2y ≥ 4√xy and that only the square has the smallest perimeter amongst all rectangles of equal area. The simplest case is implicit in Euclid's Elements, Book V, Proposition 25. Extensions of the AM–GM inequality treat weighted means and generalized means.
Background The arithmetic mean, or less precisely the average, of a list of n numbers x1, x2, . . . , xn is the sum of the numbers divided by n:
x 1 + x 2 + ⋯ + x n n . {\displaystyle {\frac {x_{1}+x_{2}+\cdots +x_{n}}{n}}.}
The geometric mean is similar, except that it is only defined for a list of nonnegative real numbers, and uses multiplication and a root in place of addition and division:
x 1 ⋅ x 2 ⋯ x n n . {\displaystyle {\sqrt[{n}]{x_{1}\cdot x_{2}\cdots x_{n}}}.}
If x1, x2, . . . , xn > 0, this is equal to the exponential of the arithmetic mean of the natural logarithms of the numbers:
exp ( ln x 1 + ln x 2 + ⋯ + ln x n n ) . {\displaystyle \exp \left({\frac {\ln {x_{1}}+\ln {x_{2}}+\cdots +\ln {x_{n}}}{n}}\right).}
The inequality Restating the inequality using mathematical notation, we have that for any list of n nonnegative real numbers x1, x2, . . . , xn,
x 1 + x 2 + ⋯ + x n n ≥ x 1 ⋅ x 2 ⋯ x n n , {\displaystyle {\frac {x_{1}+x_{2}+\cdots +x_{n}}{n}}\geq {\sqrt[{n}]{x_{1}\cdot x_{2}\cdots x_{n}}}\,,}
and that equality holds if and only if x1 = x2 = · · · = xn.
Geometric interpretation In two dimensions, 2x1 + 2x2 is the perimeter of a rectangle with sides of length x1 and x2. Similarly, 4√x1x2 is the perimeter of a square with the same area, x1x2, as that rectangle. Thus for n = 2 the AM–GM inequality states that a rectangle of a given area has the smallest perimeter if that rectangle is also a square. The full inequality is an extension of this idea to n dimensions. Consider an n-dimensional box with edge lengths x1, x2, . . . , xn. Every vertex of the box is connected to n edges of different directions, so the average length of edges incident to the vertex is (x1 + x2 + · · · + xn)/n. On the other hand, x 1 x 2 ⋯ x n n {\displaystyle {\sqrt[{n}]{x_{1}x_{2}\cdots x_{n}}}} is the edge length of an n-dimensional cube of equal volume, which therefore is also the average length of edges incident to a vertex of the cube. Thus the AM–GM inequality states that only the n-cube has the smallest average length of edges connected to each vertex amongst all n-dimensional boxes with the same volume.
Examples
Example 1 If a , b , c > 0 {\displaystyle a,b,c>0} , then the AM-GM inequality tells us that
( 1 + a ) ( 1 + b ) ( 1 + c ) ≥ 2 1 ⋅ a ⋅ 2 1 ⋅ b ⋅ 2 1 ⋅ c = 8 a b c {\displaystyle (1+a)(1+b)(1+c)\geq 2{\sqrt {1\cdot {a}}}\cdot 2{\sqrt {1\cdot {b}}}\cdot 2{\sqrt {1\cdot {c}}}=8{\sqrt {abc}}}
Example 2 A simple upper bound for n ! {\displaystyle n!} can be found. AM-GM tells us
1 + 2 + ⋯ + n ≥ n n ! n {\displaystyle 1+2+\dots +n\geq n{\sqrt[{n}]{n!}}}
n ( n + 1 ) 2 ≥ n n ! n {\displaystyle {\frac {n(n+1)}{2}}\geq n{\sqrt[{n}]{n!}}}
and so
( n + 1 2 ) n ≥ n ! {\displaystyle \left({\frac {n+1}{2}}\right)^{n}\geq n!}
with equality at n = 1 {\displaystyle n=1} . Equivalently,
( n + 1 ) n ≥ 2 n n ! {\displaystyle (n+1)^{n}\geq 2^{n}n!}
Example 3 Consider the function
f ( x , y , z ) = x y + y z + z x 3 {\displaystyle f(x,y,z)={\frac {x}{y}}+{\sqrt {\frac {y}{z}}}+{\sqrt[{3}]{\frac {z}{x}}}}
for all positive real numbers x, y and z. Suppose we wish to find the minimal value of this function. It can be rewritten as:
f ( x , y , z ) = 6 ⋅ x y + 1 2 y z + 1 2 y z + 1 3 z x 3 + 1 3 z x 3 + 1 3 z x 3 6 = 6 ⋅ x 1 + x 2 + x 3 + x 4 + x 5 + x 6 6 {\displaystyle {\begin{aligned}f(x,y,z)&=6\cdot {\frac {{\frac {x}{y}}+{\frac {1}{2}}{\sqrt {\frac {y}{z}}}+{\frac {1}{2}}{\sqrt {\frac {y}{z}}}+{\frac {1}{3}}{\sqrt[{3}]{\frac {z}{x}}}+{\frac {1}{3}}{\sqrt[{3}]{\frac {z}{x}}}+{\frac {1}{3}}{\sqrt[{3}]{\frac {z}{x}}}}{6}}\\&=6\cdot {\frac {x_{1}+x_{2}+x_{3}+x_{4}+x_{5}+x_{6}}{6}}\end{aligned}}}
with
x 1 = x y , x 2 = x 3 = 1 2 y z , x 4 = x 5 = x 6 = 1 3 z x 3 . {\displaystyle x_{1}={\frac {x}{y}},\qquad x_{2}=x_{3}={\frac {1}{2}}{\sqrt {\frac {y}{z}}},\qquad x_{4}=x_{5}=x_{6}={\frac {1}{3}}{\sqrt[{3}]{\frac {z}{x}}}.}
Applying the AM–GM inequality for n = 6, we get
f ( x , y , z ) ≥ 6 ⋅ x y ⋅ 1 2 y z ⋅ 1 2 y z ⋅ 1 3 z x 3 ⋅ 1 3 z x 3 ⋅ 1 3 z x 3 6 = 6 ⋅ 1 2 ⋅ 2 ⋅ 3 ⋅ 3 ⋅ 3 x y y z z x 6 = 2 2 / 3 ⋅ 3 1 / 2 . {\displaystyle {\begin{aligned}f(x,y,z)&\geq 6\cdot {\sqrt[{6}]{{\frac {x}{y}}\cdot {\frac {1}{2}}{\sqrt {\frac {y}{z}}}\cdot {\frac {1}{2}}{\sqrt {\frac {y}{z}}}\cdot {\frac {1}{3}}{\sqrt[{3}]{\frac {z}{x}}}\cdot {\frac {1}{3}}{\sqrt[{3}]{\frac {z}{x}}}\cdot {\frac {1}{3}}{\sqrt[{3}]{\frac {z}{x}}}}}\\&=6\cdot {\sqrt[{6}]{{\frac {1}{2\cdot 2\cdot 3\cdot 3\cdot 3}}{\frac {x}{y}}{\frac {y}{z}}{\frac {z}{x}}}}\\&=2^{2/3}\cdot 3^{1/2}.\end{aligned}}}
Further, we know that the two sides are equal exactly when all the terms of the mean are equal:
f ( x , y , z ) = 2 2 / 3 ⋅ 3 1 / 2 when x y = 1 2 y z = 1 3 z x 3 . {\displaystyle f(x,y,z)=2^{2/3}\cdot 3^{1/2}\quad {\mbox{when}}\quad {\frac {x}{y}}={\frac {1}{2}}{\sqrt {\frac {y}{z}}}={\frac {1}{3}}{\sqrt[{3}]{\frac {z}{x}}}.}
All the points (x, y, z) satisfying these conditions lie on a half-line starting at the origin and are given by
( x , y , z ) = ( t , 2 3 3 t , 3 3 2 t ) with t > 0. {\displaystyle (x,y,z)={\biggr (}t,{\sqrt[{3}]{2}}{\sqrt {3}}\,t,{\frac {3{\sqrt {3}}}{2}}\,t{\biggr )}\quad {\mbox{with}}\quad t>0.}
Applications
Cauchy-Schwarz inequality The AM-GM equality can be used to prove the Cauchy–Schwarz inequality.
Annualized returns In financial mathematics, the AM-GM inequality shows that the annualized return, the geometric mean, is less than the average annual return, the arithmetic mean.
Graph theory In graph theory, the AM-GM inequality can be used to prove that the number of vertices of a bipartite graph on n {\displaystyle n} vertices is bounded from above by n 2 4 {\displaystyle {\frac {n^{2}}{4}}} . The vertices of a bipartite graph with n {\displaystyle n} vertices may be divided into two classes A {\displaystyle A} and B {\displaystyle B} . Since we can only draw edges between vertices in one class to another, the maximum number of vertices is given by | A | | B | {\displaystyle |A||B|} . By the AM-GM inequality, we can bound | A | | B | {\displaystyle |A||B|} from above like so:
| A | | B | ≤ ( | A | + | B | 2 ) 2 ≤ n 2 4 {\displaystyle |A||B|\leq ({\frac {|A|+|B|}{2}})^{2}\leq {\frac {n^{2}}{4}}}
Nonnegative polynomials The Motzkin polynomial x 4 y 2 + x 2 y 4 − 3 x 2 y 2 + 1 {\displaystyle x^{4}y^{2}+x^{2}y^{4}-3x^{2}y^{2}+1} is a nonnegative polynomial which is not a sum of square polynomials. It can be proven nonnegative using the AM-GM inequality with x 1 = x 4 y 2 {\displaystyle x_{1}=x^{4}y^{2}} , x 2 = x 2 y 4 {\displaystyle x_{2}=x^{2}y^{4}} , and x 3 = 1 {\displaystyle x_{3}=1} , that is, ( x 4 y 2 ) ⋅ ( x 2 y 4 ) ⋅ ( 1 ) 3 ≤ ( x 4 y 2 ) + ( x 2 y 4 ) + ( 1 ) 3 . {\displaystyle {\sqrt[{3}]{(x^{4}y^{2})\cdot (x^{2}y^{4})\cdot (1)}}\leq {{(x^{4}y^{2})+(x^{2}y^{4})+(1)} \over {3}}.} Simplifying and multiplying both sides by 3 gives 3 x 2 y 2 ≤ x 4 y 2 + x 2 y 4 + 1 , {\displaystyle {3x^{2}y^{2}}\leq {x^{4}y^{2}+x^{2}y^{4}+1},} so 0 ≤ x 4 y 2 + x 2 y 4 − 3 x 2 y 2 + 1 . {\displaystyle {0\leq x^{4}y^{2}+x^{2}y^{4}-3x^{2}y^{2}+1}.}
Proofs of the AM–GM inequality The AM–GM inequality can be proven in many ways.
Proof using Jensen's inequality Jensen's inequality states that the value of a concave function of an arithmetic mean is greater than or equal to the arithmetic mean of the function's values. Since the logarithm function is concave, we have
log ( ∑ x i n ) ≥ 1 n ∑ log x i = 1 n log ( ∏ x i ) = log ( ( ∏ x i ) 1 / n ) . {\displaystyle \log \left({\frac {\sum x_{i}}{n}}\right)\geq {\frac {1}{n}}\sum \log x_{i}={\frac {1}{n}}\log \left(\prod x_{i}\right)=\log \left(\left(\prod x_{i}\right)^{1/n}\right).}
Taking antilogs (the exponential) of the far left and far right sides, we have the AM–GM inequality.
Proof by successive replacement of elements We have to show that
α = x 1 + x 2 + ⋯ + x n n ≥ x 1 x 2 ⋯ x n n = β {\displaystyle \alpha ={\frac {x_{1}+x_{2}+\cdots +x_{n}}{n}}\geq {\sqrt[{n}]{x_{1}x_{2}\cdots x_{n}}}=\beta }
with equality only when all numbers are equal. If not all numbers are equal, then there exist x i , x j {\displaystyle x_{i},x_{j}} such that x i < α < x j {\displaystyle x_{i}<\alpha <x_{j}} . Replacing xi by α {\displaystyle \alpha } and xj by ( x i + x j − α ) {\displaystyle (x_{i}+x_{j}-\alpha )} will leave the arithmetic mean of the numbers unchanged, but will increase the geometric mean because
α ( x j + x i − α ) − x i x j = ( α − x i ) ( x j − α ) > 0 {\displaystyle \alpha (x_{j}+x_{i}-\alpha )-x_{i}x_{j}=(\alpha -x_{i})(x_{j}-\alpha )>0}
If the numbers are still not equal, we continue replacing numbers as above. After at most ( n − 1 ) {\displaystyle (n-1)} such replacement steps all the numbers will have been replaced with α {\displaystyle \alpha } while the geometric mean strictly increases at each step. After the last step, the geometric mean will be α α ⋯ α n = α {\displaystyle {\sqrt[{n}]{\alpha \alpha \cdots \alpha }}=\alpha } , proving the inequality. It may be noted that the replacement strategy works just as well from the right hand side. If any of the numbers is 0 then so will the geometric mean thus proving the inequality trivially. Therefore we may suppose that all the numbers are positive. If they are not all equal, then there exist x i , x j {\displaystyle x_{i},x_{j}} such that 0 < x i < β < x j {\displaystyle 0<x_{i}<\beta <x_{j}} . Replacing x i {\displaystyle x_{i}} by β {\displaystyle \beta } and x j {\displaystyle x_{j}} by x i x j β {\displaystyle {\frac {x_{i}x_{j}}{\beta }}} leaves the geometric mean unchanged but strictly decreases the arithmetic mean since
x i + x j − β − x i x j β = ( β − x i ) ( x j − β ) β > 0 {\displaystyle x_{i}+x_{j}-\beta -{\frac {x_{i}x_{j}}{\beta }}={\frac {(\beta -x_{i})(x_{j}-\beta )}{\beta }}>0} . The proof then follows along similar lines as in the earlier replacement.
Induction p
