AM and GM: two kinds of average
Take two positive numbers a and b.
The arithmetic mean (AM) is the usual average: (a + b) / 2. It is the middle point between a and b on the number line.
The geometric mean (GM) is √(ab). It is the side of a square that has the same area as the a × b rectangle.
Example: for 4 and 16, AM = (4 + 16)/2 = 10 and GM = √64 = 8.
The AM–GM inequality and its proof
Statement: for all positive a and b, (a + b)/2 ≥ √(ab). The two sides are equal only when a = b.
Proof, step by step. A square of any real number is never negative. So (√a − √b)² ≥ 0.
Open the bracket: a − 2√(ab) + b ≥ 0.
Move the middle term across: a + b ≥ 2√(ab).
Divide by 2: (a + b)/2 ≥ √(ab). Done. The square is zero only if √a = √b, that is a = b.
Why we need positive numbers: √a and √b must exist. If a and b are negative, the inequality can break (for −2 and −8, the AM is −5 but the GM is 4).
See it in 3D: rectangle and squares
In the 3D scene the blue square has the same perimeter as the rectangle, so its side is the AM. The orange square has the same area as the rectangle, so its side is the GM. The blue square always holds at least as much area as the rectangle: ((a+b)/2)² ≥ ab. This is the same inequality, drawn as a picture. The gap between the two areas is ((a − b)/2)². It becomes zero only when a = b.
Maximum and minimum problems
Rule 1 (sum fixed, product is largest): if a + b = S, then ab ≤ (S/2)². The biggest product is (S/2)² and it happens at a = b = S/2.
Rule 2 (product fixed, sum is smallest): if ab = P, then a + b ≥ 2√P. The smallest sum is 2√P and it happens at a = b = √P.
Handy forms: x + 1/x ≥ 2 for x > 0 (equal at x = 1). Also a/b + b/a ≥ 2 for positive a, b. And a² + b² ≥ 2ab for any real a, b.
How to solve (3 checks): (1) Are all terms positive? (2) Is the product (or the sum) a constant, with no x left? (3) Can the terms become equal? If yes, the answer is reached when they are equal. Example: x + 9/x. The product x · 9/x = 9 is constant, so x + 9/x ≥ 2√9 = 6, equal when x = 9/x, that is x = 3.
More numbers: for n positive numbers, the AM is still ≥ the GM, with equality only when all numbers are equal.
Try it at home
Take a 24 cm string. Make a rectangle with it: first 10 × 2, then 8 × 4, then 6 × 6. Draw each on squared paper and count the squares inside: 20, 32, 36. Predict first, then count. The square wins. In the 3D, set 'sum fixed' and drag a to 5 to see the same thing.
Key formulas and definitions
- AM = (a + b)/2, GM = √(ab) (a, b > 0)
- AM ≥ GM, that is (a + b)/2 ≥ √(ab); equal only if a = b
- a + b ≥ 2√(ab); ab ≤ ((a + b)/2)²
- Sum S fixed: maximum product = (S/2)² at a = b = S/2
- Product P fixed: minimum sum = 2√P at a = b = √P
- x + 1/x ≥ 2 for x > 0; a² + b² ≥ 2ab for all real a, b
Worked examples
1. Find the AM and GM of 4 and 16. Check that AM ≥ GM.
AM = (4 + 16)/2 = 10. GM = √(4 × 16) = √64 = 8. Since 10 ≥ 8, AM ≥ GM holds. They are not equal because 4 ≠ 16.
2. Two positive numbers add up to 14. What is the largest possible product?
The sum S = 14 is fixed. The product is largest when both numbers are equal: 7 and 7. Largest product = 7 × 7 = 49. Check: 6 × 8 = 48 is smaller.
3. A farmer has 60 m of fence for a rectangular field. Find the largest area.
Two sides a and b use half the fence: a + b = 30. The product ab is largest when a = b = 15. Largest area = 15 × 15 = 225 m².
4. Find the minimum value of x + 16/x for x > 0.
Both terms are positive. Their product x · 16/x = 16 is constant. So x + 16/x ≥ 2√16 = 8. Equality when x = 16/x, so x² = 16 and x = 4. Minimum = 8 at x = 4.
5. Prove that a² + b² ≥ 2ab for all real a and b.
(a − b)² ≥ 0 because a square is never negative. Open it: a² − 2ab + b² ≥ 0. Move 2ab to the right: a² + b² ≥ 2ab. Equal only when a = b.
6. Find the minimum value of 2x + 8/x for x > 0, and the x where it happens.
The product of the two terms is 2x · 8/x = 16, a constant. So 2x + 8/x ≥ 2√16 = 8. Equality when 2x = 8/x, so x² = 4 and x = 2. Minimum = 8 at x = 2.
7. For 0 < x < 6, find the largest value of x(6 − x).
The two numbers x and 6 − x are positive and add to 6, a constant. So the product is largest when x = 6 − x, that is x = 3. The largest value is 3 × 3 = 9.
Common mistakes
- Using AM–GM with negative numbers. Both numbers must be positive.
- Forgetting to check that the product (or sum) is a constant. For x + 1/x it works. For x + x² the product is x³, not a constant, so it does not work.
- Writing a minimum without checking that equality can really happen. For x + 1/x, the terms are equal at x = 1, so the minimum 2 is real. Always check the equal case.
- Thinking AM ≥ GM means AM is always strictly bigger. They are equal when a = b.