# Pascal's Triangle

While trying to solve a problem about gambling, Blaise Pascal discovered Pascal’s triangle (Benjamin, 2009 pg. 19). As we will see soon, this triangle relates to other topics in combinatorics quite heavily.

In digression, suppose that you wanted to figure out the expansion of an equation such as $$\left(x+y\right)^2$$.We may write this as follows $$\left(x+y\right)\left(x+y\right)=x^2+2xy+y^2$$.

Now suppose we wanted to expand out $$\left(x+y\right)^3$$.
We may write out $$\left(x+y\right)\left(x+y\right)\left(x+y\right)=x^2+xy+y^2\left(x+y\right)=x^3+3x^2y+3xy^2+y^3$$.
Notice that if we write the coefficients of these polynomials in the form of a triangle, we will see a pattern

This is not a coincidence. The expansions of the form are actually predicted via the Binomial theorem (used to create Pascal's triangle). To predict coefficients of these equations one can use the formula for n choose k as seen below.

For example, suppose we wanted to find the coefficient for the term $$x^6y^{10}$$ of the expansion $$\left(5x+2y\right)^{16}$$.

You would use "n choose k" (or 16 choose 6) multiplied by the current x and y coefficients (5 and 2) to the appropriate powers.

This would be equivalent to: $$\frac{16!}{10!6!}5^62^{10}$$ or $$128,128,000,000$$.