Binomial Expansion with Pascal's Triangle
Flip a coin five times — in how many ways could you land exactly three heads? Breeding pea
plants, dealing card hands, forecasting how often a backup system fails: whenever you count
the ways a string of yes/no choices can combine, the same numbers appear. They are the
binomial coefficients, and this page is where they come from.
Suppose someone asks you to expand (x + y)^5. You already know
how, in principle: multiply every term by every term — see
multiplying polynomials.
But count what that actually means. (x + y)^5 is five brackets
multiplied together, and every one of the five hands you a choice: take the
x or take the y. Two choices, five
times over — that is 2^5 = 32 separate products to write down,
sort, and collect before you're finished. Do it for the seventh power and you're wrangling
128.
Or — you can read the whole answer straight off a triangle of numbers that was already old
when Blaise Pascal was born. The triangle isn't a magic trick that happens to work:
it is the bookkeeping of all those products, done once, forever,
for every power at the same time. This page is about learning to read it.
Start small and watch the pattern appear. Expanding (a + b)^2
the long way gives:
(a + b)^2 = a^2 + 2ab + b^2
Look only at the numbers in front of each term — the coefficients. They are
1, 2, 1. Expand the next power and the pattern continues:
(a + b)^3 = a^3 + 3a^2b + 3ab^2 + b^3
The coefficients are now 1, 3, 3, 1. Two things are going on in
every expansion. First, the powers march in step: the powers of
a count down while the powers of
b count up, and in every single term they add to
n — that part follows the
.
Second, the coefficients form a pattern of their own. The interesting question is: where do
1, 3, 3, 1 come from — and what comes next?
Why the coefficients count choices
Here's the key insight, and it's worth slowing down for. Write
(a + b)^3 as three brackets:
(a + b)(a + b)(a + b)
Every product in the expansion is made by picking one letter from each
bracket. Pick a all three times and you get
a^3 — and there's only one way to do that, so the
coefficient of a^3 is 1. But to build
a^2b you need the b to come from
exactly one bracket — and it could be the first, the second, or the third. Three different
routes, all landing on the same term:
\underline{b}\,a\,a \quad\; a\,\underline{b}\,a \quad\; a\,a\,\underline{b}
Three ways, so the coefficient of a^2b is
3. A binomial coefficient is a count of choices:
it counts how many ways you can decide which brackets donate the
b.
And that's exactly why Pascal's famous rule — each entry is the sum of the two entries
above it — has to be true. Suppose you're choosing which brackets give a
b out of n brackets, and look at the
last bracket. Either it donates a b (and you finish the
job among the other n-1 brackets, needing one fewer
b), or it doesn't (and you find all your
b's among the other n-1). Two
separate piles, no overlap — so the count for n brackets is the
sum of two counts for n-1 brackets. That sum is precisely "add
the two numbers above." The triangle isn't decoration: every entry is a completed piece of
multiplication bookkeeping.
See it built — down to row 6
Pascal's triangle writes the choice-counts out directly. Start with a single
1 at the top (that's row 0 — the triangle counts
its rows from zero, matching the power n). Every row begins and
ends with 1, and each number inside is just the sum of
the two numbers above it. Step through the build below and watch each entry grow
from the pair above it — all the way down to row 6.
Read off any row to get the coefficients for that power: row 2
is 1, 2, 1 (that's (a+b)^2), row
3 is 1, 3, 3, 1, and row
5 — 1, 5, 10, 10, 5, 1 — is the answer
to our opening challenge, all 32 products of
(x+y)^5 collected for you:
(x+y)^5 = x^5 + 5x^4y + 10x^3y^2 + 10x^2y^3 + 5xy^4 + y^5
A quick sanity check you can always run: the entries of row n
add up to 2^n — because they're counting up all
2^n of the raw products. Row 5's entries sum to
1+5+10+10+5+1 = 32. If your row doesn't sum to a power of
2, an addition slipped somewhere. The triangle's diagonals are
themselves famous
.
Worked example: expand (x + 2)^4
Now put the triangle to work on a binomial where the second term is a number. Here
a = x, b = 2 and
n = 4, so we take row 4:
1, 4, 6, 4, 1. Lay out the skeleton first — coefficients in
order, powers of x descending, powers of
2 ascending:
(x+2)^4 = 1\cdot x^4 + 4\cdot x^3(2) + 6\cdot x^2(2)^2 + 4\cdot x(2)^3 + 1\cdot(2)^4
This is where marks are won and lost: track the powers of the 2 carefully.
The 2 isn't a bystander — it climbs through
2^0, 2^1, 2^2, 2^3, 2^4 just as x
descends. Evaluate each term:
= x^4 + 4x^3(2) + 6x^2(4) + 4x(8) + 16
= x^4 + 8x^3 + 24x^2 + 32x + 16
Notice the final coefficients 1, 8, 24, 32, 16 are not
the Pascal row — they're the Pascal row with the powers of 2
multiplied in. The triangle gives you the counting; the powers of b
do the rest.
Worked example: expand (2x - 1)^3
Two new wrinkles at once: the first term carries a coefficient
(a = 2x), and the second is negative
(b = -1). The method doesn't change — but both the
coefficient and the sign must ride along inside their brackets, all the way through
every power. Row 3 is 1, 3, 3, 1:
(2x-1)^3 = 1\cdot(2x)^3 + 3\cdot(2x)^2(-1) + 3\cdot(2x)(-1)^2 + 1\cdot(-1)^3
Now work each term in full, keeping the brackets until the last moment:
1\cdot(2x)^3 = 1\cdot 8x^3 = 8x^3
3\cdot(2x)^2(-1) = 3\cdot 4x^2\cdot(-1) = -12x^2
3\cdot(2x)(-1)^2 = 3\cdot 2x\cdot 1 = 6x
1\cdot(-1)^3 = -1
Assemble:
(2x-1)^3 = 8x^3 - 12x^2 + 6x - 1
Two things to admire in that answer. The leading term is 8x^3,
not 2x^3 — because (2x)^3 cubes the
2 as well as the x. And the signs
alternate +,-,+,- — because odd powers of
(-1) are negative and even powers are positive. Both facts fall
out automatically if you keep the whole of a and the whole of
b, sign included, inside the brackets.
Worked example: one coefficient, no full expansion
Exam questions often ask for a single term: say, the coefficient of
x^2 in (x + 3)^5. Expanding all six
terms would work, but it's five terms of wasted effort. Instead, aim straight at the one
you need.
Row 5 is 1, 5, 10, 10, 5, 1, and the general shape of each term
is (\text{row entry}) \cdot x^{5-k} \cdot 3^k, the two powers
always summing to 5. We want the power of
x to be 2, so the
3 must be raised to the power 3 —
and the matching row entry (the fourth one, partnering x^2 with
3^3) is 10:
10 \cdot x^2 \cdot 3^3 = 10 \cdot x^2 \cdot 27 = 270x^2
The coefficient of x^2 is 270. One
term, three small multiplications, done. This "surgical strike" — pick the row entry, pair
it with the right powers, evaluate — is the skill the quiz below will press on hardest.
Nearly every lost mark on a binomial expansion is one of these:
-
The powers of both terms move. As the power of
a steps down n, n-1, \dots, 0, the
power of b steps up 0, 1, \dots, n —
and in every term the two powers sum to n.
Writing b to the first power in every term is the classic
rushed-expansion error. Check each term: do the powers add to
n?
-
The whole of each term gets the power. In
(2x)^3 the 2 is cubed along with the
x: it's 8x^3, not
2x^3. Keep a in brackets —
(2x)^2 = 4x^2, (2x)^3 = 8x^3 — and
simplify only at the end.
-
For (a - b)^n the signs alternate. Treat it as
(a + (-b))^n: odd powers of (-b)
come out negative, even powers positive, so the terms run
+, -, +, -, \dots Drop the brackets around the
-b too early and the minus signs get lost.
Not Pascal's — or at least, not only his. The triangle turns up in
Pingala's work on Sanskrit poetry metres in ancient India (as counts of
syllable patterns — the same "choices" we counted above), in the algebra of
Al-Karaji in 10th-century Baghdad, and in China, where it is still called
Yang Hui's triangle after the 13th-century mathematician who printed it —
himself crediting an even earlier scholar, Jia Xian. Pascal's contribution, in 1654, was a
beautiful systematic treatise on its properties; Europe attached his name, and it stuck.
The triangle also hides an absurd number of easter eggs:
-
Row sums: each row adds to a power of 2 —
1, 2, 4, 8, 16, \dots — because a row counts all the raw
products of that power's expansion.
-
Fibonacci in hiding: add along the shallow diagonals and out come
1, 1, 2, 3, 5, 8, 13, \dots
-
A fractal: shade only the odd entries and, as you draw more and more
rows, the Sierpinski triangle — an infinitely nested pattern of triangles — appears out of
pure arithmetic.
Every one of these is a theorem about counting, wearing a party costume.
See it explained
Sal Khan builds Pascal's triangle and uses it to expand binomials — a good second pass at
everything above, in a different voice.