In elementary algebra, the **binomial theorem** (or **binomial expansion**) describes the algebraic expansion of powers of a binomial. According to the theorem, it is possible to expand the polynomial (*x* + *y*)^{n} into a sum involving terms of the form *ax*^{b}*y*^{c}, where the exponents b and c are nonnegative integers with *b* + *c* = *n*, and the coefficient a of each term is a specific positive integer depending on n and b. For example, for *n* = 4,

The coefficient a in the term of *ax*^{b}*y*^{c} is known as the binomial coefficient or (the two have the same value). These coefficients for varying n and b can be arranged to form Pascal's triangle. These numbers also occur in combinatorics, where gives the number of different combinations of b elements that can be chosen from an n-element set. Therefore is often pronounced as "n choose b".

Special cases of the binomial theorem were known since at least the 4th century BC when Greek mathematician Euclid mentioned the special case of the binomial theorem for exponent 2.^{[1]}^{[2]} Greek mathematican Diophantus cubed various binomials, including .^{[2]} Indian mathematican Aryabhata's method for finding cube roots, from around 510 CE, suggests that he knew the binomial formula for exponent 3.^{[2]}

Binomial coefficients, as combinatorial quantities expressing the number of ways of selecting k objects out of n without replacement, were of interest to ancient Indian mathematicians. The earliest known reference to this combinatorial problem is the *Chandaḥśāstra* by the Indian lyricist Pingala (c. 200 BC), which contains a method for its solution.^{[3]}^{: 230 } The commentator Halayudha from the 10th century AD explains this method.^{[3]}^{[page needed]} By the 6th century AD, the Indian mathematicians probably knew how to express this as a quotient ,^{[4]} and a clear statement of this rule can be found in the 12th century text *Lilavati* by Bhaskara.^{[4]}

The first formulation of the binomial theorem and the table of binomial coefficients, to our knowledge, can be found in a work by Al-Karaji, quoted by Al-Samaw'al in his "al-Bahir".^{[5]}^{[6]}^{[7]} Al-Karaji described the triangular pattern of the binomial coefficients^{[8]} and also provided a mathematical proof of both the binomial theorem and Pascal's triangle, using an early form of mathematical induction.^{[8]} The Persian poet and mathematician Omar Khayyam was probably familiar with the formula to higher orders, although many of his mathematical works are lost.^{[2]} The binomial expansions of small degrees were known in the 13th century mathematical works of Yang Hui^{[9]} and also Chu Shih-Chieh.^{[2]} Yang Hui attributes the method to a much earlier 11th century text of Jia Xian, although those writings are now also lost.^{[3]}^{: 142 }

In 1544, Michael Stifel introduced the term "binomial coefficient" and showed how to use them to express in terms of , via "Pascal's triangle".^{[10]} Blaise Pascal studied the eponymous triangle comprehensively in his *Traité du triangle arithmétique*.^{[11]} However, the pattern of numbers was already known to the European mathematicians of the late Renaissance, including Stifel, Niccolò Fontana Tartaglia, and Simon Stevin.^{[10]}

Isaac Newton is generally credited with discovering the generalized binomial theorem, valid for any rational exponent, in 1665.^{[10]}^{[12]} It was discovered independently in 1670 by James Gregory.^{[13]}

According to the theorem, it is possible to expand any nonnegative integer power of *x* + *y* into a sum of the form

where is an integer and each is a positive integer known as a binomial coefficient. (When an exponent is zero, the corresponding power expression is taken to be 1 and this multiplicative factor is often omitted from the term. Hence one often sees the right hand side written as .) This formula is also referred to as the

The final expression follows from the previous one by the symmetry of x and y in the first expression, and by comparison it follows that the sequence of binomial coefficients in the formula is symmetrical. A simple variant of the binomial formula is obtained by substituting 1 for y, so that it involves only a single variable. In this form, the formula reads

or equivalently

or more explicitly

Here are the first few cases of the binomial theorem:

In general, for the expansion of (

- the exponents of x in the terms are
*n*,*n*− 1, ..., 2, 1, 0 (the last term implicitly contains*x*^{0}= 1); - the exponents of y in the terms are 0, 1, 2, ...,
*n*− 1,*n*(the first term implicitly contains*y*^{0}= 1); - the coefficients form the nth row of Pascal's triangle;
- before combining like terms, there are 2
^{n}terms*x*^{i}*y*^{j}in the expansion (not shown); - after combining like terms, there are
*n*+ 1 terms, and their coefficients sum to 2^{n}.

An example illustrating the last two points:

with .

A simple example with a specific positive value of *y*:

A simple example with a specific negative value of *y*:

For positive values of a and b, the binomial theorem with *n* = 2 is the geometrically evident fact that a square of side *a* + *b* can be cut into a square of side a, a square of side b, and two rectangles with sides a and b. With *n* = 3, the theorem states that a cube of side *a* + *b* can be cut into a cube of side a, a cube of side b, three *a* × *a* × *b* rectangular boxes, and three *a* × *b* × *b* rectangular boxes.

In calculus, this picture also gives a geometric proof of the derivative ^{[15]} if one sets and interpreting b as an infinitesimal change in a, then this picture shows the infinitesimal change in the volume of an n-dimensional hypercube, where the coefficient of the linear term (in ) is the area of the n faces, each of dimension *n* − 1:

Substituting this into the definition of the derivative via a difference quotient and taking limits means that the higher order terms, and higher, become negligible, and yields the formula interpreted as

- "the infinitesimal rate of change in volume of an n-cube as side length varies is the area of n of its (
*n*− 1)-dimensional faces".

If one integrates this picture, which corresponds to applying the fundamental theorem of calculus, one obtains Cavalieri's quadrature formula, the integral – see proof of Cavalieri's quadrature formula for details.^{[15]}

Main article: Binomial coefficient |

The coefficients that appear in the binomial expansion are called **binomial coefficients**. These are usually written and pronounced "n choose k".

The coefficient of *x*^{n−k}*y*^{k} is given by the formula

which is defined in terms of the factorial function

with k factors in both the numerator and denominator of the fraction. Although this formula involves a fraction, the binomial coefficient is actually an integer.

The binomial coefficient can be interpreted as the number of ways to choose k elements from an n-element set. This is related to binomials for the following reason: if we write (*x* + *y*)^{n} as a product

then, according to the distributive law, there will be one term in the expansion for each choice of either x or y from each of the binomials of the product. For example, there will only be one term

The coefficient of *xy*^{2} in

equals because there are three

corresponding to the three 2-element subsets of {1, 2, 3}, namely,

where each subset specifies the positions of the y in a corresponding string.

Expanding (*x* + *y*)^{n} yields the sum of the 2^{n} products of the form *e*_{1}*e*_{2} ... *e*_{n} where each *e*_{i} is *x* or y. Rearranging factors shows that each product equals *x*^{n−k}*y*^{k} for some k between 0 and n. For a given k, the following are proved equal in succession:

- the number of copies of
*x*^{n−k}*y*^{k}in the expansion - the number of n-character
*x*,*y*strings having y in exactly k positions - the number of k-element subsets of {1, 2, ...,
*n*} - either by definition, or by a short combinatorial argument if one is defining as

This proves the binomial theorem.

Induction yields another proof of the binomial theorem. When *n* = 0, both sides equal 1, since *x*^{0} = 1 and Now suppose that the equality holds for a given n; we will prove it for *n* + 1. For *j*, *k* ≥ 0, let [*f*(*x*, *y*)]_{j,k} denote the coefficient of *x*^{j}*y*^{k} in the polynomial *f*(*x*, *y*). By the inductive hypothesis, (*x* + *y*)^{n} is a polynomial in x and y such that [(*x* + *y*)^{n}]_{j,k} is if *j* + *k* = *n*, and 0 otherwise. The identity

shows that (

since if

by Pascal's identity.

which is the inductive hypothesis with

Main article: Binomial series |

Around 1665, Isaac Newton generalized the binomial theorem to allow real exponents other than nonnegative integers. (The same generalization also applies to complex exponents.) In this generalization, the finite sum is replaced by an infinite series. In order to do this, one needs to give meaning to binomial coefficients with an arbitrary upper index, which cannot be done using the usual formula with factorials. However, for an arbitrary number r, one can define

where is the Pochhammer symbol, here standing for a falling factorial. This agrees with the usual definitions when r is a nonnegative integer. Then, if x and y are real numbers with |

When r is a nonnegative integer, the binomial coefficients for *k* > *r* are zero, so this equation reduces to the usual binomial theorem, and there are at most *r* + 1 nonzero terms. For other values of r, the series typically has infinitely many nonzero terms.

For example, *r* = 1/2 gives the following series for the square root:

Taking *r* = −1, the generalized binomial series gives the geometric series formula, valid for |*x*| < 1:

More generally, with *r* = −*s*, we have for |*x*| < 1:^{[17]}

So, for instance, when *s* = 1/2,

Replacing x with -x yields:

So, for instance, when *s* = 1/2, we have for |*x*| < 1:

The generalized binomial theorem can be extended to the case where x and y are complex numbers. For this version, one should again assume |*x*| > |*y*|^{[Note 1]} and define the powers of *x* + *y* and x using a holomorphic branch of log defined on an open disk of radius |*x*| centered at x. The generalized binomial theorem is valid also for elements x and y of a Banach algebra as long as *xy* = *yx*, and x is invertible, and ‖*y*/*x*‖ < 1.

A version of the binomial theorem is valid for the following Pochhammer symbol-like family of polynomials: for a given real constant c, define and

for Then

The case

More generally, a sequence of polynomials is said to be **of binomial type** if

- for all ,
- , and
- for all , , and .

An operator on the space of polynomials is said to be the *basis operator* of the sequence if and for all . A sequence is binomial if and only if its basis operator is a Delta operator.^{[19]} Writing for the shift by operator, the Delta operators corresponding to the above "Pochhammer" families of polynomials are the backward difference for , the ordinary derivative for , and the forward difference for .

Main article: Multinomial theorem |

The binomial theorem can be generalized to include powers of sums with more than two terms. The general version is

where the summation is taken over all sequences of nonnegative integer indices *k*_{1} through *k*_{m} such that the sum of all *k*_{i} is n. (For each term in the expansion, the exponents must add up to n). The coefficients are known as multinomial coefficients, and can be computed by the formula

Combinatorially, the multinomial coefficient counts the number of different ways to partition an n-element set into disjoint subsets of sizes *k*_{1}, ..., *k*_{m}.

When working in more dimensions, it is often useful to deal with products of binomial expressions. By the binomial theorem this is equal to

This may be written more concisely, by multi-index notation, as

Main article: General Leibniz rule |

The general Leibniz rule gives the nth derivative of a product of two functions in a form similar to that of the binomial theorem:^{[20]}

Here, the superscript (*n*) indicates the nth derivative of a function. If one sets *f*(*x*) = *e*^{ax} and *g*(*x*) = *e*^{bx}, and then cancels the common factor of *e*^{(a + b)x} from both sides of the result, the ordinary binomial theorem is recovered.^{[21]}

For the complex numbers the binomial theorem can be combined with de Moivre's formula to yield multiple-angle formulas for the sine and cosine. According to De Moivre's formula,

Using the binomial theorem, the expression on the right can be expanded, and then the real and imaginary parts can be taken to yield formulas for cos(*nx*) and sin(*nx*). For example, since

De Moivre's formula tells us that

which are the usual double-angle identities. Similarly, since

De Moivre's formula yields

In general,

and

The number e is often defined by the formula

Applying the binomial theorem to this expression yields the usual infinite series for e. In particular:

The kth term of this sum is

As *n* → ∞, the rational expression on the right approaches 1, and therefore

This indicates that e can be written as a series:

Indeed, since each term of the binomial expansion is an increasing function of n, it follows from the monotone convergence theorem for series that the sum of this infinite series is equal to e.

The binomial theorem is closely related to the probability mass function of the negative binomial distribution. The probability of a (countable) collection of independent Bernoulli trials with probability of success all not happening is

An upper bound for this quantity is ^{[22]}

The binomial theorem is valid more generally for two elements *x* and *y* in a ring, or even a semiring, provided that *xy* = *yx*. For example, it holds for two *n* × *n* matrices, provided that those matrices commute; this is useful in computing powers of a matrix.^{[23]}

The binomial theorem can be stated by saying that the polynomial sequence {1, *x*, *x*^{2}, *x*^{3}, ...} is of binomial type.

- The binomial theorem is mentioned in the Major-General's Song in the comic opera
*The Pirates of Penzance*. - Professor Moriarty is described by Sherlock Holmes as having written a treatise on the binomial theorem.
- The Portuguese poet Fernando Pessoa, using the heteronym Álvaro de Campos, wrote that "Newton's Binomial is as beautiful as the
*Venus de Milo*. The truth is that few people notice it."^{[24]} - In the 2014 film
*The Imitation Game*, Alan Turing makes reference to Isaac Newton's work on the binomial theorem during his first meeting with Commander Denniston at Bletchley Park.