Understanding binomial expansion

binomial theoremcombinatorics

Self studying Basic matematics, by Lang.

enter image description here

Stuck in this section. Does someone know what “select x from k factors” mean?

Best Answer

Let's look at the examples $(x + y)^3$ and $(x + y)^3$.

By direct computation, we obtain \begin{align*} (x + y)^3 & = (x + y)(x + y)^2\\ & = (x + y)[(x + y)(x + y)]\\ & = (x + y)[x(x + y) + y(x + y)]\\ & = (x + y)(x^2 + xy + xy + y^2)\\ & = (x + y)(x^2 + 2xy + y^2)\\ & = x(x^2 + 2xy + y^2) + y(x^2 + 2xy + y^2)\\ & = x^3 + 2x^2y + xy^2 + x^2y + 2xy^2 + y^3\\ & = x^3 + 3x^2y + 3xy^2 + y^3 \end{align*} and \begin{align*} (x + y)^4 & = (x + y)(x + y)^3\\ & = (x + y)(x^3 + 3x^2y + 3xy^2 + y^3)\\ & = x(x^3 + 3x^2y + 3xy^2 + y^3) + y(x^3 + 3x^2y + 3xy^2 + y^3)\\ & = x^4 + 3x^3y + 3x^2y^2 + xy^3 + x^3y + 3x^2y^2 + 3xy^3 + y^4\\ & = x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + y^4 \end{align*}

Now, let's look at what the theorem is saying: If $n = 3$, we have $$(x + y)^3 = (x + y)(x + y)(x + y)$$ Each term of the product is formed by selecting either an $x$ or $y$ from each of the three factors.

There are $2^3 = 8$ possibilities: $$ \begin{array}{c c c c} \text{first factor} & \text{second factor} & \text{third factor} & \text{product} & \text{simplified product}\\ x & x & x & xxx & x^3\\ x & x & y & xxy & x^2y\\ x & y & x & xyx & x^2y\\ x & y & y & xyy & xy^2\\ y & x & x & yxx & x^2y\\ y & x & y & yxy & xy^2\\ y & y & x & yyx & xy^2\\ y & y & y & yyy & y^3 \end{array} $$ Adding the terms yields $(x + y)^3 = x^3 + 3x^2y + 3xy^2 + y^3$.

If $n = 4$, then $$(x + y)^4 = (x + y)(x + y)(x + y)(x + y)$$ To form, the product, we take either an $x$ or a $y$ from each of the four factors, which gives us $2^4 = 16$ terms.

$$ \begin{array}{c c c c} \text{first factor} & \text{second factor} & \text{third factor} & \text{fourth factor} & \text{product} & \text{simplified product}\\ x & x & x & x & xxxx & x^4\\ x & x & x & y & xxxy & x^3y\\ x & x & y & x & xxyx & x^3y\\ x & x & y & y & xxyy & x^2y^2\\ x & y & x & x & xyxx & x^3y\\ x & y & x & y & xyxy & x^2y^2\\ x & y & y & x & xyyx & x^2y^2\\ x & y & y & y & xyyy & xy^3\\ y & x & x & x & yxxx & x^3y\\ y & x & x & y & yxxy & x^2y^2\\ y & x & y & x & yxyx & x^2y^2\\ y & x & y & y & yxyy & xy^3\\ y & y & x & x & yyxx & x^2y^2\\ y & y & x & y & yyxy & xy^3\\ y & y & y & x & yyyx & xy^3\\ y & y & y & y & yyyy & y^4 \end{array} $$ Adding the terms yields $(x + y)^4 = x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + y^4$.

Furthermore, \begin{align*} (x + y)^3 & = x^3 + 3x^2y + 3xy^2 + y^3\\ & = \binom{3}{3}x^3y^0 + \binom{3}{2}x^2y + \binom{3}{1}xy^2 + \binom{3}{0}x^0y^3\\ & = \sum_{k = 0}^{3} \binom{3}{k}x^ky^{3 - k} \end{align*} and \begin{align*} (x + y)^4 & = x^4 + 4x^3y + 6x^2y^2 + 4xy^3 + y^4\\ & = \binom{4}{4}x^4y^0 + \binom{4}{3}x^3y + \binom{4}{2}x^2y^2 + \binom{4}{1}x^1y^3 + \binom{4}{0}x^0y^4\\ & = \sum_{k = 0}^{4} \binom{4}{k}x^ky^{4 - k} \end{align*} Notice that the coefficient of $x^ky^{n - k}$ is equal to the number of times the factor $x$ appears in the product $x^ky^{n - k}$, which is the number of ways we can select $k$ factors of $x$ and $n - k$ factors of $y$ from the $n$ factors in the product $(x + y)^n$.

Related Question