Discrete Mathematics and Combinatorics

The Binomial Theorem and Why Its Coefficients Count Subsets

See why expanding (a + b)ⁿ is really a counting problem, then use that idea on coefficients, identities and quick estimates.

Key takeaways

  • (a + b)ⁿ is the sum over k from 0 to n of C(n, k) aⁿ⁻ᵏ bᵏ.
  • Each term of the expansion records one way of picking a or b from every bracket, so its coefficient counts subsets.
  • Substituting special values for a and b turns the theorem into identities about sums of coefficients.
  • For exponents that are not whole numbers, the expansion becomes an infinite series that needs a convergence condition.

The binomial theorem says how to expand a power of a two-term sum such as (a + b)ⁿ. The coefficient of aⁿ⁻ᵏbᵏ is C(n, k), the number of ways to choose k items from n. The reason is that multiplying out the brackets forces you to choose, k times out of n, where the b's come from.

Here n is a whole number that is 0 or larger, and C(n, k) = n! / (k! (n − k)!), with n! the product of the whole numbers from 1 to n and 0! = 1.

Watching the brackets multiply

Take (a + b)³ = (a + b)(a + b)(a + b). To expand it, pick one letter from each bracket, multiply the three picks, and add up every possible result. That gives 2³ = 8 products:

aaa
aab  aba  baa
abb  bab  bba
bbb

Because multiplication ignores order, the three products in the second row are all a²b, and the three in the third row are all ab². So (a + b)³ = a³ + 3a²b + 3ab² + b³.

Why are there 3 products equal to a²b? You had to decide which one of the 3 brackets supplies the b. In general, the number of products with exactly k b's is the number of ways to choose k brackets from n. That is C(n, k), a set of positions with no order, as explained in permutations and combinations.

The theorem and some expansions

(a + b)ⁿ = C(n,0)aⁿ + C(n,1)aⁿ⁻¹b + C(n,2)aⁿ⁻²b² + ... + C(n,n)bⁿ

(x + y)⁴ = x⁴ + 4x³y + 6x²y² + 4xy³ + y⁴

When the terms carry numbers or minus signs, treat each whole term as a or b. For (2x − 3)⁴, set a = 2x and b = −3:

1 · (2x)⁴          =  16x⁴
4 · (2x)³ · (−3)   = −96x³
6 · (2x)² · 9      = 216x²
4 · (2x) · (−27)   = −216x
1 · 81             =  81

A quick check is to set x = 1. The original gives (2 − 3)⁴ = 1, and the coefficients give 16 − 96 + 216 − 216 + 81 = 1.

To find one coefficient, you need only one term. In (1 + 2x)⁸ the x⁵ term is C(8, 5)(2x)⁵ = 56 × 32 x⁵, so the coefficient is 1,792.

Pascal's rule

Arranged in rows, the coefficients form a triangle in which every inner entry is the sum of the two above it:

C(n, k) = C(n − 1, k − 1) + C(n − 1, k)      for 0 < k < n

The counting proof takes two sentences. Mark one particular item among the n. A chosen set of size k either contains it, leaving k − 1 to pick from the other n − 1, or it does not, leaving all k to pick from those n − 1.

This lets you build rows by addition alone: 1; 1 1; 1 2 1; 1 3 3 1; 1 4 6 4 1; 1 5 10 10 5 1. The triangle was studied in China, India and Persia centuries before Blaise Pascal wrote about it. Its many other features are gathered in patterns in Pascal's triangle.

Rows of coefficients, n = 0 to 4
1 (a + b)⁰: total 1 1 1 (a + b)¹: total 2 1 2 1 (a + b)²: total 4 1 3 3 1 (a + b)³: total 8 1 4 6 4 1 (a + b)⁴: total 16 1 (a + b)⁰: total 1 1 1 (a + b)¹: total 2 1 2 1 (a + b)²: total 4 1 3 3 1 (a + b)³: total 8 1 4 6 4 1 (a + b)⁴: total 16

Each inner number is the sum of the two above it.

Subsets as strings of choices

There is a tidy way to picture the link with subsets. Label the brackets 1 to n. For each product in the expansion, write down the set of bracket numbers that supplied a b.

With n = 3, the product abb corresponds to the set {2, 3}, aba corresponds to {2}, and aaa to the empty set. Every product gives one subset and every subset gives one product. So the expansion before collecting terms is a complete list of the 2ⁿ subsets of {1, ..., n}.

Collecting like terms sorts the list by size. The coefficient of a²b² in (a + b)⁴ is 6 because there are six subsets of size 2: {1,2}, {1,3}, {1,4}, {2,3}, {2,4} and {3,4}.

A proof by induction

The theorem can also be proved without any counting story. It is plainly true for n = 0, since both sides equal 1. Suppose it holds for some n, and multiply both sides by (a + b).

The product has two streams of terms. Multiplying by a keeps the number of b's the same, and multiplying by b raises it by one. So the new coefficient of aⁿ⁺¹⁻ᵏbᵏ is C(n, k) + C(n, k − 1), which by Pascal's rule is C(n + 1, k).

This is a standard exercise in mathematical induction. The two proofs complement each other: the counting one explains why the coefficients appear, and the inductive one shows how each row grows from the last.

Identities for free

Put a = 1 and b = 1. Then

C(n,0) + C(n,1) + ... + C(n,n) = 2ⁿ

This agrees with a direct count: a set of n elements has 2ⁿ subsets, and the left side sorts them by size.

Put a = 1 and b = −1. For n ≥ 1 the left side is 0ⁿ = 0, so the alternating sum C(n,0) − C(n,1) + C(n,2) − ... vanishes. In words, a nonempty set has as many subsets of even size as of odd size. This fact powers the proof of inclusion-exclusion.

Differentiating (1 + x)ⁿ and then setting x = 1 gives the sum of k × C(n, k), which equals n × 2ⁿ⁻¹ for n ≥ 1. It counts the total size of all subsets: each of the n elements lies in half of them.

Vandermonde's identity

Suppose you choose r people from a group of m women and n men. Sorting by the number k of women gives

C(m + n, r) = sum over k of C(m, k) × C(n, r − k)

C(7, 3) with m = 4, n = 3:
  1×1 + 4×3 + 6×3 + 4×1 = 1 + 12 + 18 + 4 = 35

Setting m = n = r and using symmetry shows that the squares of the entries in row n add up to C(2n, n). For row 4: 1 + 16 + 36 + 16 + 1 = 70 = C(8, 4).

Arguments of this kind, where two expressions are shown equal because they count one collection, are the subject of combinatorial proof.

More than two terms

The same bracket-picking idea works for (a + b + c)ⁿ. The coefficient of aⁱbʲcᵏ, where i + j + k = n, is n! / (i! j! k!). In (a + b + c)⁴ the coefficient of a²bc is 24 / 2 = 12.

The number of different terms is itself a counting problem: how many ways can the exponents add to n? The answer comes from stars and bars. For three letters and n = 4 there are C(6, 2) = 15 terms.

Estimates and the general series

For a small number h, the first few terms of (1 + h)ⁿ already give a good estimate, since high powers of h are tiny.

1.01⁵ = 1 + 5(0.01) + 10(0.0001) + 10(0.000001) + ...
      ≈ 1.05101

Isaac Newton extended the idea to exponents r that are fractions or negative:

(1 + x)ʳ = 1 + r·x + r(r − 1)x²/2! + r(r − 1)(r − 2)x³/3! + ...

When r is not a nonnegative whole number, the series never ends, and it converges for |x| < 1. Behavior at x = ±1 depends on r. For √1.02, take r = 1/2 and x = 0.02: the first three terms give 1 + 0.01 − 0.00005 = 1.00995, very close to the true value. The idea belongs to the wider study of power series.

Which coefficient is largest?

Compare neighbors in a row. The ratio C(n, k + 1) / C(n, k) equals (n − k) / (k + 1). It is bigger than 1 while k is less than (n − 1)/2, so the entries rise toward the middle and then fall.

For even n there is a single largest entry, C(n, n/2). For odd n the two middle entries tie. In row 10 the peak is 252, and all the entries together total 1,024, so nearly a quarter of all subsets of 10 items have exactly 5 members. As n grows, a plot of the row takes on the shape of a bell curve.

Finding a particular term

Many problems ask for a single term in a longer expansion. Write the general term, track the power of x, and solve for k.

For the constant term in (x² + 1/x)⁶, with x ≠ 0, the general term is C(6, k)(x²)⁶⁻ᵏ(1/x)ᵏ. The power of x is 12 − 2k − k = 12 − 3k. Setting this to 0 gives k = 4, so the constant term is C(6, 4) = 15.

If the equation for k has no whole-number solution between 0 and n, that power does not appear at all. In this example there is no x² term, since 12 − 3k = 2 has no integer solution.

Common mistakes and a few uses

  • (a + b)² is a² + 2ab + b², and dropping the middle term is the classic error.
  • The expansion of (a + b)ⁿ has n + 1 terms, so the term containing bᵏ is term number k + 1.
  • A power belongs to the whole term: (2x)³ is 8x³.

In probability, if an event happens with probability p in each of n independent trials, the chance of exactly k successes is C(n, k) pᵏ (1 − p)ⁿ⁻ᵏ. These are the terms of (p + (1 − p))ⁿ, so they add to 1, as probabilities must. For 4 tosses of a fair coin, the chance of exactly 2 heads is 6/16 = 3/8.

The theorem also gives quick inequalities. For x ≥ 0 and a whole number n ≥ 1, every term in the expansion of (1 + x)ⁿ is zero or positive, so keeping only the first two gives (1 + x)ⁿ ≥ 1 + nx. Keeping the third term shows, for n ≥ 2, that 2ⁿ is at least n(n − 1)/2, so powers of 2 outgrow n.

In number theory, when p is prime every C(p, k) with 0 < k < p is divisible by p. It follows that (a + b)ᵖ and aᵖ + bᵖ leave the same remainder on division by p, one route to Fermat's little theorem.

Written for 4Mathematics with AI writing tools and not reviewed line by line by a person. Check anything you rely on against a textbook or primary source. Report an error.

Keep reading

All 45 articles in Discrete Mathematics and Combinatorics →

Latest news on this topic