Binomial Theorem
The binomial theorem expands a plus b to any power without multiplying it out, with coefficients that count the ways to choose each mix of terms.
Why Does This Exist?
Multiplying out by hand means 1024 micro-products before collecting like terms: slow, error-prone, and pointless, because the pattern is fully known. The binomial theorem writes the answer directly: each coefficient counts how many micro-products produce that term. It converts exponential mechanical work into one counting lookup per term.
It is the backbone of anything with two outcomes repeated: coin flips, click versus skip, success counts in trials. The binomial distribution is this theorem normalized into probabilities, and polynomial feature expansions lean on the same coefficients. Counting foundations are in combinatorics and counting; the probability sequel is probability distributions.
The one idea you need first
" choose ," written , counts the ways to pick items from : . Expanding creates one micro-product per -letter word in and ; the term collects exactly the words with copies of . Its coefficient must be : that is the whole theorem in one sentence.
Think of It Like This
Three coin flips and the scoreboard
Flip a coin three times and list all 8 outcomes: HHH, HHT, HTH, THH, HTT, THT, TTH, TTT. Group by number of tails: one outcome with none, three with one, three with two, one with three. The group sizes are the expansion coefficients: each counts the routes to that mix.
Pascal's triangle is the scoreboard across flip counts: each entry sums the two above because each route to this mix extends a route from the previous round. The analogy stops at signs: with the counts still hold but terms alternate sign, which coins cannot show.
How It Actually Works
For non-negative integer :
In plain words: the sum runs over , the number of factors; counts the micro-products with that mix; is the term they share. The coefficients of row of Pascal's triangle are exactly these counts, each the sum of the two above it: .
Two instant checks: setting gives (all outcomes counted); setting gives alternating sum for (cancellation). Any expansion failing these is wrong.
Worked example
Expand with row :
Verify three ways. At : . At : . And confirms the middle coefficient by direct counting. Expansion, powers, and combinatorics all agree.
Code
Expand symbolically by counting, then verify numerically.
import math
n = 3coeffs = [math.comb(n, k) for k in range(n + 1)]print(coeffs) # -> [1, 3, 3, 1]print(sum(coeffs)) # -> 8a, b = 2.0, 1.0print(sum(c * a ** (n - k) * b**k for k, c in enumerate(coeffs))) # -> 27.0Coefficients , total 8, value : counting and arithmetic coincide.
Watch Out For
Applying it with a minus and dropping the alternation
is : odd- terms go negative, giving . Forgetting the alternation and reusing plus signs produces , wrong wherever is nonzero.
Substitute explicitly before reading coefficients. If an expansion of a difference has all positive terms, the signs were dropped.
Generalizing to non-integer powers term by term
is not a four-term polynomial: non-integer exponents need the infinite Newton series with generalized coefficients, which converges only under conditions ( for the standard form). Truncating after terms of the finite pattern gives a wrong "exact" answer.
Check the exponent is a non-negative integer before using the finite form. Otherwise reach for the generalized series and state its convergence region.
The Quick Version
- sums : coefficients count the routes to each mix.
- Row expands the cube: .
- Coefficients always sum to ; alternating sum is 0.
- At the cube gives , confirmed three ways.
- Pascal entries sum from the pair above: .
- Minuses alternate signs; fractional powers need the infinite series, not this form.