Factorials

For every natural number \( n \geq 1 \), the factorial, written \( n! \), is defined as the product of all positive integers from \( 1 \) up to \( n \): $$ n! = n \cdot (n - 1) \cdot (n - 2) \cdot \dots \cdot 2 \cdot 1 $$ By convention, $ 0! = 1 $.

For instance, the factorial of $ 3 $ is the product of all natural numbers from 1 through 3.

$$ 3! = 3 \cdot 2 \cdot 1 = 6 $$

The factorial of $ 4 $ is the product of all natural numbers from 1 through 4.

$$ 4! = 4 \cdot 3 \cdot 2 \cdot 1 = 24 $$

The factorial of $ 5 $ is the product of the integers from 1 through 5.

$$ 5! = 5 \cdot 4 \cdot 3 \cdot 2 \cdot 1 = 120 $$

Factorials escalate in size at an extraordinary rate. Even \( 10! \) already equals \( 3,628,800 \).

Note. By convention the factorial of zero is defined to be one: $$ 0! = 1 $$  This convention preserves the coherence of many identities in combinatorics, especially those involving permutations and binomial coefficients.

What is it used for?

The factorial function is a cornerstone of discrete mathematics.

It appears in combinatorics, probability theory, algebra, analysis and across numerous applied fields. It is essential for counting, arranging, permuting and constructing more sophisticated mathematical expressions.

For example, factorials are fundamental in the study of permutations.

If I have \( n \) distinct objects and want to determine the number of possible orderings, the answer is:

$$ \text{number of permutations of } n \text{ objects} = n! $$

Example. How many distinct sequences can be formed using the letters A, B, C? With $ n = 3 $, the possible permutations are $ n! = 6 $. They are: ABC, ACB, BAC, BCA, CAB, CBA. In total, 6 permutations, that is \( 3! \).

Why is the factorial of zero equal to one?

By convention, the factorial of zero is defined to be one

$$ 0!=1 $$

This choice is more than a convenient shortcut. It ensures that the standard formulas used in combinatorics continue to work smoothly, even in situations where the numbers involved drop to their minimum.

What matters is that this value is not assigned arbitrarily. It follows naturally from one of the core formulas in elementary combinatorics, the formula for k-permutations.

Proof

Consider the k-permutations of \( n \) distinct objects taken \( k \) at a time:

$$ D(n,k)=\frac{n!}{(n-k)!} $$

When we set \( k=n \), the formula becomes

$$ D(n,n)=\frac{n!}{(n-n)!}=\frac{n!}{0!} $$

Here the calculation stops, because the value of \( 0! \) has not yet been determined.

But there is a second way to understand this expression. Choosing all \( n \) objects at once simply produces every possible permutation of the set. The number of such permutations is $ P(n)=n! $

$$ D(n,n)= P(n) = n! $$

Substituting this into the earlier expression gives

$$ D(n,n)=\frac{n!}{0!}=n! $$

This identity can only hold if $ 0!=1 $

So the factorial of zero must be equal to one.

Note. Although this explanation is useful for building intuition, it is not a fully rigorous proof. The formula for k-permutations \( D(n,k)=\frac{n!}{(n-k)!} \) is itself derived under the assumption \( n>1 \).

Proof 2

A more rigorous justification comes from the defining recurrence relation for the factorial function. The factorial of a number \( n \) can be written as

$$ n! = n \cdot (n-1) \cdot (n-2) \cdot \cdot \cdot 2 \cdot 1 $$

Grouping the last part of the product, we obtain

$$ n! = n \cdot \underbrace{ (n-1) \cdot (n-2) \cdot \cdot \cdot 2 \cdot 1 }_{(n-1)!} $$

which simplifies to the compact recurrence

$$ n! = n \cdot (n-1)! $$

If we substitute \( n=1 \), we have

$$ 1! = 1 \cdot (1-1)! $$

$$ 1! = 1 \cdot 0! $$

Since we already know that \( 1!=1 \), it follows that

$$ 1 = 1 \cdot 0! $$

This is possible only if $ 0!=1 $

Therefore the factorial of zero is, by necessity, equal to one.

Notes

Further remarks on factorials:

  • Recursive definition
    The factorial function satisfies a standard recursion: $$ n! = n \cdot (n - 1)! $$ This identity underpins many proofs and algorithms in discrete mathematics and computer science.

    Example. We can express \( 5! \) as $$ 5! = 5 \cdot 4! $$

    From this recursion follow two immediate consequences: $$ (n+1)! = (n+1) \cdot n! $$ $$ (n+1)! - n! = n \cdot n! $$

    Explanation. Here is the derivation: $$ (n+1)! - n! $$ Since $ (n+1)! = (n+1) \cdot n! $, we obtain $$ (n+1) \cdot n! - n! $$ Factor out $ n! $. $$ n! \cdot [(n+1) - 1] $$ $$ n! \cdot (n+1 - 1) $$ $$ n! \cdot n $$

  • Factorials in quotients
    Many combinatorial formulas involve expressions such as $$ \frac{n!}{(n - k)!} $$ which equal the product of \( k \) consecutive decreasing integers: $$  \frac{n!}{(n - k)!} = n \cdot (n - 1) \cdot (n - 2) \cdot \dots \cdot (n - k + 1) $$ This structure arises naturally in the definition of ordered selections, often called arrangements.

    Example. Consider $ n=5 $ and $ k=2 $. $$ \require{cancel}  \frac{5!}{(5 - 2)!} = \frac{5 \cdot 4 \cdot \cancel{3 \cdot 2 \cdot 1}}{\cancel{3 \cdot 2 \cdot 1}} = 5 \cdot 4 $$ Computing directly from $ n $ down to $ n-k+1 $ is more efficient because the remaining factors cancel.

  • Binomial coefficients
    Factorials form the backbone of binomial coefficients, which appear both in Pascal's triangle and in the binomial theorem: $$
    \binom{n}{k} = \frac{n!}{k! \cdot (n - k)!} $$ This quantity counts the number of $ k $ element subsets of an $ n $ element set.
  • Growth rate
    The factorial grows superexponentially. For example: $$ 20! = 2,432,902,008,176,640,000 $$ This explosive growth explains why factorial terms often render algorithms computationally infeasible for large inputs.
  • Bounds on factorials
    A useful pair of inequalities illustrates the growth of \( n! \): $$ ( \sqrt{n} )^n < n! < \left( \frac{n+1}{2} \right)^n $$ These give a rough indication of how quickly factorials increase.
  • Gamma function
    Although the factorial function is defined on natural numbers, it extends seamlessly to real and complex arguments via the Gamma function. For natural numbers: $$ n! = \Gamma(n + 1) $$ This extension is fundamental in analysis and the theory of special functions.

And so on.

 

 
 

Please feel free to point out any errors or typos, or share suggestions to improve these notes. English isn't my first language, so if you notice any mistakes, let me know, and I'll be sure to fix them.

FacebookTwitterLinkedinLinkedin
knowledge base

Combinatorial Analysis