Binomial theorem (source code)

= Binomial theorem
{title2=$(x+y)^n=\sum_{k=0}^n\binom nkx^ky^{n-k}$}
{wiki}

= Binomial formula
{synonym}

For a <nonnegative integer> $n$ and <commuting> quantities $x,y$,
$$
(x+y)^n=\sum_{k=0}^n\binom nkx^ky^{n-k}.
$$
In expanding the $n$ factors, obtain $x^ky^{n-k}$ by selecting the $k$ positions that contribute $x$. There are $\binom nk$ such choices. For example,
$$
(x+y)^5=x^5+5x^4y+10x^3y^2+10x^2y^3+5xy^4+y^5.
$$
The coefficients are row five of <Pascal's triangle>, in reverse order under the displayed $x^ky^{n-k}$ convention; the row is symmetric. Setting $x=y=1$ gives $1+5+10+10+5+1=32$, the number of <subsets> of a five-element <set>. Each member has two inclusion choices, agreeing with the <rule of product> and the <cardinality> of the <power set>.