TITLE: Why does 0! = 1?
QUESTION [14 upvotes]: Possible Duplicate:
Prove $0! = 1$ from first principles 

Why does $0! = 1$?
All I know of factorial is that $x!$ is equal to the product of all the numbers that come before it. The product of 0 and anything is $0$, and seems like it would be reasonable to assume that $0! = 0$. I'm perplexed as to why I have to account for this condition in my factorial function (Trying to learn Haskell). Thanks.

REPLY [10 votes]: Mostly it is based on convention, when one wants to define the quantity $\binom{n}{0} = \frac{n!}{n! 0!}$ for example. An intuitive way to look at it is $n!$ counts the number of ways to arrange $n$ distinct objects in a line, and there is only one way to arrange nothing.

REPLY [7 votes]: In a combinatorial sense, $n!$ refers to the number of ways of permuting $n$ objects.  There is exactly one way to permute 0 objects, that is doing nothing, so $0!=1$.
There are plenty of resources that already answer this question.  Also see:
http://mathforum.org/library/drmath/view/57905.html
http://wiki.answers.com/Q/Why_is_zero_factorial_equal_to_one
http://en.wikipedia.org/wiki/Factorial#Definition

REPLY [6 votes]: It's because $n! = \prod_{0<k\le n} k.$ ($n!$ is the product of all numbers $1, 2,\dots n$) For $n = 0$ there isn't any number greater then 0 and lesser or equal to $n$, so the product is empty; the empty product is defined  by convention as 1.

REPLY [3 votes]: It has many reasons.
For example, we can have a power series: $e^x = \sum_{n} x^n/n!$ and we would like the first term to be $1$.
Also, how many permutations are there of $0$ numbers? Well, one.