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 – i.e., with more than one variable – for two non-negative numbers x and y, 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 = a2 ± 2ab + b2 of the binomial formula:
Hence (x + y)2 ≥ 4xy, with equality precisely 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, hence it has perimeter 2x + 2y and area xy. Similarly, a square with all sides of length has the perimeter 4 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 and that only the square has the smallest perimeter amongst all rectangles of equal area.
Extensions of the AM–GM inequality are available to include weights or generalized means.
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:
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 x1, x2, . . . , xn > 0, this is equal to the exponential of the arithmetic mean of the natural logarithms of the numbers:
Restating the inequality using mathematical notation, we have that for any list of n nonnegative real numbers x1, x2, . . .