Factorial, in full
n! is shorthand for n x (n-1) x (n-2) x ... x 2 x 1, and the exclamation-mark notation is credited to Christian Kramp, who used it in 1808. Read combinatorially, it is the number of orderings of n distinct objects: three books fit on a shelf in 3! = 6 ways, five books in 5! = 120 ways. The recursive form n! = n x (n-1)! makes the pattern plain and supplies the reason for the convention at zero.
0! = 1 is not an arbitrary patch. There is exactly one way to arrange nothing, the empty arrangement, so the count is 1 rather than 0. The convention also keeps the recursion working at n = 1, since 1! = 1 x 0!. Without it the formula C(n,k) = n! / (k!(n-k)!) would break at k = 0 and k = n, where the answer is obviously 1 either way.
Factorials outgrow every exponential. 10! is 3,628,800. 20! is already 2,432,902,008,176,640,000. And 52!, the number of orderings of a shuffled deck, runs to 68 digits. That growth is why draw-game counts get large so quickly: the raw arrangement numbers are astronomical and the divisions inside C(n,k) only trim them so far. Standard double-precision arithmetic overflows just past 170!, so large factorials are handled through logarithms or cancellation instead of direct multiplication.
- Probability
- n factorial, n!
A worked example
6! = 6 x 5 x 4 x 3 x 2 x 1 = 720, which is why a set of six lottery numbers can be written in 720 different orders, and why C(49,6) divides the 10,068,347,520 ordered draws by 720 to land on 13,983,816. Push further and 15! = 1,307,674,368,000. Ten steps beyond that, 25! is already past 1.5 x 10^25.
Sources
The exclamation-mark notation n! was introduced by Christian Kramp, who used it in his 1808 Elements d'arithmetique universelle.
MacTutor History of Mathematics — Christian Kramp
See also
Where it comes up on this site
Factorial: frequently asked
There is exactly one way to arrange nothing. Setting 0! = 1 also keeps the recursion n! = n x (n-1)! working at n = 1, and stops C(n,k) dividing by zero at its edges.
Sixty-eight digits, roughly 8.07 x 10^67. A properly shuffled deck has almost certainly never been in that exact order before.
The plain factorial does. Mathematicians extend it with the gamma function, where n! = gamma(n+1), and nothing counted on this site needs that extension.