The Arithmetic Mean–Geometric Mean Inequality

The arithmetic mean never falls below the geometric mean.

Two means of two numbers

Take two numbers a and b that are not negative. Their arithmetic mean is (a + b)/2, the usual average. Their geometric mean is √(ab), the square root of their product: the side of the square with the same area as a rectangle a by b.

Take a = 2 and b = 8. The arithmetic mean is (2 + 8)/2 = 5, and the geometric mean is √16 = 4. The arithmetic mean is the larger.

Other pairs agree. 9 and 1 give 5 and 3; 49 and 1 give 25 and 7; 3 and 12 give 7.5 and 6. The AM–GM inequality says it always happens: (a + b)/2 ≥ √(ab) whenever a ≥ 0 and b ≥ 0, with equality only when a = b. The pairs do not prove that; the proof below does.

(a + b)/2√(ab)2 and 8549 and 15349 and 12573 and 127.564 and 444

Five pairs and their two means. The arithmetic mean is the larger in every row but the last, where the two numbers are equal and so are the means.

The proof is one square

The square of any real number is at least 0. Since a and b are not negative, √a and √b exist, and so does their difference. Its square is at least 0: (√a − √b)² ≥ 0.

Expand the square: (√a)² − 2 × √a × √b + (√b)² = a − 2√(ab) + b, using √a × √b = √(ab). So a − 2√(ab) + b ≥ 0.

Add 2√(ab) to both sides, which moves the middle term across: a + b ≥ 2√(ab).

Halve both sides

Halving both sides of a + b ≥ 2√(ab) keeps the inequality the same way round, because 2 is positive. The result is (a + b)/2 ≥ √(ab): the arithmetic mean is at least the geometric mean.

With 2 and 8: a + b = 10 and 2√(ab) = 2√16 = 8, and 10 ≥ 8. Halved, that is 5 ≥ 4.

When the two are equal

Each step of the proof can be read in both directions: expanding a square, adding the same amount to both sides, and halving both sides change nothing about which side is larger or whether they are equal. So the two means are equal exactly when the square at the start is 0, (√a − √b)² = 0.

A square is 0 only when the number squared is 0, so √a = √b, and that means a = b. When a and b differ, the square is positive, and the arithmetic mean is strictly the larger.

One number 0 and the other positive is a case where they differ: with a = 0 and b = 6, the arithmetic mean is 3 and the geometric mean is 0.

(a + b)/2 = 4√(ab) = 3.464a = 2b = 6

the altitude √(ab) = 3.464 is half a chord, so it is shorter than the radius (a + b)/2 = 4: (a + b)/2 ≥ √(ab)

Slide the split until the altitude reaches the radius

A semicircle on a diameter of length a + b = 8, split into a and b at the handle. The radius, 4, is the arithmetic mean. The height of the semicircle above the split is √(ab), the geometric mean: at a = 2 and b = 6 it is √12 ≈ 3.464. No height of a semicircle is more than its radius, and the two are equal only when the split is at the center, a = b = 4.

Why the height is the geometric mean

Join the top of the height to the two ends of the diameter. The angle at the top is a right angle, because it stands in a semicircle. The height then splits that right triangle into two smaller triangles with the same angles, so their sides are in proportion: h / a = b / h. Multiplying out, h² = ab, so h = √(ab).

The radius is half the diameter, (a + b)/2. The height is half a chord of the circle, and no chord is longer than a diameter, so h ≤ (a + b)/2: the same inequality, seen in a circle.

Finding a least value

Equality is how the inequality finds a least value. Read a + b ≥ 2√(ab) in words: when two positive numbers have a fixed product, their sum is at least twice the square root of that product, and the sum is smallest exactly when the two numbers are equal.

Two positive numbers multiply to 36. Their sum is at least 2√36 = 12, and 6 and 6 make it exactly 12, so 12 is the least sum. 4 and 9 also multiply to 36, and their sum is 13.

For x > 0, the numbers x and 1/x multiply to 1, so x + 1/x ≥ 2√1 = 2, with equality only when x = 1/x, that is, at x = 1. At x = 4 the sum is 4 + 1/4 = 4.25, and at x = 1/2 it is 2.5.

A rectangle of area 36 with width w has length 36/w and perimeter 2(w + 36/w). Since w + 36/w ≥ 2√36 = 12, the perimeter is at least 24, and it is 24 only when w = 36/w, which is the 6 by 6 square.

lengthperimeterwidth 13674width 21840width 31230width 4926width 6624

Rectangles of area 36. The perimeter falls as the rectangle gets closer to a square, and is least, 24, for the 6 by 6 square.

The usual mistakes

Mixing up the two means. (a + b)/2 is the average; √(ab) is the square root of the product.

Using it with negative numbers. The proof needs √a and √b, so a and b must not be negative. For a = −2 and b = −8 the average is −5, while √(ab) = √16 = 4 is larger.

Expecting equality when one number is 0. With a = 0 and b = 6 the means are 3 and 0.

Taking the bound as the least value when the two terms cannot be made equal. The bound 2√(ab) is reached only when the two terms are equal; if a condition of the problem rules that out, the least value is above the bound.

A pen and a round trip

In the applications below, a pen against a barn wall needs fencing on three sides, and the AM–GM inequality finds the least fencing and then the cheapest fence, each where its two terms are equal. Then a cyclist’s average speed out against the wind and back is shown never to exceed the mean of her two speeds.

Worked example: A Rectangular Pen of 200 Square Meters Against a Barn Wall: the Least Fencing, and the Cheapest Fence

Question A farmer fences a rectangular pen of area 200 square meters against the long wall of a barn, so the wall forms one side and needs no fence. The two ends of the pen, at right angles to the wall, are each x m long, and the front, parallel to the wall, is y m long. (a) Use the AM–GM inequality to find the least length of fencing, and the values of x and y that give it. (b) The front faces the farmyard and is a board fence costing $40 per meter, while the two ends are wire mesh costing $10 per meter. What is the least cost of the fence, and what are x and y then?

  1. 1.The area gives xy = 200. The fencing is the two ends and the front, 2x + y meters.

    barn wallxxfront y200 sq mxy = 200; fencing 2x + y
    barn wallxxfront y200 sq mxy = 200; fencing 2x + y
    The wall is one side, so the fencing is the two ends and the front, 2x + y meters, with xy = 200.
  2. 2.The two terms 2x and y have a fixed product: 2x × y = 2 × 200 = 400. By the AM–GM inequality, 2x + y ≥ 2√400 = 2 × 20 = 40.

    barn wallxxfront y200 sq mxy = 200; fencing 2x + y2x + y ≥ 2√400= 40
    barn wallxxfront y200 sq mxy = 200; fencing 2x + y2x + y ≥ 2√400= 40
    The product 2x × y = 400 is fixed, so AM–GM gives 2x + y ≥ 2√400 = 40.
  3. 3.(a) Equality holds when the two terms are equal, 2x = y. Then x × 2x = 200, so x2 = 100, x = 10 and y = 20. The least fencing is 40 m, with ends of 10 m and a front of 20 m.

    barn wallx = 10 m10 mfront y = 20 m200 sq mxy = 200; fencing 2x + y2x + y ≥ 2√400= 402x = y: x = 10, y = 20, 40 m
    barn wallx = 10 m10 mfront y = 20 m200 sq mxy = 200; fencing 2x + y2x + y ≥ 2√400= 402x = y: x = 10, y = 20, 40 m
    (a) Equality needs 2x = y: ends of 10 m and a front of 20 m use the least fencing, 40 m.
  4. 4.The cost is 10 × 2x + 40y = 20x + 40y dollars. The product 20x × 40y = 800xy = 800 × 200 = 160000 is fixed, so 20x + 40y ≥ 2√160000 = 2 × 400 = 800.

    barn wallx = 20 m20 mfront y = 10 m200 sq mxy = 200; fencing 2x + y2x + y ≥ 2√400= 402x = y: x = 10, y = 20, 40 m20x + 40y ≥ 2√160000 = 800
    barn wallx = 20 m20 mfront y = 10 m200 sq mxy = 200; fencing 2x + y2x + y ≥ 2√400= 402x = y: x = 10, y = 20, 40 m20x + 40y ≥ 2√160000 = 800
    The cost 20x + 40y has a fixed product, 160000, so it is at least 2√160000 = 800.
  5. 5.(b) Equality holds when 20x = 40y, so each term is half of 800: 20x = 400 gives x = 20, and 40y = 400 gives y = 10. The least cost is $800, with ends of 20 m and a front of 10 m. Check: 20 × 10 = 200 square meters, and 20 × 20 + 40 × 10 = 400 + 400 = 800.

    barn wallx = 20 m20 mfront y = 10 m200 sq mxy = 200; fencing 2x + y2x + y ≥ 2√400= 402x = y: x = 10, y = 20, 40 m20x + 40y ≥ 2√160000 = 80020x = 40y = 400: x = 20, y = 10, $800
    barn wallx = 20 m20 mfront y = 10 m200 sq mxy = 200; fencing 2x + y2x + y ≥ 2√400= 402x = y: x = 10, y = 20, 40 m20x + 40y ≥ 2√160000 = 80020x = 40y = 400: x = 20, y = 10, $800
    (b) Equality needs 20x = 40y: ends of 20 m and a front of 10 m cost the least, $800.

Answer: (a) 40 m of fencing, with x = 10 m and y = 20 m; (b) $800, with x = 20 m and y = 10 m

Common mistakes

  • Making the pen a square, about 14.1 m each way, because a square needs the least fencing for a closed rectangle. The wall saves one side, so the fencing is 2x + y, not 2x + 2y, and the square needs about 42.4 m.
  • Keeping the shape from (a) for (b). A meter of front costs four times a meter of end, so the terms to make equal are the costs 20x and 40y, not the lengths 2x and y; the cheapest pen has the short front.

More named inequalities problems, worked step by step →

Worked example: A Cyclist's Ride to the Next Town and Back, Out Against the Wind: the Average Speed for the Round Trip

Question Ana cycles 30 km to the next town at 20 km/h against the wind, and back along the same road at 30 km/h with the wind behind her. (a) Find her average speed for the round trip. Then show that for any two speeds a and b over equal distances, the average speed 2aba + b is never more than the mean of the two speeds, a + b2, and say when the two are equal. (b) On a windier day she rides out at only 15 km/h. How fast must she ride back for her average speed over the round trip to be 20 km/h?

  1. 1.The ride out takes 30 ÷ 20 = 1.5 hours and the ride back takes 30 ÷ 30 = 1 hour, so the 60 km take 2.5 hours. The average speed is 60 ÷ 2.5 = 24 km/h.

    Out 20 km/h1.5 hBack 30 km/h1 hRound tripoutback60 km in 2.5 h60 km in 2.5 h: 24 km/h
    Out 20 km/h1.5 hBack 30 km/h1 hRound tripoutback60 km in 2.5 h60 km in 2.5 h: 24 km/h
    Out takes 1.5 hours and back takes 1 hour, so the average is 60 ÷ 2.5 = 24 km/h.
  2. 2.In general, a distance s each way takes sa + sb = s(a + b)ab hours. Dividing the total distance 2s by this time gives the average speed 2aba + b.

    Out 20 km/h1.5 hBack 30 km/h1 hRound tripoutback60 km in 2.5 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)
    Out 20 km/h1.5 hBack 30 km/h1 hRound tripoutback60 km in 2.5 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)
    Over a distance s each way the time is sa + sb, so the average speed is 2aba + b.
  3. 3.By the AM–GM inequality, a + b2 ≥ √ab. Both sides are positive, so squaring gives (a + b)24 ≥ ab, which is (a + b)2 ≥ 4ab. Divide both sides by 2(a + b): a + b2 ≥ 2aba + b.

    Out 20 km/h1.5 hBack 30 km/h1 hRound tripoutback60 km in 2.5 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)(a + b)2≥ 4ab, so (a + b)/2 ≥ 2ab/(a + b)
    Out 20 km/h1.5 hBack 30 km/h1 hRound tripoutback60 km in 2.5 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)(a + b)2≥ 4ab, so (a + b)/2 ≥ 2ab/(a + b)
    AM–GM, squared, gives (a + b)2 ≥ 4ab, so the mean of the speeds is at least the average speed.
  4. 4.(a) Her average speed is 24 km/h, less than the mean of the speeds, 25 km/h. The two are equal only when a = b, the equality case of AM–GM, so whenever the speeds out and back differ, the average speed is less than their mean.

    Out 20 km/h1.5 hBack 30 km/h1 hRound tripoutback60 km in 2.5 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)(a + b)2≥ 4ab, so (a + b)/2 ≥ 2ab/(a + b)24 < 25, equal only when a = b
    Out 20 km/h1.5 hBack 30 km/h1 hRound tripoutback60 km in 2.5 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)(a + b)2≥ 4ab, so (a + b)/2 ≥ 2ab/(a + b)24 < 25, equal only when a = b
    (a) 24 km/h, below the mean of 25 km/h; the two are equal only when a = b.
  5. 5.For (b), an average of 20 km/h over 60 km means 60 ÷ 20 = 3 hours in all. The ride out at 15 km/h takes 30 ÷ 15 = 2 hours, which leaves 1 hour for the 30 km back.

    Out 15 km/h2 hBack1 hRound tripoutback60 km in 3 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)(a + b)2≥ 4ab, so (a + b)/2 ≥ 2ab/(a + b)24 < 25, equal only when a = b20 km/h for 60 km: 3 h; the ride out takes 2 h
    Out 15 km/h2 hBack1 hRound tripoutback60 km in 3 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)(a + b)2≥ 4ab, so (a + b)/2 ≥ 2ab/(a + b)24 < 25, equal only when a = b20 km/h for 60 km: 3 h; the ride out takes 2 h
    An average of 20 km/h over 60 km allows 3 hours, and the ride out at 15 km/h takes 2 of them.
  6. 6.(b) She must ride back at 30 ÷ 1 = 30 km/h. Check: 2 × 15 × 3015 + 30 = 90045 = 20. The mean of 15 and 30 is 22.5, more than 20, as the inequality in (a) says it must be.

    Out 15 km/h2 hBack 30 km/h1 hRound tripoutback60 km in 3 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)(a + b)2≥ 4ab, so (a + b)/2 ≥ 2ab/(a + b)24 < 25, equal only when a = b20 km/h for 60 km: 3 h; the ride out takes 2 hback: 30 km in 1 h, so 30 km/h
    Out 15 km/h2 hBack 30 km/h1 hRound tripoutback60 km in 3 h60 km in 2.5 h: 24 km/haverage speed = 2ab/(a + b)(a + b)2≥ 4ab, so (a + b)/2 ≥ 2ab/(a + b)24 < 25, equal only when a = b20 km/h for 60 km: 3 h; the ride out takes 2 hback: 30 km in 1 h, so 30 km/h
    (b) The 30 km back in the hour left needs 30 km/h.

Answer: (a) 24 km/h; the average speed is at most a + b2, with equality only when a = b; (b) 30 km/h

Common mistakes

  • Answering 25 km/h in (a), the mean of 20 and 30. She spends longer at the slow speed, 1.5 hours against 1 hour, so the slow speed counts for more in the average.
  • Answering 25 km/h in (b), so that the mean of 15 and 25 is 20. The slow ride out already uses 2 of the 3 hours, so the ride back must be faster than that: 30 km/h.

More named inequalities problems, worked step by step →

Practice The Arithmetic Mean–Geometric Mean Inequality in the app