# The Binomial Theorem

The binomial theorem gives us a way to quickly expand a binomial raised to the $n^{th}$ power (where $n$ is a non-negative integer). Specifically:

$$(x+y)^n = x^n + {}_nC_1 x^{n-1} y + {}_nC_2 x^{n-2} y^2 + {}_nC_3 x^{n-3} y^3 + \cdots + {}_nC_{n-1} x y^{n-1} + y^n$$

To see why this works, consider the terms of the expansion of

$$(x+y)^n = \underbrace{(x+y)(x+y)(x+y) \cdots (x+y)}_{n \textrm{ factors}}$$

Each term is formed by choosing either an $x$ or a $y$ from the first factor, and then choosing either an $x$ or a $y$ from the second factor, and then choosing an $x$ or a $y$ from the third factor, etc... up to finally choosing an $x$ or a $y$ from the $n^{th}$ factor, and then multiplying all of these together.

As such, each of these terms will consist of some number of $x$'s multiplied by some number of $y$'s, where the total number of $x$'s and $y$'s is $n$. For example, choosing $y$ from the first two factors, and $x$ from the rest will produce the term $x^{n-2}y^2$. Alternatively, choosing $x$ from the first $7$ factors and $y$ from the rest results in the term $x^7 y^{n-7}$.

Let's consider a specific example. Consider the terms we see from expanding the following expression (assuming we don't collect any "like terms" along the way):

$$\begin{array}{rcl} (x+y)^4 &=& (x+y)(x+y)(x^2 + xy + xy + y^2)\\\\ &=&(x+y)(x^3 + x^2y + x^2y + xy^2 + x^2y + xy^2 + y^3)\\\\ &=&x^4 + x^3y + x^3y + x^2y^2 +x^3y+x^2y^2 + xy^3 + x^3y + x^2 y^2 + x^2 y^2 + x y^3 + x y^3 + y^4 \end{array}$$

Do you see how every term above takes the form $x^a y^b$ with $a+b=4$?

Now, when we finally "collect like terms", the resulting coefficient on $x^ay^b$ will be the number of times it appears in the expansion. As such, to figure out the coefficient on $x^ay^b$, we just need to figure out how many ways we can form a term that looks like $x^ay^b$.

Consider the terms $xy^3$ above. Note these terms were formed by letting three of the four $(x+y)$ factors contribute a $y$ to the product, with the remaining factor contributing an $x$. As such, the number of these terms will be given by the number of ways we can take $4$ factors and choose $3$ of them to contribute a $y$. In the parlance of combinations, this is given by ${}_4C_3$.

Likewise, the terms $x^2y^2$ were formed by letting $2$ of the $4$ factors contribute a $y$ to the product, with the remaining factors contributing a $x$. Consequently, the number of such terms will be equal to the number of ways we can can take $4$ factors and choose $2$ of them to contribute a $y$. Again, in terms of combinations, this is given by ${}_4C_2$.

In general, we can form terms of the form $x^{n-k}y^k$ by taking $n$ of our factors and choosing $k$ of them to contribute a $y$, which is given in the language of combinations by ${}_nC_k$.

Given that the non-collected terms of the expansion of $(x+y)^n$ can have as few as zero $y$'s or at most $n$ of them (with every integer possibility between), our possible terms are

$$x^n, \quad x^{n-1} y, \quad x^{n-2} y^2, \quad \ldots, \quad x y^{n-1}, \quad y^n$$

Finally, noting that in the expansion of $(x+y)^n$, each $x^{n-k}y^k$ occurs ${}_nC_k$ times, we have:

$$(x+y)^n = x^n + {}_nC_1 x^{n-1} y + {}_nC_2 x^{n-2} y^2 + {}_nC_3 x^{n-3} y^3 + \cdots + {}_nC_{n-1} x y^{n-1} + y^n$$