The Beauty of the Binomial Expansion
Keith McNulty
Leader in Technology, Science and Analytics | Mathematician, Statistician and Psychometrician | Author and Teacher | Coder, Engineer, Architect
I’m going to take a sum of two terms a+b and I am going to square it. If you remember from your quadratic expansions from high school, you get the following:
Now let’s take the same expression and cube it — it’s a bit more work, but you really just have to multiply the above by a+b again:
Doing the fourth and fifth powers is basically the same again, but of course each time the amount of work gets harder. Here’s what they come out as:
You may be noticing a few patterns here. For example, the coefficient of the maximal index terms in a and b (the first and last term) is always 1. The coefficient of the maximal-but-one index terms (the second and the second-from-last term) is always the same as the expansion index. You can also see a symmetry to the coefficients, kind of like they are climbing up a hill and then back down again. Further exploration of this opens up a whole new branch of mathematics.
Pascal’s Triangle
Let’s write the coefficients of each successive power in the form of a triangle, with a nominal zero power at the top, and then the coefficients of the first power, square, cube, fourth power, etc in each row. Here it is up to the seventh power:
The infinitely long version of this triangle is called Pascal’s Triangle and it is named after the French mathematician Blaise Pascal. It’s a kind of fake claim to fame for Pascal, because this triangle had been known for many centuries before he published it to solve a number of problems in probability theory. It is believed that it first originated in Persia around the turn of the first millennium, and was also independently known in China around this time.
As well as the properties we already mentioned about the coefficients in this triangle, there is one other very special property that you may be able to spot, and is used by many high school students to work out the coefficients of early power binomial expansions. If you look carefully, you can see that numbers inside the triangle can be obtained by summing the two numbers directly above. Fill in the gaps in this image by adding the two numbers directly above each blank hexagon and check your answers against Pascal's triangle above:
Later we will formally prove this to be the case, but before that, let’s dive into some more mathematical wonderment.
Permutations and combinations
The concept of a permutation and a combination is crucial in many branches of mathematics and comes up strongly in the study of the binomial expansion.
Let’s imagine I eat three servings of delicious fruit daily. I have five different fruit servings available to me, and I cannot have more than one serving of the same fruit in a day. I write down each day which fruit I am going to eat for breakfast, for lunch and for dinner. Today I have decided to eat bananas for breakfast, strawberries for lunch, and kiwi fruit for dinner. Tomorrow I will eat bananas for breakfast, kiwi fruit for lunch and strawberries for dinner.
One could say that my meal plan today is different from my meal plan tomorrow, because I have eaten the same fruit in a different order. Another could say that my meal plan today and tomorrow is the same, because I have eaten the same fruit overall. If we are concerned with the order of objects, we call the different scenarios permutations. If we are not concerned with the order of objects, we call the different scenarios combinations.
If we consider a different order of meal to be a different meal plan, then there are sixty different meal plans that I could potentially write down. Why sixty? Well, first there are five fruits I could choose for the first meal, then four for the second meal, and then finally three for the third meal. So 5?4?3 = 60. In general, if there are n objects to choose from without replacement, we can say that if we are allowed to pick all n objects, we would have n?(n-1)?(n-2)?…?1 = n! permutations of choices. But if we are only allowed to pick r objects, the last n-r choices would not be available, so the total number of permutations would be:
If we consider that order doesn’t matter and all that matters is how much of each fruit I eat in a day, then there are ten different meal plans that I could write down. Why ten? Well, if we take any set of three distinct objects, there are 3?2?1 = 6 different ways of ordering them. So our sixty permutations of fruit above, should be divided by six in order to ignore the ordering, giving us ten combinations of fruit. In general, there are r! ways of ordering r distinct objects, so to get the number of combinations of r objects from a choice of n, you simply divide the number of permutations by r!, hence ‘n choose r’:
Another way mathematicians write ‘n choose r’ is as follows:
领英推荐
Back to the binomial expansion
Do you see how my little diversion into the delicious fruit meal plan is relevant to our binomial expansion? When we expand binomially, we are gathering permutations of the terms a and b. So, for example, when we square a+b using a longhand method, we are actually doing the following:
Similarly for the cube, we are doing this:
For each term of the n-th power binomial expansion, we can see that we are expanding permutations of n choices of the two terms a and b such that b appears r times and a appears n-r times. But because multiplication has no regard for order, we then gather like terms to calculate how many combinations of those terms there are. Written mathematically, our general equation now becomes:
Let’s verify, as per Pascal’s triangle, that the coefficient of a?b3 in the seventh power expansion is indeed 35:
Proving our beautiful summation property of Pascal’s triangle
Now that we have a powerful general form for binomial coefficients, we can expand to higher powers to our heart’s content without having to laboriously notate Pascal’s triangle. We can also prove that each inner term of Pascal’s triangle can be obtained by summing the two terms directly. above it. Mathematically, this result can be written as follows:
Theorem: For positive integers r and n with r < n
Proof: First, using a bit of factorial trickery, we can rewrite the first term as follows:
Using a similar trickery for the second term, we have:
If we sum these two terms we obtain:
and we are done.
What did you think of our little journey through the binomial expansion? Feel free to comment!
Copilot Studio, Azure AI, Power Platform @ Microsoft
2 个月Teaching is a highest form of learning ??
Specializing in Backend API design and development, with an emphasis on GraphQL.
2 个月Was just studying this in chapter 2 of Spivak's Calculus book, it's such a great way to visually demonstrate a proof by induction.
Washington University Faculty
2 个月There are numerous higher-level, seemingly profound identities related to the numbers of combinations, like the so-called "hocky stick" identity (https://en.wikipedia.org/wiki/Hockey-stick_identity), but a practical one that I'm certain is frequently rediscovered by programmers who need a particular row of coefficients (without wanting to go through computationally inefficient factorials or traversing through the Triangle starting from the top) is: C(n,k) = C(n,k-1) * (n-k+1) / k with C(n,0) = 1. Here, "C" is the number of combinations, i.e. values within the n-th row of Pascal's Triangle. It is trivial to show this relation by evaluating the ratio of C(n,k)/C(n,k-1) using the definition of combinations, the resulting ratio being (n-k+1)/k.
Analytics leader, advisor, and coach
2 个月I love this! So much coming back to me from high school math but now rendered so much more interesting. Thank you, Keith McNulty - you made my day.
Hi Keith, you touched upon something that I was very fond of when I was in my 3rd year of engineering (that was 21 years ago :)). I had realized on my own that there is relationship between Pascal traingles and Fibonacci series. Furthermore, K maps that are studied as part of logic design also involve binomial expansion and are thus related to Pascal triangles. In fact K maps are the easiest ways to explain combinations visually. Good post. Thanks for sharing.