✖

Factorial

The factorial of a number n is equal to the product of all positive integers that are less than or equal to n. We write the factorial using an exclamation mark: n!. For zero, 0! = 1. The factorial is used mainly in combinatorics, where it is needed to calculate, for example, permutations. For example, the factorial of five is 5! = 5 · 4 · 3 · 2 · 1 = 120.

Definition of the factorial

We can define the factorial in various ways. The simplest is probably this one:

n!={1if n=0n⋅(n−1)!otherwise

We can also give a definition using a product:

n!=∏k=1nk

Or using an integral:

(z−1)!=Γ(z):=∫0∞tz−1e−tdt,ℜ(z)>0.

Calculating with factorials

Factorials are often used in fractions. Here we use the fact that n! = n · (n − 1)!. This holds by definition, and we’ll show it with an example. We know that the factorial of four, 4!, is equal to the product of these positive integers: 4 · 3 · 2 · 1. We can write that the product 3 · 2 · 1 is equal to the factorial of three: 3 · 2 · 1 = 3!. The factorial of four can then be written as 4! = 4 · 3!.

4!=4⋅3⋅2⋅1⏟=3!=4⋅3!

Thanks to this, we can effectively cancel many different factorials in fractions. A sample problem – simplify the expression:

n!(n−2)!

We simplify it using the formula I mentioned a moment ago. In the numerator we can split the factorial into n · (n − 1)!, and this can be broken down further (using the same formula) into n · (n − 1) · (n − 2)!. Now we can cancel the fraction nicely:

n!(n−2)!=n(n−1)(n-2)!(n-2)!=n(n−1)

Another example:

n!⋅(n+1)!(n−1)!⋅(n+2)!=n⋅(n-1)!⋅(n+1)!(n-1)!⋅(n+2)!=n⋅(n+1)!(n+2)!=n⋅(n+1)!(n+2)⋅(n+1)!=nn+2

And the last example with factorials:

(2(n+1))!(2n)!=(2n+2)!(2n)!=(2n+2)(2n+1)(2n)!(2n)!=(2n+2)(2n+1)