# Factorial

The factorial of a positive integer n equals the product of all positive integers less than or equal to n. This is denoted as n!

Mathematically, the formal expression for factorial is:

$n!=\prod_{k=1}^n k \qquad \mbox{for all } n \in \mathbb{N} \ge 0. \!$

For example,

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

In the case of 0, sometimes a special definition declares that

$0! = 1 \$

even though one would expect that to be zero. This special definition is justified by saying that the product of no numbers is equal to 1. Another way to justify it is to observe that in general,

$(n-1)! = \frac{n!}{n}$

so

$0! = (1-1)! = \frac{1!}{1} = \frac{1}{1} = 1$

## Permutations

Factorials frequently make an appearance in the mathematics of combinatorics and statistics. The most direct application concerns the number of permutations of a set of distinguishable objects—that is, the number of ways n different things can be arranged.

In general, n different things can be arranged in n! ways. For example, three objects can be arranged in 3! = 6 different ways:

A B C
A C B
B A C
B C A
C A B
C B A

It is easy to see that this is always true. We have seen that three objects can be arranged in six ways. If we now add a fourth object, D, we can see that for each arrangement there are four different places where we can insert the D. For example, starting with A B C, we can get

D A B C
A D B C
A B D C
A B C D

Corresponding to each permutation of three objects, there are four permutations of four objects, so there are 4 * 6 = 24 permutations of four objects. Similarly, there are 5 * 24 = 120 permutations of five, 6 * 120 = 720 permutations of six, and so forth.

## Change-ringing

Change-ringing has been a popular hobby or pastime in England since the 1600s. It consists of ringing a set of bells, such as the bells in a church steeple, with the goal of ringing them in every possible permutation. This is called a "full peal."

Dorothy Sayers wrote a mystery novel entitled The Nine Tailors in which change-ringing forms an important part of the story.

## The number 7! in Plato's Laws

A curious use of factorials occurs in Plato's Laws. In Book V he says the citizens of his ideal state should be exhorted:

"Good friends, honor order and equality, and above all the number 5040.

5040 is 7! or seven factorial,

$7 ! = 1\cdot 2 \cdot 3 \cdot 4 \cdot 5 \cdot 6 \cdot 7= 5040 \$

The ideal state is to contain exactly 5040 citizens. His reason is that this number can be divided exactly by every number from 1 to 10, as well as 12, 20, 21, and 144, which he seems to think is important:

We will fix the number of citizens at 5040, to which the number of houses and portions of land shall correspond. Let the number be divided into two parts and then into three; for it is very convenient for the purposes of distribution, and is capable of fifty-nine divisions, ten of which proceed without interval from one to ten. Here are numbers enough for war and peace, and for all contracts and dealings. These properties of numbers are true, and should be ascertained with a view to use.[1]

## References

1. Plato, Laws, Book VI, tr. Benjamin Jowett