Binomial theorem
Given the math problem (a+b)^2. You are required to expand it to its terms. There's different ways to
go about this. One way is to multiply (a+b) into (a+b). That would give us a(a) + a(b) + b(a) + b(b)
which would result in a^2 + ab + ba + b^2 which essentially is a^2 + 2ab + b^2. But
what if we replace the power 2 with some bigger number, say, 4. It becomes an impractical task solving this with rudimentary expansion.
And from the structure derived out of the simple problem we solved, we'll look at a solution that deals with arbitrarily huge expansions: The binomial theorem.
In one of my previous explainers on combinations and permutations I mentioned the binomial theorem was
a sample application of the concepts. Looking at the previous expansion a^2 + ab + ba + b^2 you
can probably tell why. This looks like different ways to arrange the terms (a,b) given 2 positions.
That is aa, ab, ba, bb. It also looks like arrangements of similar composition are grouped into one
and prefixed by their count.
ab and ba are grouped into one ab and prefixed with 2 to form 2ab. a^2 and b^2 appear once
so their prefix is a 1.
So the question then becomes a combinations problem. Given (a+b)^4. We'd be tasked with finding out alternative ways to fill these up with choices from the pool (a,b).
(a+b)(a+b)(a+b)(a+b) . For each position () of the 4, we can choose either one of a or b.
Alternative terms
- Term 1: a^4(b^0) (choose a for all)
- Term 2: a^3(b^1) (choose 3 a's , 1 b)
- Term 3: a^2(b^2) (choose 2 a's, 2 b)
- Term 4: a^1(b^3) (choose 1 a , 3 b)
- Term 5: a^0(b^4) (choose 0 a , 4 b)
- How many ways to choose 4 'a's? That's a 4 choose 4 which is a 1.
- How many ways to choose 3 'a's? That's a 4 choose 3 (P(4,3)), which is 4
- How many ways to choose 2 'a's? That's a 4 choose 2, which is 6
- …
(a+b)^4=a^4+4a^3b+6a^2b^2+4ab^3+b^4
The Pascal's triangle
n=0: 1
n=1: 1 1
n=2: 1 2 1
n=3: 1 3 3 1
n=4: 1 4 6 4 1
n=5: 1 5 10 10 5 1
For an expansion (a+b)^n, the coefficients can be easily derived from the Pascal's triangle by looking for the coinciding level `n`. For the previous example for instance, n was 4. The coefficients were 1, 4, 6, 4 and 1. Every number in the triangle except for the 1's at the edges is a sum of those on its top left and top right.
Applications of the binomial theorem
- Differentiation
- Term expansion (like we have already seen)