Skip to content
Tutorials Center
My learning

Topics

Lesson 35 of 38 · Sequences, Series and the Binomial Theorem

The Binomial Theorem and Pascal's Triangle

Expand (a + b)^n with Pascal's triangle and the binomial theorem, use combinations n choose k, and find a specific term without expanding everything.

You can square a binomial by hand: (a + b)² = a² + 2ab + b². Cubing is already tedious, and (a + b)¹⁰ by repeated multiplication would be painful. The binomial theorem gives any power directly. Its coefficients come from a famous pattern of numbers.

Expansions and a pattern

Text
(a + b)⁰ =                      1
(a + b)¹ =                    a + b
(a + b)² =                a² + 2ab + b²
(a + b)³ =            a³ + 3a²b + 3ab² + b³
(a + b)⁴ =        a⁴ + 4a³b + 6a²b² + 4ab³ + b⁴

Look at the coefficients: 1; 1 1; 1 2 1; 1 3 3 1; 1 4 6 4 1. And look at the exponents: the power of a goes down from n to 0 while the power of b goes up from 0 to n, so each term has total degree n.

Pascal's triangle

The coefficient rows form Pascal's triangle. Each entry is the sum of the two entries above it:

Text
row 0:             1
row 1:           1   1
row 2:         1   2   1
row 3:       1   3   3   1
row 4:     1   4   6   4   1
row 5:   1   5  10  10   5   1

So (a + b)⁵ = a⁵ + 5a⁴b + 10a³b² + 10a²b³ + 5ab⁴ + b⁵.

Combinations: n choose k

The entry in row n, position k (counting from 0) is written C(n, k) or n choose k:

Text
C(n, k) = n! / (k! · (n - k)!)

where n! = n·(n-1)·...·2·1 (and 0! = 1). It counts the number of ways to choose k items from n. For example C(5, 2) = 5!/(2!·3!) = 120/12 = 10.

Why does this give the coefficient? When you multiply out n copies of (a + b), the term aⁿ⁻ᵏbᵏ arises by choosing b from k of the brackets: there are C(n, k) ways.

The binomial theorem

Text
(a + b)ⁿ = Σ[k=0..n] C(n, k) · a^(n-k) · b^k

Example 1. (x + 2)⁴: coefficients 1, 4, 6, 4, 1 with a = x, b = 2:

Text
x⁴ + 4x³·2 + 6x²·4 + 4x·8 + 16 = x⁴ + 8x³ + 24x² + 32x + 16

Example 2 (a minus sign). (2x - 1)³: treat as (2x + (-1))³ with coefficients 1, 3, 3, 1:

Text
(2x)³ + 3(2x)²(-1) + 3(2x)(-1)² + (-1)³ = 8x³ - 12x² + 6x - 1

Signs alternate when the second term is negative.

Finding a single term

The term with bᵏ is C(n, k)·a^(n-k)·bᵏ; this is the term number k + 1.

Example 3. The coefficient of x³ in (x + 3)⁷: k is the power of 3 where x^(7-k) = x³ gives k = 4. The term is C(7, 4)·x³·3⁴ = 35·81·x³ = 2835x³.

Example 4. The term without x (constant term) in (x + 1/x)⁶: the general term is C(6, k)·x^(6-k)·x^(-k) = C(6, k)·x^(6-2k). We need 6 - 2k = 0, so k = 3, and the constant term is C(6, 3) = 20.

Useful checks: the coefficients of (a + b)ⁿ sum to 2ⁿ (set a = b = 1), and the triangle is symmetric: C(n, k) = C(n, n - k).

Pascal's triangle by code

Python Build Pascal's triangle and C(n, k)

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Expand with SymPy

Python Check expansions

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What is C(6, 2)?

    6!/(2!·4!) = (6·5)/(2·1) = 15.
  2. 2. What are the coefficients in the expansion of (a + b)⁴?

    Row 4 of Pascal's triangle is 1, 4, 6, 4, 1.
  3. 3. Expand (x - 1)³.

    With coefficients 1, 3, 3, 1 and alternating signs from the -1: x³ - 3x² + 3x - 1.
  4. 4. What do the coefficients of (a + b)ⁿ add up to?

    Setting a = b = 1 gives (1 + 1)ⁿ = 2ⁿ.

Summary

  • (a + b)ⁿ = Σ C(n, k) a^(n-k) b^k, with k from 0 to n.
  • Coefficients come from Pascal's triangle: each entry is the sum of the two above it.
  • C(n, k) = n!/(k!(n - k)!) counts ways to choose k of n.
  • A single term is C(n, k)·a^(n-k)·bᵏ, which is term number k + 1.

Next: Practice Set: Radicals, Logs and Exponentials