# Inequality of arithmetic and geometric means

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.

The simplest non-trivial case — i.e., with more than one variable — for two non-negative numbers Template:Mvar and Template:Mvar, is the statement that

with equality if and only if *x* = *y*.
This case can be seen from the fact that the square of a real number is always non-negative (greater than or equal to zero) and from the elementary case (*a* ± *b*)^{2} = *a*^{2} ± 2*ab* + *b*^{2} of the binomial formula:

In other words (*x* + *y*)^{2} ≥ 4*xy*, with equality precisely when (*x* − *y*)^{2} = 0, i.e. *x* = *y*. For a geometrical interpretation, consider a rectangle with sides of length Template:Mvar and Template:Mvar, hence it has perimeter 2*x* + 2*y* and area Template:Mvar. Similarly, a square with all sides of length Template:Radical has the perimeter 4Template:Radical and the same area as the rectangle. The simplest non-trivial case of the AM–GM inequality implies for the perimeters that 2*x* + 2*y* ≥ 4Template:Radical and that only the square has the smallest perimeter amongst all rectangles of equal area.

The general AM–GM inequality corresponds to the fact that the natural logarithm, which converts multiplication to addition, is a strictly concave function; using Jensen's inequality the general proof of the inequality follows.

Extensions of the AM–GM inequality are available to include weights or generalized means.

## Background

The *arithmetic mean*, or less precisely the *average*, of a list of Template:Mvar numbers *x*_{1}, *x*_{2}, . . . , *x _{n}* is the sum of the numbers divided by Template:Mvar:

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:

If *x*_{1}, *x*_{2}, . . . , *x _{n}* > 0, this is equal to the exponential of the arithmetic mean of the natural logarithms of the numbers:

## The inequality

Restating the inequality using mathematical notation, we have that for any list of Template:Mvar nonnegative real numbers *x*_{1}, *x*_{2}, . . . , *x _{n}*,

and that equality holds if and only if
*x*_{1} = *x*_{2} = · · · = *x _{n}*.

## Geometric interpretation

In two dimensions, 2*x*_{1} + 2*x*_{2} is the perimeter of a rectangle with sides of length *x*_{1} and *x*_{2}. Similarly, 4Template:Radical is the perimeter of a square with the same area. Thus for *n* = 2 the AM–GM inequality states that only the square has the smallest perimeter amongst all rectangles of equal area.

The full inequality is an extension of this idea to Template:Mvar dimensions. Every vertex of an Template:Mvar-dimensional box is connected to Template:Mvar edges. If these edges' lengths are *x*_{1}, *x*_{2}, . . . , *x _{n}*, then

*x*

_{1}+

*x*

_{2}+ · · · +

*x*is the total length of edges incident to the vertex. There are 2

_{n}^{n}vertices, so we multiply this by 2

^{n}; since each edge, however, meets two vertices, every edge is counted twice. Therefore we divide by 2 and conclude that there are 2

^{n−1}

*n*edges. There are equally many edges of each length and Template:Mvar lengths; hence there are 2

^{n−1}edges of each length and the total edge-length is 2

^{n−1}(

*x*

_{1}+

*x*

_{2}+ · · · +

*x*). On the other hand,

_{n}is the total length of edges connected to a vertex on an Template:Mvar-dimensional cube of equal volume. Since the inequality says

we get

with equality if and only if
*x*_{1} = *x*_{2} = · · · = *x _{n}*.

Thus the AM–GM inequality states that only the [[Hypercube|Template:Mvar-cube]] has the smallest sum of lengths of edges connected to each vertex amongst all Template:Mvar-dimensional boxes with the same volume.^{[1]}

## Example application

Consider the function

for all positive real numbers Template:Mvar, Template:Mvar and Template:Mvar. Suppose we wish to find the minimal value of this function. First we rewrite it a bit:

with

Applying the AM–GM inequality for *n* = 6, we get

Further, we know that the two sides are equal exactly when all the terms of the mean are equal:

All the points (*x*, *y*, *z*) satisfying these conditions lie on a half-line starting at the origin and are given by

## Practical applications

An important practical application in financial mathematics is to computing the rate of return: the annualized return, computed via the geometric mean, is less than the average annual return, computed by the arithmetic mean (or equal if all returns are equal). This is important in analyzing investments, as the average return overstates the cumulative effect.

## Proofs of the AM–GM inequality

There are several ways to prove the AM–GM inequality; for example, it can be inferred from Jensen's inequality, using the concave function ln(Template:Mvar). It can also be proven using the rearrangement inequality. Considering length and required prerequisites, the elementary proof by induction given below is probably the best recommendation for first reading.

### Idea of the first two proofs

We have to show that

with equality only when all numbers are equal. If *x _{i}* ≠

*x*, then replacing both Template:Mvar and Template:Mvar by (

_{j}*x*+

_{i}*x*)/2 will leave the arithmetic mean on the left-hand side unchanged, but will increase the geometric mean on the right-hand side because

_{j}Thus right-hand side will be largest — so the idea — when all Template:Mvars are equal to the arithmetic mean

thus as this is then the largest value of right-hand side of the expression, we have

This is a valid proof for the case *n* = 2, but the procedure of taking iteratively pairwise averages may fail to produce Template:Mvar equal numbers in the case *n* ≥ 3. An example of this case is *x*_{1} = *x*_{2} ≠ *x*_{3}: Averaging two different numbers produces two equal numbers, but the third one is still different. Therefore, we never actually get an inequality involving the geometric mean of three equal numbers.

Hence, an additional trick or a modified argument is necessary to turn the above idea into a valid proof for the case *n* ≥ 3.

### Proof by induction

With the arithmetic mean

of the non-negative real numbers *x*_{1}, . . . , *x _{n}*, the AM–GM statement is equivalent to

with equality if and only if *α* = *x _{i}* for all

*i*∈ {1, . . . ,

*n*}.

For the following proof we apply mathematical induction and only well-known rules of arithmetic.

**Induction basis:** For *n* = 1 the statement is true with equality.

**Induction hypothesis:** Suppose that the AM–GM statement holds for all choices of Template:Mvar non-negative real numbers.

**Induction step:** Consider *n* + 1 non-negative real numbers *x*_{1}, . . . , *x*_{n+1}, . Their arithmetic mean Template:Mvar satisfies

If all numbers are equal to Template:Mvar, then we have equality in the AM–GM statement and we are done. Otherwise we may find one number that is greater than Template:Mvar and one that is smaller than Template:Mvar, say *x _{n}* >

*α*and

*x*

_{n+1}<

*α*. Then

Now consider the Template:Mvar numbers *x*_{1}, . . . , *x*_{n–1}, *y* with

which are also non-negative. Since

Template:Mvar is also the arithmetic mean of Template:Mvar numbers *x*_{1}, . . . , *x*_{n–1}, *y* and the induction hypothesis implies

Due to (*) we know that

hence

in particular *α* > 0. Therefore, if at least one of the numbers *x*_{1}, . . . , *x*_{n–1} is zero, then we already have strict inequality in (**). Otherwise the right-hand side of (**) is positive and strict inequality is obtained by using the estimate (***) to get a lower bound of the right-hand side of (**). Thus, in both cases we get

which completes the proof.

### Proof by Cauchy using forward–backward induction

The following proof by cases relies directly on well-known rules of arithmetic but employs the rarely used technique of forward-backward-induction. It is essentially from Augustin Louis Cauchy and can be found in his *Cours d'analyse*.^{[2]}

#### The case where all the terms are equal

If all the terms are equal:

then their sum is *nx*_{1}, so their arithmetic mean is *x*_{1}; and their product is *x*_{1}^{n}, so their geometric mean is *x*_{1}; therefore, the arithmetic mean and geometric mean are equal, as desired.

#### The case where not all the terms are equal

It remains to show that if *not* all the terms are equal, then the arithmetic mean is greater than the geometric mean. Clearly, this is only possible when *n* > 1.

This case is significantly more complex, and we divide it into subcases.

##### The subcase where *n* = 2

If *n* = 2, then we have two terms, *x*_{1} and *x*_{2}, and since (by our assumption) not all terms are equal, we have:

hence

as desired.

##### The subcase where *n* = 2^{k}

Consider the case where *n* = 2^{k}, where Template:Mvar is a positive integer. We proceed by mathematical induction.

In the base case, *k* = 1, so *n* = 2. We have already shown that the inequality holds when *n* = 2, so we are done.

Now, suppose that for a given *k* > 1, we have already shown that the inequality holds for *n* = 2^{k−1}, and we wish to show that it holds for *n* = 2^{k}. To do so, we apply the inequality twice for 2^{k-1} numbers and once for 2 numbers to obtain:

where in the first inequality, the two sides are equal only if

and

(in which case the first arithmetic mean and first geometric mean are both equal to *x*_{1}, and similarly with the second arithmetic mean and second geometric mean); and in the second inequality, the two sides are only equal if the two geometric means are equal. Since not all 2^{k} numbers are equal, it is not possible for both inequalities to be equalities, so we know that:

as desired.

##### The subcase where *n* < 2^{k}

If Template:Mvar is not a natural power of 2, then it is certainly *less* than some natural power of 2, since the sequence 2, 4, 8, . . . , 2^{k}, . . . is unbounded above. Therefore, without loss of generality, let Template:Mvar be some natural power of 2 that is greater than Template:Mvar.

So, if we have Template:Mvar terms, then let us denote their arithmetic mean by Template:Mvar, and expand our list of terms thus:

We then have:

so

and

as desired.

### Proof by induction using basic calculus

The following proof uses mathematical induction and some basic differential calculus.

**Induction basis**: For *n* = 1 the statement is true with equality.

**Induction hypothesis**: Suppose that the AM–GM statement holds for all choices of Template:Mvar non-negative real numbers.

**Induction step**: In order to prove the statement for *n* + 1 non-negative real numbers *x*_{1}, . . . , *x _{n}*,

*x*

_{n+1}, we need to prove that

with equality only if all the *n* + 1 numbers are equal.

If all numbers are zero, the inequality holds with equality. If some but not all numbers are zero, we have strict inequality. Therefore, we may assume in the following, that all *n* + 1 numbers are positive.

We consider the last number *x*_{n+1} as a variable and define the function

Proving the induction step is equivalent to showing that *f*(*t*) ≥ 0 for all *t* > 0, with *f*(*t*) = 0 only if *x*_{1}, . . . , *x _{n}* and Template:Mvar are all equal. This can be done by analyzing the critical points of Template:Mvar using some basic calculus.

The first derivative of Template:Mvar is given by

A critical point *t*_{0} has to satisfy *f′*(*t*_{0}) = 0, which means

After a small rearrangement we get

and finally

which is the geometric mean of *x*_{1}, . . . , *x _{n}*. This is the only critical point of Template:Mvar. Since

*f′′*(

*t*) > 0 for all

*t*> 0, the function Template:Mvar is strictly convex and has a strict global minimum at

*t*

_{0}. Next we compute the value of the function at this global minimum:

where the final inequality holds due to the induction hypothesis. The hypothesis also says that we can have equality only when *x*_{1}, . . . , *x _{n}* are all equal. In this case, their geometric mean

*t*

_{0}has the same value, Hence, unless

*x*

_{1}, . . . ,

*x*,

_{n}*x*

_{n+1}are all equal, we have

*f*(

*x*

_{n+1}) > 0. This completes the proof.

This technique can be used in the same manner to prove the generalized AM–GM inequality and Cauchy–Schwarz inequality in Euclidean space **R**^{n}.

### Proof by Pólya using the exponential function

George Pólya provided a proof similar to what follows. Let *f*(*x*) = e^{x–1} – *x* for all real Template:Mvar, with first derivative *f′*(*x*) = e^{x–1} – 1 and second derivative *f′′*(*x*) = e^{x–1}. Observe that *f*(1) = 0, *f′*(1) = 0 and *f′′*(*x*) > 0 for all real Template:Mvar, hence Template:Mvar is strictly convex with the absolute minimum at *x* = 1. Hence *x* ≤ e^{x–1} for all real Template:Mvar with equality only for *x* = 1.

Consider a list of non-negative real numbers *x*_{1}, *x*_{2}, . . . , *x _{n}*. If they are all zero, then the AM–GM inequality holds with equality. Hence we may assume in the following for their arithmetic mean

*α*> 0. By Template:Mvar-fold application of the above inequality, we obtain that

with equality if and only if *x _{i}* =

*α*for every

*i*∈ {1, . . . ,

*n*}. The argument of the exponential function can be simplified:

Returning to (*),

which produces *x*_{1} *x*_{1} · · · *x _{n}* ≤

*α*, hence the result

^{n}^{[3]}

## Generalizations

### Weighted AM–GM inequality

There is a similar inequality for the weighted arithmetic mean and weighted geometric mean. Specifically, let the nonnegative numbers
*x*_{1}, *x*_{2}, . . . , *x _{n}* and the nonnegative weights

*w*

_{1},

*w*

_{2}, . . . ,

*w*be given. Set

_{n}*w*=

*w*

_{1}+

*w*

_{2}+ · · · +

*w*. If

_{n}*w*> 0, then the inequality

holds with equality if and only if all the Template:Mvar with *w _{k}* > 0 are equal. Here the convention 0

^{0}= 1 is used.

If all *w _{k}* = 1, this reduces to the above inequality of arithmetic and geometric means.

### Proof using Jensen's inequality

Using the finite form of Jensen's inequality for the natural logarithm, we can prove the inequality between the weighted arithmetic mean and the weighted geometric mean stated above.

Since an Template:Mvar with weight *w _{k}* = 0 has no influence on the inequality, we may assume in the following that all weights are positive. If all Template:Mvar are equal, then equality holds. Therefore, it remains to prove strict inequality if they are not all equal, which we will assume in the following, too. If at least one Template:Mvar is zero (but not all), then the weighted geometric mean is zero, while the weighted arithmetic mean is positive, hence strict inequality holds. Therefore, we may assume also that all Template:Mvar are positive.

Since the natural logarithm is strictly concave, the finite form of Jensen's inequality and the functional equations of the natural logarithm imply

Since the natural logarithm is strictly increasing,

### Other generalizations

Other generalizations of the inequality of arithmetic and geometric means include:

## See also

## Notes

## References

- ↑ {{#invoke:citation/CS1|citation |CitationClass=book }}
- ↑ Cauchy, Augustin-Louis (1821).
*Cours d'analyse de l'École Royale Polytechnique, première partie, Analyse algébrique,*Paris. The proof of the inequality of arithmetic and geometric means can be found on pages 457ff. - ↑ {{#invoke:citation/CS1|citation |CitationClass=book }}