Dr. Math FAQ 
Classic Problems 
Formulas 
Search Dr. Math 
Dr. Math Home
Why does 0! = 1 ?Usually n factorial is defined in the following way:
But this definition does not give a value for 0 factorial, so a natural question is: what is the value here of 0! ? A first way to see that 0! = 1 is by working backward. We know that: 1! = 1 2! = 1!*2 2! = 2 3! = 2!*3 3! = 6 4! = 3!*4 4! = 24We can turn this around: 4! = 24 3! = 4!/4 3! = 6 2! = 3!/3 2! = 2 1! = 2!/2 1! = 1 0! = 1!/1 0! = 1In this way a reasonable value for 0! can be found. How can we fit 0! = 1 into a definition for n! ? Let's rewrite the usual definition with recurrence: 1! = 1 n! = n*(n1)! for n > 1Now it is simple to change the definition to include 0! : 0! = 1 n! = n*(n1)! for n > 0Why is it important to compute 0! ? An important application of factorials is the computation of number combinations: n! C(n,k) =  k!(nk)!C(n,k) is the number of combinations you can make of k objects out of a given set of n objects. We see that C(n,0) and C(n,n) should be equal to 1, but they require that 0! be used. n! C(n,0) = C(n,n) =  n!0!So 0! = 1 neatly fits what we expect C(n,0) and C(n,n) to be. Can factorials also be computed for noninteger numbers? Yes, there is a famous function, the gamma function G(z), which extends factorials to real and even complex numbers. The definition of this function, however, is not simple: inf. G(z) = INT x^(z1) e^(x) dx 0Note that the extension of n! by G(z) is not what you might think: when n is a natural number, then The gamma function is undefined for zero and negative integers, from which we can conclude that factorials of negative integers do not exist.
For more information on the Gamma function, see the links listed below.
From the Dr. Math archives:
What is the Gamma Function? What is Gamma of 4? Factorial on TI83
On the Web:

[Privacy Policy] [Terms of Use]
Math Forum Home 
Math Library 
Quick Reference 
Math Forum Search