What is $n!$ when $n=0$?

Possible Duplicate:
Prove $0! = 1$ from first principles
Why does 0! = 1?

If I’m right, factorial $!$ means:

$$n!=1 \cdot 2 \cdot 3 \cdot 4 \cdots n $$

so:

$$ \begin{align}
5!&=1\cdot2\cdot3\cdot4\cdot5=120\\
4!&=1\cdot2\cdot3\cdot4=24\\
3!&=1\cdot2\cdot3=6\\
2!&=1\cdot2=2\\
1!&=1
\end{align}
$$

But what is $n!$ when $n=0$?

It can’t be undefined and it can’t be $n!=0$, since those are illegal in known equations like:

$$e^x = \sum_{n=0}^\infty \frac{x^n}{n!}$$

So what is it?

Solutions Collecting From Web of "What is $n!$ when $n=0$?"

$0! = 1$ is consistent with, and for reasons related to, how we define the empty product. See this entry on empty product.

Empty product:

The empty product of numbers is the borderline case of product, where the number of factors is zero, i.e. the set of the factors is empty. In such a “borderline” case, the empty product of numbers is equal to the multiplicative identity number, $1.$

Some of the most common examples are the following:

  • The zeroth power of a number x: $x^0 = 1$
  • The factorial of $0: 0! = 1$
  • The prime factor presentation of unity, which has no prime factors

Just as ${n^0 = 1}$ for any $n$, we define, as a convention, $0!$ to be $1$.


Added observation:

$$e^x = 1 + \frac {x} {1!} + \frac {x^2} {2!} + \frac {x^3} {3!} + …
= 1 + \sum_{n=1}^\infty \frac{x^n}{n!} \tag{1}$$

But the following is a more concise definition:
$$e^x = \frac {x^0} {0!} + \frac {x^1} {1!} + \frac {x^2} {2!} + \frac {x^3} {3!} + …
= \sum_{n=0}^\infty \frac{x^n}{n!}\tag{2}$$

$(1)$ and $(2)$ are equal if and only if $$\;\;\displaystyle e^0 = \frac{x^0}{0!} = \frac {1}{0!} = 1 \iff 0! = 1.$$

It’s conventionally defined as $0! = 1$. This agrees with the gamma function $\Gamma(1) = (n-1)! = 1$.

We know $\binom n r=\frac{n\cdot(n-1)\cdots (n-r+1)}{r!}=\frac{n!}{r! (n-r)!}$ —> the number of ways we can choose $r$ elements from $n$ elements.

If $r=n,$ we can take $n$ elements from $n$ elements in $\frac{n\cdot(n-1)\cdots (n-n+1)}{n!}=1$ way.

So, $1=\frac{n!}{n! (n-n)!}=\frac 1{0!}\implies 0!=1$

Similarly, if $r>n, \binom n r=\frac{n\cdot(n-1)\cdots (n-r+1)}{r!}=0\implies \frac1 {(n-r)!}=0 \implies \frac 1{s!}=0$ if $s=n-r<0$

$0!=1$.

Reason 1: $(n-1)!=\dfrac{n!}n$, so $0!= \frac{1!}1$.

Reason 2: $n!$ is the number of bijections of a set of cardinality $n$. The only set of cardinality $n$ is the empty set, the number of functions from the empty set to the empty set is 1.

Reason 3: $n! = \int_0^{\infty} x^ne^{-x}dx$. The value for $n=0$ is 1 (and this is actually used as base of the induction proof).

The number of ways to permute a set of $n$ objects is $n!$ (including the identity permutation). Your question can be reinterpreted in the following way: How many ways can one permute the elements of the empty set? Since the question can be viewed as ill-formed, one answers by conventionally defining the number to be $1$. That is, $0! = 1$. Compare this to computing the number of maps from a set of $m$ elements to a set of $n$ elements, $n^{m}$, in the case both sets are empty. Again, $0^{0} = 1$.

$n!$ = $n(n-1)!$

$1!$ = $1(0)!$

$0!$ = $1$