# What is $n!$ when $n=0$? [duplicate]

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?

-

## marked as duplicate by sdcvvc, amWhy, Argon, Norbert, Beni BogoselNov 16 '12 at 16:47

$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$.

$$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$.

-
Don't see why this is a convention. There really is one map from the empty set to itself. Incidentally, that map really is the empty set itself. – Dan Shved Nov 16 '12 at 16:16

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

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

$0!$ = $1$

-
This becomes sort of tautological -- you can't say $0!=1$ by that logical progression, because at your second line it is so far undefined; if you are choosing this as the rationale for defining it thus, then you could instead define $n!=n(n-1)!$ for $n > 1$, and define $1!=1$; there is no need to define $0!$ in this case. – Arkamis Nov 16 '12 at 16:20
The point is that 1 is the only choice that is consistent with the recurrence and the other values, there is nothing tautological about it, unless you demand a proof for the existence of the Platonic idea of $0!$. – Phira Nov 16 '12 at 16:28
The consistency of $1$ with the other recurring values only works (and only is necessary) if you choose your recursion to be valid for $n \ge 1$, which need not be the case. – Arkamis Nov 16 '12 at 16:34
In other words, I can define factorial to be $$n! = n(n-1)!,\ n \ge 2,\ 1! = 1$$ and leave $0!$ undefined. The proof in this answer therefore does not work. – Arkamis Nov 16 '12 at 16:37
But you do use it, implicitly. Otherwise you could just say $0!=0*(-1)!$. Then $0! = 0$. – Arkamis Nov 16 '12 at 16:48