Binomial coefficients and the binomial theorem
Use factorials and binomial coefficients to count selections, read Pascal’s triangle and expand a binomial power.
Factorials
The factorial of a natural number , written , is the product of the positive integers from to .
In product notation,
The rules for sum and product notation explain the index and its endpoints, and why a product with no factors equals .
Factorials are central to combinatorics. They count orderings, appear in binomial coefficients, normalize discrete probability formulas and provide an example of rapid sequence growth.
The case of zero
By convention,
An empty product equals because is the multiplicative identity. The factorial recurrence
must also work for ,
which requires . The same convention makes and the Taylor expansion consistent at the initial index.
Recurrence and calculation
Compute factorials successively using
For example,
The recurrence
supports proofs by induction and lets us simplify ratios before multiplying. For example,
The identity requires so that both factorials exist. Similar cancellations occur throughout combinatorics and probability.
Permutations
Factorials count permutations. To arrange distinct objects, choose the object for each position in turn.
There are choices for the first position, for the second, and so on. With distinct objects this gives
If objects of the same type are indistinguishable, divide out their internal orderings. With multiplicities totalling , the number of distinct arrangements is
Combinations and binomial coefficients
Factorials enter the binomial coefficient,
For integers it counts combinations of objects from when order does not matter. The denominator removes orderings within the chosen and unchosen objects.
A convenient form for hand calculation is
It avoids computing large factorials that would cancel, and distinguishes unordered selections from ordered selections and permutations.
Taylor series
Repeated differentiation of a power produces a falling product. This brings factorials into the Taylor coefficients. An expansion about reads
when the series converges to the function. The factor compensates for the fact that derivative number of at equals .
Familiar examples are
Factorials thus arise naturally in analysis as well as in counting.
Extension by the gamma function
Elementary factorials are defined on nonnegative integers. The gamma function gives the conventional extension to real and complex values away from its poles.
Notice the shift. For a positive integer ,
The function has poles at and gives no finite factorial at negative integers. Agreement with at the integers alone does not determine an extension. Additional properties characterize gamma. Its noninteger values enter gamma, beta and chi-square distributions, improper integrals and generalized coefficients.
Growth and approximations
Factorials grow rapidly. For every fixed base , asymptotically
while comparison with gives
Stirling’s formula gives the quantitative estimate
The value of soon exceeds the range of fixed-size integer or floating-point types. Often it is more convenient to compute
For large or noninteger parameters, use log-gamma, here for . It avoids storing huge gamma values in calculations involving likelihoods, combinatorial coefficients and probability distributions.
Common errors
Remember . The elementary definition of applies only to nonnegative integers. Thus needs an extension, whereas is already defined by the gamma function.
Counting all orderings, counting ordered selections and counting unordered subsets require different formulas. Before multiplying large numbers, look for factors that cancel, or work with logarithms.
Applications and checks
Estimating the cost of exhaustive search
Suppose a search examines a million complete orderings per second at constant cost, discarding none in advance. Checking every permutation would take seconds.
|
Distinct operations |
Orderings to check |
Estimated time |
|---|---|---|
|
12 |
479 001 600 |
About 8 minutes |
|
15 |
1 307 674 368 000 |
About 15.14 days |
|
20 |
2 432 902 008 176 640 000 |
About 77,094 years |
These estimates assume a 365.25-day year and the rate stated above. For an example where constraints and objectives narrow the search, see permutations with precedence constraints and changeover times. The factorial counts all orderings before these restrictions. It need not be the cost of a particular algorithm.
Avoiding overflow in a defect probability
Consider 1000 independent items, each defective with probability . The binomial distribution gives the probability of exactly ten defects as
The probability fits comfortably in floating point, but has 2568 decimal digits. Computing the factorials separately in double precision overflows. Arbitrary-precision integers and exact cancellation give
Alternatively, compute the probability on a logarithmic scale. Put and use natural logarithms.
Exponentiating gives , about 12.57%. Evaluate log-gamma directly. Computing gamma first would retain the overflow problem. For extremely small probabilities, keep the logarithmic answer. For near zero, compute with a stable function such as log1p(-p).
Logarithms extend the useful numerical range, but subtraction of nearly equal log-gamma values can lose accuracy. When is small relative to , use a short product or a recurrence. Choose a method that suits the domain and precision of the number representation. A signed 64-bit integer can store but not . A larger integer representation can store the exact result.
Related topics
See combinatorics, permutations, combinations, binomial coefficients, the gamma function, log-gamma and Stirling’s formula.
Factorials, binomial coefficients and the binomial theorem
Factorials produce falling products, binomial coefficients count choices of objects from , and the binomial theorem uses those coefficients to expand .
To form a term in the product of factors equal to , choose from exactly factors. This produces in precisely ways. The counting argument explains the coefficients, exponents and symmetry together.
Prerequisites and scope
Use finite products, nonnegative integer powers, numerical fractions, the multiplication principle and summation notation. Throughout,
Here the binomial exponent is a nonnegative integer. Infinite binomial series for other real or complex exponents, convergence of power series and probability laws are further topics.
1. Factorials and falling products
For , define
and put
The choice preserves the recurrence
and gives the endpoint coefficients and without exceptions. In factorial ratios, cancel common products before multiplying.
For example,
Computing and separately introduces larger intermediate values and more opportunities for arithmetic error.
2. Binomial coefficients
The binomial coefficient is
It counts -element subsets of a set of elements. Each element can be chosen once, and order is irrelevant. This gives
In the symmetry identity, selecting the included elements uniquely determines the excluded elements.
For or , it is convenient to define
This convention simplifies sums and recurrences. It does not represent an admissible selection at an out-of-range index.
3. Pascal’s identity and triangle
Separate the subsets of size according to whether they contain a fixed element. This gives
This is Pascal’s identity. Arrange the coefficients in Pascal’s triangle. Every interior entry is the sum of its two parents, and both ends of each row are .
Numbering from , the first rows are
Row must be symmetric and contain coefficients. Both properties help check a recursively generated table.
4. Expanding a binomial power
For each the following is a polynomial identity in and .
When , both sides denote the constant polynomial under the empty-product convention. This formal identity does not prescribe a context-free value for the numerical expression .
The term with index is
Its position is because the summation starts at . For the term in position , the required index is . Using would be off by one.
Three quick checks are available.
- Before like terms are combined there are terms.
- In each term the exponents of and sum to .
- The binomial coefficients are symmetric about the centre.
5. Signs, coefficients and resulting exponents
If the second summand is negative, include the sign inside its power.
The signs alternate because . The binomial coefficient itself is unchanged.
Substitute each entire summand, including its numerical coefficient and any power it contains. For example,
At index , the exponent of is , rather than . The numerical coefficient also includes .
6. Finding a specified term
To find the coefficient of a particular power, write the general term and equate the resulting exponent to the target. Check that the solution for the index is an integer in .
For example, in , with , the general term is
A constant term requires . Thus , and the term is
The original restriction still applies. This finite expansion contains negative powers of and is not an ordinary polynomial.
A noninteger index or one outside means that the requested power is absent.
7. Identities from special values
Setting in the expansion gives
Setting and , for , gives
These substitutions prove identities because they start from the binomial theorem. One numerical check on a proposed expansion, by itself, cannot verify all coefficients.
A method for expansions and coefficients
When asked for an expansion or coefficient,
- Identify , and the integer exponent .
- Write the general term with .
- Include any minus sign in the second summand.
- Compute the resulting exponents.
- For a single term, solve the equation for the requested exponent.
- Check that the index is admissible and identify its position.
- Check the term count, symmetry and a simple substitution.
Common errors
- Confusing with or multiplying the factors all the way to zero.
- Forgetting that .
- Using with outside the usual range without specifying a convention.
- Calling an expression “term ” when its summation index is without saying whether counting starts at zero or one.
- Leaving the minus sign outside .
- Finding a constant term by inspecting only one contribution to the exponent.
- Extending the finite identity to noninteger exponents without the infinite series and its convergence conditions.
Related material
Revisit factorials, binomial coefficients, the binomial theorem and Pascal’s triangle, or practise with the worked binomial problems.
Pascal’s triangle
Pascal’s triangle, also called Tartaglia’s triangle, arranges binomial coefficients in rows. Each row gives the coefficients of a binomial power and counts combinations with each possible number of selected objects.
It displays identities from combinatorics, connects algebra with probability, and gives coefficients for binomial filters, discrete recurrences, polynomial expansions and numerical algorithms.
Construction
Begin with a single . Each later row starts and ends with . Add the two entries immediately above each interior position.
The usual indexing starts at , so row has entries indexed from through .
n=0: 1
n=1: 1 1
n=2: 1 2 1
n=3: 1 3 3 1
n=4: 1 4 6 4 1
n=5:1 5 10 10 5 1
The entry at position is
Its addition rule is Pascal’s identity.
To choose elements from objects, separate the choices that include a designated object from those that omit it. In the first case choose another from the remaining . In the second, choose all from the remaining .
Algebraic interpretation
Pascal’s triangle gives the coefficients in the binomial theorem.
For instance, row is and gives
This triangular array provides coefficients directly for calculations in algebra, analysis and probability, without multiplying out the entire product
A term is obtained by choosing factors from which to take . There are such choices.
Main identities
The symmetry of each row follows from
Choosing elements is equivalent to leaving out. This pairs the entries on opposite sides of the centre.
The row sum is
Sum and product notation explains how to read and manipulate such finite sums.
Put and in the binomial theorem. The sum counts all subsets of a set of elements, each of which can be included or omitted.
The alternating sum is
by evaluating . This cancellation also occurs in finite differences and discrete transforms.
The hockey-stick identity sums a diagonal.
It replaces a cumulative sum of coefficients by a single binomial coefficient.
The first diagonals contain the constant sequence , the natural numbers and the triangular numbers. Sums along shallow diagonals give Fibonacci numbers, linking the triangle to recursive sequences.
Probability and the binomial distribution
In independent Bernoulli trials, the number of outcome sequences with exactly successes is
The same coefficients appear in the binomial distribution.
For all elementary outcomes are equally likely, so the probability of successes is the corresponding normalized entry.
This is classical probability. A triangle entry counts the outcomes with a given number of successes, and counts all outcomes.
Applications and checks
A triangle entry can count combinations, contribute to a probability after weighting, or serve as a numerical kernel coefficient after normalization. The same integer has different uses. Check sums, units and interpretation in each application.
In a binomial filter, dividing the row by gives unity gain at zero frequency. Repeated convolution with generates successive rows and allows inexpensive separable smoothing. The kernel approximates a Gaussian rather than equalling it. Check order, cutoff frequency, delay and boundary handling for the application.
Alternating coefficients build higher-order finite differences but can amplify noise and rounding. Shrinking the step indefinitely can worsen cancellation even as truncation error falls. Check the formula on polynomials of known degree and inspect its frequency response.
In reliability and Bernoulli models a coefficient counts configurations, while probability also depends on . For large , fixed-size factorials or coefficients may overflow. Use recurrences, logarithms or specialized functions as appropriate. A table can remain superficially symmetric despite integer overflow.
Check the indexing, symmetry, row sum and recurrence. Document the normalization, precision and interpretation so readers can compare the symbolic derivation, implementation and observations. If the order, step, probability or required precision changes, repeat the relevant numerical checks.
Common errors
With indexing from , row contains entries. Some texts call the row containing a single the first row. State the convention.
The entries are counts. Normalizing the row sum gives binomial probabilities in the symmetric case . For include the weights .
Beyond binomial expansions, the triangle also appears in sums, filters, recurrences and discrete operators. Recognizing the recurrence helps identify the same coefficients across applications.
Pascal’s triangle and Tartaglia’s triangle are names for the same construction. The latter is common in Italian texts, while English literature and software usually use Pascal’s name.
Related topics
Binomial coefficients, combinations, the binomial theorem, the binomial distribution and combinatorics.
Worked binomial problems
The factorial, binomial coefficients and binomial theorem connect the three stages of these problems. Use factorial products to count choices, and use the counts to expand . In copies of the term occurs once for each choice of factors from which to take .
Assume and, for an actual selection or term, . These exercises concern finite expansions. Noninteger binomial series, probability distributions, derivatives and broader combinatorics are separate applications.
Progression and method
The 24 problems include eight introductory, ten intermediate and six more demanding ones. They cover seven skills: factorial domains and cancellation, binomial coefficients, Pascal’s identity, full expansions, finding individual terms, evaluating sums, and solving or checking parameter-dependent expansions.
For a complete expansion identify the two summands and use
For only one term, write
Equate the resulting exponent to the target, then check that is an integer between and . Its position is , since the first term corresponds to .
Every selection here is discrete. The formulas and tables give exact identities for checking the expansions.
Exercise 1. Factorial at zero
Calculate , and .
Aim. Include the initial value that makes the factorial recurrence consistent.
Solution
By convention,
The recurrence gives
Finally,
Check. The values satisfy and .
Exercise 2. A ratio of factorials
Calculate
Aim. Cancel shared factors before multiplying large numbers.
Solution
Expand only the larger factorial until reaching .
Check. Multiplying by gives .
Exercise 3. A falling product and an ordered selection
Calculate and express it both as a factorial ratio and in terms of a binomial coefficient.
Aim. Recognize the same product in factorial and binomial notation.
Solution
The product has four descending factors.
Since
we also have
Check. The factor orders the four objects in each unordered choice counted by . Either expression equals .
Exercise 4. An equation with consecutive factorials
Find given that
Aim. Reduce a factorial ratio to an elementary equation while respecting the discrete domain.
Method. Cancel , solve the equation and keep only solutions in .
Solution
For each ,
and hence
The algebraic solutions are and , but the second is outside . Thus
Check. At ,
Exercise 5. Computing a binomial coefficient
Calculate without evaluating all three factorials.
Aim. Cancel common factors in the binomial coefficient formula.
Solution
Keep only the necessary falling product in the numerator.
Check. The result is a positive integer and by symmetry equals .
Exercise 6. Using symmetry
Find using the shorter product.
Aim. Use symmetry to reduce the number of factors.
Solution
Choosing ten included elements is equivalent to choosing the two excluded ones.
Check. The symmetry sends to .
Exercise 7. Recovering a triangle entry
Find using only the preceding row of Pascal’s triangle.
Aim. Apply Pascal’s identity to two adjacent entries.
Method. Split selections according to whether they include a fixed element.
Solution
Pascal’s identity gives
The two summands are
Hence
Check. Direct calculation gives
Exercise 8. Out-of-range indices
Evaluate , and using the convention for or .
Aim. Distinguish an admissible index from a convention that simplifies formulas.
Method. First test the interval . Apply the factorial formula only to admissible indices.
Solution
The indices and lie outside . The convention gives
The index is admissible, so
Applying the factorial formula to would produce , which is undefined here.
Check. The two zeros indicate that there are no such selections. The value counts unordered pairs from six elements.
Exercise 9. The fourth power of a binomial
Expand .
Aim. Match the coefficients to the powers in all five terms.
Solution
Row is . Therefore,
Check. There are terms. In each, the exponents of and sum to , and the coefficients are symmetric.
Exercise 10. A numerical factor inside a summand
Expand .
Aim. Raise the coefficient to the same power as .
Method. Substitute the complete expressions and into the fourth-power formula.
Solution
This gives
Evaluating the five terms yields
Check. At , the sum of coefficients is , which agrees with .
Exercise 11. Alternating signs
Expand .
Aim. Track numerical coefficients and the sign of the second summand together.
Method. Use and , keeping the sign inside the power .
Solution
The general term is
The complete expansion is
Check. At the result is , as for .
Exercise 12. Position and summation index
Find the fourth term in the expansion of .
Aim. Distinguish position in a list from the summation index .
Method. For the term in position set in the general term.
Solution
The fourth term corresponds to .
Check. The outer exponents and sum to . The term uses rather than .
Exercise 13. A single coefficient
Find the coefficient of in .
Aim. Compute the required term directly.
Solution
In the term
we need , hence . The coefficient is
Check. The index is an integer in . The term is .
Exercise 14. The resulting exponent
Find the coefficient of in .
Aim. Translate the power of the summand into the final exponent of .
Method. Write the general term and require .
Solution
The general term is
The exponent condition gives
The coefficient is
Check. The term is . Its sign is positive because the exponent on the second summand is even.
Exercise 15. The constant term
Find the constant term in
Aim. Find the index for which the net exponent of is zero.
Method. Combine both contributions into a single power of and set the exponent to zero.
Solution
The general term is
For a constant term we need
Its value is
Check. The index is admissible and the exponent is . The initial restriction still applies.
Exercise 16. A missing power
Find the coefficient of in
Aim. Detect when a power does not occur in the expansion.
Method. Solve for the index and test whether it is an admissible integer.
Solution
The exponent of in the term of index is
Obtaining would require
Since is not an integer, no term contains , so the coefficient is
Check. The possible exponents are . The requested value is missing.
Exercise 17. Sum of coefficients
Find the sum of the coefficients of .
Aim. Evaluate the polynomial without expanding it.
Solution
The sum of the coefficients of a polynomial in equals its value at .
Check. Coefficients in this expansion alternate in sign. The result is their signed sum.
Exercise 18. Alternating sum of coefficients
Let
Find
Aim. Relate the alternating sum to the value .
Method. Substitute in the unexpanded polynomial.
Solution
By definition,
The factored form gives
Hence
Check. The coefficients in ascending order of power are . Their alternating sum is .
Exercise 19. One or two maximum coefficients
Find the largest coefficients in rows and of Pascal’s triangle, and explain why they occur at the centre.
Aim. Locate the maxima without comparing every entry.
Assumptions. The coefficients for are positive. Compare consecutive entries by their ratio.
Method. Determine when is greater than, equal to or less than , then evaluate the central entries.
Solution
:
The row increases while , has an adjacent equal pair if , and then decreases.
For there is a unique maximum at .
For the ratio equals between and , giving two maxima.
Check. The neighbouring entries and are strictly smaller than the respective maxima.
Exercise 20. A parameter-dependent coefficient
For , find the values of making the coefficient of in equal to .
Aim. Convert a coefficient condition into an equation for a parameter.
Assumptions. The exponent makes the expansion finite. The real parameter may eliminate terms but does not change the admissible indices.
Method. Find the index producing , express its coefficient in terms of and solve the real equation.
Solution
The general term is
To get we need , hence . Its coefficient is
The required condition becomes
The real solutions are
Check. Both values give and . There are no other real solutions because and .
Exercise 21. When does a constant term occur?
For , determine when
contains a constant term. Calculate the first nontrivial case.
Aim. Derive a divisibility condition on the exponent .
Assumptions. The indices are integers. A constant term requires one of the resulting exponents of to be exactly zero.
Method. Solve the exponent equation in terms of using the fact that and are coprime.
Solution
The general term contains the power
A constant term requires
Since , the index is an integer precisely when divides . Write with . Then satisfies .
The first case is , , and its constant term is
Check. For the exponent is . If does not divide , no integer index gives exponent zero.
Exercise 22. Two proofs of Pascal’s identity
For and , prove
Aim. Connect the algebraic proof to a partition of the selections.
Assumptions. Choose elements out of and distinguish one element . Subsets containing and subsets omitting form two disjoint classes covering every choice.
Method. Prove the identity using factorials, then count the two classes separately.
Solution
Algebraically,
Subsets containing require further elements from the remaining and number . Subsets omitting require all elements from those remaining and number . Summing counts every subset once.
Check. For and ,
Exercise 23. Why two pointwise checks are insufficient
A student proposes
as the expansion of . The evaluations and agree with the binomial. Is the expansion correct?
Aim. Distinguish necessary checks from a proof of a polynomial identity.
Assumptions. Two polynomials of degree at most can agree at two points without being identical. Compare coefficients or test at least six distinct points for this degree bound.
Method. Calculate the suspect coefficients from the general term and compare with the exact expansion.
Solution
In the general term
the power requires , so . Its coefficient should be
rather than . The constant term must likewise be rather than .
The correct expansion is
In fact, the difference is
which vanishes at and .
Check. Both original pointwise checks passed, but at we obtain whereas .
Exercise 24. Reconstructing a fourth power
A real polynomial has the form . Its coefficient of is , its coefficient of is , and its constant term is . Determine .
Aim. Recover the two summands from three coefficients and expand the resulting polynomial.
Assumptions. The parameters are real. The pairs and produce the same fourth power, allowing two representations of one polynomial.
Method. Use the leading and constant coefficients to find and , then use the coefficient of to determine the relative sign.
Solution
The three coefficients give
The outer two equations give
The condition requires opposite signs. The two pairs and differ by a common factor and yield the same fourth power. Thus
Expanding gives
Check. The coefficient of is , the coefficient of is , and the constant is . Also, .
Guide to the exercises
The main calculation and its check depend on what the question asks.
|
Question |
Main step |
Check |
|---|---|---|
|
Factorial ratio |
Cancel common products |
Domain in |
|
Binomial coefficient |
Reduce before multiplying |
Index between and |
|
Complete expansion |
Substitute both summands |
terms and consistent degrees |
|
Specified term |
Solve the exponent equation |
Admissible integer index |
|
Sum of coefficients |
Evaluate at or |
A single test does not prove an identity |
|
Parameter or proposed solution |
Separate existence from value |
Boundary cases and counterexamples |
For individual definitions see factorials, binomial coefficients, the binomial theorem and Pascal’s triangle. The worked examples bring the definitions, hypotheses and methods together.
Sources
NIST gives the definition of a factorial and the binomial probability formula. The Digital Library of Mathematical Functions gives the factorial identity for the gamma function and Stirling’s asymptotic expansions.
Back to contents