Skip to main content
Algebra / choosing, multiplying, counting

Where do the coefficients come from?

What happens when the same bracket is multiplied by itself many times, as in (a+b)5(a + b)^5? Writing out every product soon takes a long time, yet expansions like this keep appearing. For example, finding the slope of a curve such as y=x3y = x^3 needs (x+h)3(x + h)^3, the same kind of expression that the derivative page uses for x2x^2. Counting problems lead to the same structure, because each bracket offers a choice between two terms. To expand two brackets, we multiply every term in one bracket by every term in the other (the factorisation page uses this). Here we look for a quicker way to handle many brackets. That slope example is only one place where these expansions appear; if it is new to you, skip it for now. What follows starts from bracket multiplication and counting.

Let us begin with (a+b)2(a + b)^2, which means (a+b)(a+b)(a + b)(a + b). Why does this give 2ab2ab rather than just abab? We will write out the four products first, then add one more bracket. Keeping track of these choices will help us find the pattern for larger powers.

aone termbthe other termLetters are numbers, not objects being drawn at random.

01Two brackets. Four selections.

The distributive law says x(a+b)=xa+xbx(a+b)=xa+xb: multiply by each term and add. Apply it to both brackets. Take a or b from the first bracket, then a or b from the second. Play the animation, pause it, or collect one product at a time.

Choose → multiply → collect0 / 4 selections collected
(a+b)²=(a+b)(a+b)BRACKET 1()+abBRACKET 2()+abSame product → same groupa²0selectionsab0selectionsb²0selections
01

The exponent 2 means 2 copies of (a+b), multiplied together. To expand, take one letter from every bracket and multiply those letters.

0%
Collect every selection to assemble the expansion.

The selections ab and ba come from different bracket positions. But ordinary numbers satisfy ab = ba, so their products are equal. Adding them gives ab + ab = 2ab. The 2 in a² counts factors of a; the 2 in 2ab counts equal products being added.

02Three brackets. Count the positions.

Now each selection uses three letters, so its exponents always add to 3. To obtain a2ba^2b, two brackets must supply a and the remaining bracket must supply bb. Watch all eight selections, then compare the three ways to obtain a2ba^2b.

Choose → multiply → collect0 / 8 selections collected
(a+b)³=(a+b)(a+b)(a+b)BRACKET 1()+abBRACKET 2()+abBRACKET 3()+abSame product → same groupa³0selectionsa²b0selectionsab²0selectionsb³0selections
01

The exponent 3 means 3 copies of (a+b), multiplied together. To expand, take one letter from every bracket and multiply those letters.

0%
Collect every selection to assemble the expansion.

Why does a2ba^2b appear three times?

The brackets occupy three distinct positions. Choose two positions for a, and the remaining position must supply b. Equivalently, choose just that one b position.

1a
2a
3b

Choose position 1, 2

1a
2b
3a

Choose position 1, 3

1b
2a
3a

Choose position 2, 3

(32)=(31)=3\binom{3}{2}=\binom{3}{1}=3

These are two ways to count the same three selections, not six different selections. A combination counts which positions you choose; it does not count the order in which you click them.

nCr=(nr){}^nC_r=\binom{n}{r}

Read this as “n choose r”. nn is the total number of available positions; rr is how many positions to choose. Here n=3n = 3 and r=2r = 2 (for aa), or r=1r = 1 (for bb).

03nn brackets. Choose kk of them for aa.

Let kk count the brackets that supply a. Every other bracket supplies bb, giving n−kn-k copies of bb. The product is akbn−ka^kb^{n-k}. Its coefficient is “n choose k”, because any selection of those kk positions produces that same product. kk now plays the role of rr in nCrnCr.

Every coefficient is a countn = 5, k = 2
5
2
a⋅a⋅b⋅b⋅b=a2b3a \cdot a \cdot b \cdot b \cdot b=a^{2}b^{3}

2 copies of a and 3 copies of b. Click any bracket above to change its choice.

(52)\binom{5}{2} = 10 different selections give this same product.

COUNT

Choose 2 positions from 5 for a. The remaining 3 positions must supply b. There are 10 such choices, so the coefficient of a²b³ is 10.

(a+b)⁵ =+++++

The terms run from zero a’s to n a’s. Click a term to inspect every selection behind its coefficient. Reordering the terms does not change their sum.

(a+b)n=(n0)bn+(n1)abn−1+⋯+(nk)akbn−k+⋯+(nn)an(a+b)^n=\binom n0 b^n+\binom n1 ab^{n-1}+\cdots+\binom nk a^k b^{n-k}+\cdots+\binom nn a^n

Start with k=0k=0: take bb from every bracket, giving bnb^n once. Increase kk one at a time, until k=nk=n: take a from every bracket, giving ana^n once. This lists every selection exactly once, grouped by its product.

(a+b)n=∑k=0n(nk)akbn−k\boxed{(a+b)^n=\sum_{k=0}^{n}\binom nk a^k b^{n-k}}

Σ\Sigma means “add these terms”. The bottom k=0k=0 tells you where to start; the top nn tells you where to stop. The powers tell you what was chosen; the coefficient tells you how many ways it could be chosen. This is the binomial theorem.

Here nn is a nonnegative integer. A factor with exponent zero is omitted; for n=0n=0 the expansion is 1. The interactive display reaches n=8n=8, but the counting argument works for every nonnegative integer nn.

Sign in to see more

Sign in to continue the rest of this lesson and keep your progress in sync.