Lesson 8 of 14 · Algebra Foundations
Inequalities & AM-GM
Linear and quadratic inequalities are mechanical once you're careful about sign flips. AM-GM is different — it's the single fastest tool for "minimize a sum" or "maximize a product" problems, and its equality case often pins down the answer directly, without any calculus.
Not sure what "AM-GM" means? It stands for Arithmetic Mean – Geometric Mean; the next page explains both, with a picture of why AM ≥ GM.
Mark your status for this lesson:
Learning objectives
- Solve linear inequalities correctly, flipping the direction whenever multiplying or dividing by a negative.
- Solve quadratic inequalities using the roots as boundaries and sign analysis between them.
- Apply the AM-GM inequality to find the minimum of a sum or the maximum of a product under a constraint.
- Recognize AM-GM's equality condition and use it to identify exactly where the optimum occurs.
The core idea
Linear inequalities behave exactly like linear equations, with one exception: multiplying or dividing both sides by a negative number flips the inequality's direction. Quadratic inequalities reduce to the same factoring skill from earlier lessons — find the roots, then test which intervals between them satisfy the original inequality.
AM-GM is a different kind of tool entirely. It converts "find the minimum of a sum" or "find the maximum of a product" into a direct algebraic bound, and tells you exactly when that bound is achieved — no derivatives required.
What "AM-GM" stands for
AM-GM is short for Arithmetic Mean – Geometric Mean. Both are ways of "averaging" non-negative numbers, and the inequality says the arithmetic mean is never smaller than the geometric mean.
- Arithmetic mean (AM) — the ordinary average: add the numbers, then divide by how many there are. For two numbers it is (a + b)/2; for n numbers it is (a₁ + a₂ + ⋯ + aₙ)/n.
- Geometric mean (GM) — multiply the numbers, then take the root that matches how many there are. For two numbers it is √(ab); for n numbers it is the nth root of the product, ⁿ√(a₁a₂⋯aₙ).
For a numeric comparison of the two means (the numbers 2 and 8), see Worked example 5.
Why AM ≥ GM: a picture
Picture a rectangle with sides a and b. Its area is ab, and the square with that same area has side √(ab) — the geometric mean. Now bend the rectangle into a square with the same perimeter: the perimeter is 2(a + b), so that square has side (a + b)/2 — the arithmetic mean. Of all rectangles with a fixed perimeter, the square has the largest area, so
ab ≤ ((a + b)/2)², i.e. √(ab) ≤ (a + b)/2.
The algebra version. A square is never negative, so for a, b ≥ 0 (√a − √b)² ≥ 0. Expanding gives a − 2√(ab) + b ≥ 0, so a + b ≥ 2√(ab), and dividing by 2 gives AM ≥ GM.
When does equality hold?
Exactly when the numbers are equal: AM = GM ⇔ a = b (for n numbers, all n are equal). In the picture, the rectangle already is a square; in the algebra, (√a − √b)² = 0 only if √a = √b. Also remember the numbers must be non-negative (a, b ≥ 0): for negative numbers the inequality can fail, and the geometric mean may not even be a real number. That equality case is what tells you where a minimum or maximum occurs in the worked examples below.
AM-GM inequality (two terms)
(a + b)/2 ≥ √(ab), for a, b ≥ 0
Equality holds exactly when a = b. This single fact is enough to both bound a sum from below and identify where that bound is achieved.
AM-GM inequality (general)
(a₁+a₂+⋯+aₙ)/n ≥ ⁿ√(a₁a₂⋯aₙ)
Conditions. Every aᵢ must be non-negative, and equality holds exactly when a₁ = a₂ = ⋯ = aₙ. The same statement in the two forms you will use most:
a₁ + ⋯ + aₙ ≥ n·ⁿ√(a₁⋯aₙ) and a₁⋯aₙ ≤ ((a₁ + ⋯ + aₙ)/n)ⁿ
How to apply it
- Decide the direction. A fixed product bounds the sum from below (the sum is at least something). A fixed sum bounds the product from above (the product is at most something).
- Make the other quantity constant. If it is not, split terms into equal pieces so that it becomes constant: write 2x as x+x (or x as x/2 + x/2) so that the pieces’ product, or sum, no longer depends on x.
- Apply AM-GM to those n pieces.
- Find where all the pieces are equal and check that this point is allowed (right sign, inside any given range). If it is not, the bound is true but never attained, so it is not the minimum or maximum.
Pitfalls. Negative terms break AM-GM. Using a bound whose equality case is impossible gives a number that is never reached. And check that the product (or sum) is really constant after you split; if a leftover x remains, the bound is not a fixed number.
Quadratic inequality via sign analysis
For (x − r)(x − s) with r < s: the product is positive outside [r,s] and negative between r and s. In symbols, (x − r)(x − s) < 0 ⟺ r < x < s and (x − r)(x − s) > 0 ⟺ x < r or x > s.
The algorithm
- Move everything to one side so the other side is 0: ax² + bx + c □ 0, where □ is any of <, ≤, >, ≥.
- Factor (or use the quadratic formula) to find the roots r < s.
- Mark r and s on a number line; they cut it into three regions.
- Choose the sign of each region: test one point in each, or use the parabola’s shape (next paragraph).
- Pick the regions the inequality asks for. Include the endpoints r and s only for ≤ or ≥ (closed brackets); leave them out for < or >.
Why it works. An upward-opening parabola (a > 0) is below the x-axis only between its roots and above it outside them, and the sign can only change where the parabola crosses the axis, at a root. If a < 0, the parabola opens down and every sign in the pattern flips: positive between the roots, negative outside.
Pitfalls. A negative leading coefficient flips the pattern, so check a before reading the signs. If the discriminant is negative there are no real roots and the sign never changes: the whole line is either always true or never true, which one a single test point tells you. And never multiply or divide both sides by an expression containing x unless you know its sign; move everything to one side and factor instead.
Worked example 1 — Linear inequality with a sign flip
Problem
Solve 3 − 2x ≥ 7.
Key insight
Isolating x requires dividing by −2, which flips the inequality direction.
Solution
−2x ≥ 4 → dividing by −2 and flipping: x ≤ −2.
Takeaway
The flip is easy to forget under time pressure — a quick sanity check (plug in x=0) catches it immediately if you forgot.
Worked example 2 — Quadratic inequality
Problem
Solve x² − 5x + 6 > 0.
Key insight
Factor first to find the boundary points, then determine the sign in each region.
Solution
(x−2)(x−3) > 0. The roots 2 and 3 split the number line into three regions; testing a point in each shows the product is positive outside [2, 3]: x < 2 or x > 3.
Takeaway
You only need to test one point per region — the sign alternates as you cross each root.
Worked example 3 — AM-GM to minimize a sum
Problem
For x > 0, find the minimum value of x + 4/x.
Key insight
Apply AM-GM directly to the two terms x and 4/x.
Solution
(x + 4/x)/2 ≥ √(x · 4/x) = √4 = 2, so x + 4/x ≥ 4. Equality holds when x = 4/x, i.e. x = 2. Minimum value: 4.
Takeaway
The product of the two terms (x)(4/x) = 4 is constant — that's exactly the setup AM-GM is built for.
Worked example 4 — AM-GM to maximize a product
Problem
If x + y = 10 with x, y > 0, find the maximum value of xy.
Key insight
This time the sum is fixed, so AM-GM bounds the product from above instead.
Solution
(x+y)/2 ≥ √(xy) → 5 ≥ √(xy) → xy ≤ 25, with equality at x = y = 5. Maximum value: 25.
Takeaway
Fixed sum → bounds the product (maximum). Fixed product → bounds the sum (minimum). Recognizing which one you're given tells you which direction the bound goes.
Worked example 5 — Comparing the means of 2 and 8
Problem
Compare the arithmetic mean (AM) and geometric mean (GM) of 2 and 8, then of a few other pairs.
Solution
AM = (2 + 8)/2 = 5. GM = √(2·8) = √16 = 4. So AM ≥ GM here: 5 ≥ 4. Try 3 and 3: AM = 3 and GM = √9 = 3, so the two means are equal. Try 1 and 9: AM = 5, GM = 3. The more different the two numbers are, the bigger the gap.
Strategy notes
Fixed sum bounds the product; fixed product bounds the sum
This is the entire skill of recognizing an AM-GM setup. If a problem fixes a sum and asks for a maximum product, or fixes a product and asks for a minimum sum, AM-GM is almost certainly the intended tool.
Always state the equality condition
A bound alone ("the sum is at least 4") isn't a complete answer to a minimize/maximize problem — you also need to confirm that equality is actually achievable within the problem's constraints.
Common mistakes
Forgetting to flip the inequality
Multiplying or dividing both sides of an inequality by a negative number reverses its direction. This is the single most common error in this entire topic.
Getting the quadratic inequality direction backwards
For (x−r)(x−s) with r < s, the product is negative between the roots and positive outside them — mixing these up is easy without sketching (even mentally) the parabola's shape.
Applying AM-GM without checking the terms are nonnegative
AM-GM requires every term to be nonnegative. Applying it to expressions that could be negative (without first verifying the sign) produces a bound that may not actually hold.
Practice
20 questions across four difficulty tiers. Linear-inequality questions ask for a single boundary value. Quadratic-inequality questions ask for both boundary values, comma-separated. AM-GM questions ask for the optimal (minimum or maximum) value itself. Up to three tries per question before the solution is shown.