Try expanding by hand. Go on, multiply it out term by term.
You'll be there a while. Ten factors of , each one splitting into two branches, the whole thing exploding into over a thousand pieces before you even start combining like terms.
And yet there's a two-line formula that spits out the answer instantly. It's called the binomial theorem, and once you see where it actually comes from, it stops looking like a memorized rule and starts looking obvious.
Small cases first: what's the pattern?
Let's not jump straight to . Start small.
Look at just the numbers out front: 1, 1. Then 1, 2, 1. Then 1, 3, 3, 1. And hey, notice that each row is symmetric, it reads the same forwards and backwards.
Also notice the powers. In every term, the power of and the power of add up to . As you move left to right, 's power counts down while 's power counts up. That part's easy to see just from multiplying things out.
The coefficients are the mystery. Where do 1, 3, 3, 1 actually come from? That's the real content of the binomial theorem, and it has nothing to do with algebra tricks. It's about counting.
Where the coefficients actually come from
Here's a way to think about that has nothing to do with expanding polynomials. Picture three switches in a row. Each switch can be flipped to or flipped to .
If you flip all three to , you get one specific outcome: . There's only one way to do that. Same for flipping all three to : only one way, .
But what about getting exactly one and two 's? You could put the in switch one, switch two, or switch three. Three different arrangements, all producing the same term when you multiply them out, because .
That's exactly why the coefficient of is 3. It's not a coincidence and it's not algebra magic, it's just counting how many ways you can choose which switches land on .
This is the same lattice-of-choices idea that builds Pascal's triangle, where every entry is the sum of the two above it because every path to a cell has to come from one step left or one step right of the row before.
Every number is the sum of the two above it. Drag n and watch row n light up, that row is exactly the list of coefficients in $(x+y)^n$.
Drag up and down. Watch how row 3 really is 1, 3, 3, 1, and row 5 really is 1, 5, 10, 10, 5, 1. Hover a circle and you'll see exactly which two numbers above it got added together to make it. The whole triangle builds itself from nothing but addition, one row at a time.
Now we can name the thing we've been counting. "How many ways to choose switches out of to flip to " gets written as
read as " choose ". If you've seen this notation before in the context of probability, that's the exact same idea. Our permutations vs combinations guide walks through why order doesn't matter here, which is precisely why and collapse into the same count.
Putting the whole expansion together
We now have both pieces. The coefficient of the term with copies of is . The term itself is , since the other switches landed on .
Multiply those together and sum over every possible , and you get the full binomial theorem:
That's it. That's the whole theorem. Not a rule to memorize, just "count the arrangements, multiply by the term, add them all up."
Watch the full expansion of $(x+y)^n$ assemble, term by term. The power of x always counts down while the power of y counts up, and the coefficients come straight from row n of the triangle.
Slide and watch the full expansion rebuild itself. Hover any term and it'll tell you exactly what it's counting: choose of the factors to hand over to , and the rest default to . And notice the sum of all the coefficients always lands on , that's because is the total number of ways to flip switches, period, before you even sort them by how many landed on .
Not every term matters equally
Here's something the formula doesn't shout about: when and are actual numbers instead of symbols, the terms are wildly unequal in size. Some barely register. One or two usually dominate the entire sum.
Each bar is one term, C(n, k) times y to the k. Drag y and watch which term stops being negligible and starts running the show.
Set small, near 0.1, and watch the bars. The first couple of terms tower over everything else, the higher powers of shrink so fast they barely show up. Now drag up past 1, and the balance shifts hard toward the high- terms instead.
This matters because it means you rarely need the whole expansion. If is small, the first two or three terms already capture almost all of the total. The rest is noise you can safely ignore.
The shortcut hiding inside: approximation
That last observation leads somewhere genuinely useful. Take large and small, say estimating without a calculator.
Expand it with the binomial theorem:
When is small, is much smaller, and is smaller still. So the first two terms alone give a solid estimate:
That single line is the engine behind quick compound-interest estimates, error propagation in physics, and a dozen other back-of-envelope calculations. It's the same growth idea covered in the math behind compound interest, just approached from the expansion side instead of the exponential side.
Hit play and watch the truncated expansion catch up to the real curve, one term at a time. Near x = 0, just the first couple of terms already get you close.
Hit play. Watch the amber curve, built from only a handful of terms, chase down the true white curve as more terms get added. Near they're already nearly indistinguishable after just two terms. Push further from zero and you'll see the approximation start to peel away, because the higher-order terms we dropped stop being negligible.
The short version
The binomial theorem is a counting statement wearing algebra's clothes. Expanding means picking, for each of factors, whether it contributes an or a . The coefficient of any term is just the number of ways to make that choice, which is , and Pascal's triangle is nothing more than that counting problem laid out row by row.
When the numbers get real, not every term pulls equal weight. A handful of terms near the front usually carry almost the entire sum, which is exactly why works so well for small . The full theorem gives you exactness. The first couple of terms give you a shortcut you can trust.
Next time you see , you won't reach for a thousand terms of brute multiplication. You'll reach for row 10 of the triangle instead.
All visualizations run live in the browser: Pascal's triangle is built directly from the recursive sum, the expansion and term weights are computed from the exact binomial coefficients, and the approximation curve is drawn from partial sums, no libraries beyond React.