# Prove $0! = 1$ from first principles

How can I prove from first principles that $0!$ is equal to $1$?

-
For any cardinal c let c! be the order of the group of permutations of a set of cardinality c. – Pierre-Yves Gaillard Feb 8 '11 at 12:01
You haven't stated what your definition of factorial is. An inductive definition would have as the base case 0! = 1, so there's nothing to prove from that definition, for example. – Zhen Lin Feb 8 '11 at 15:47
Please don't state questions as orders; write them as questions. – Arturo Magidin Feb 9 '11 at 4:34
Or to put it differently, $0!=1$ is one of the "first principles" in the most typical formulation. – Hurkyl Sep 27 '11 at 2:45
Wow, I've been coding too much lately and read this question as asking to show 0 != 1, (or for the non coders $0\neq 1$). – SL2 Oct 3 '12 at 0:32

I'm not sure that there is anything to prove. I think it follows directly from the definition of factorial:

$$n! := \prod_{k = 1}^n k$$

So if $n=0$ the right hand side is the empty product which is $1$ by convention.

-
It also follows the "n! = number of ways of arranging n objects" convention: there is only one way of arranging no objects. (That's what Wolfram says, anyway.) – Rawling Feb 8 '11 at 10:33
@Rawling: That's a very nice explanation! – Rudy the Reindeer Feb 8 '11 at 10:50
You can also prove it by moving the space: "0! = 1" $\Leftrightarrow$ "0 != 1", which is computer notation for "0 $\neq$ 1" :-). Then it depends on what you count as "first principles". If we're dealing with the natural numbers, this follows from the Peano axiom that the successor of a natural number is not 0 (1 being defined as the successor of 0). If we're dealing with general rings or fields, 0 $\neq$ 1 is part of the axioms for those structures (which is to exclude the trivial cases of one-element rings and fields). – joriki Feb 8 '11 at 11:03

We need $0!$ to be defined as $1$ so that many mathematical formulae work. For example we would like $$n! = n \times (n-1)!$$ to work when $n=1,$ ie $1! = 1 \times 0!.$ Also we require that the formula for the number of ways of choosing $k$ objects from $n$ is valid for $k=n.$ ie $${n \choose k} = \frac{n!}{k!(n-k)!}$$ is valid when $k=n.$

Things need to work when we extend our definition of the factorial via the gamma function.

$$\Gamma(z) = \int\limits_0^\infty t^{z-1} e^{-t} \,\mathrm{d}t,\qquad \Re(z)>0.$$

The above gives $\Gamma(n)=(n-1)!$ and so we require $0!=1,$ since $\Gamma(1)=1.$

-

One of the simplest ways of doing this is to observe that if you have $$6!= 720$$ then divide both sides by 6 to get $$5!=120$$ then divide both sides by 5 to get $$4!=24$$ then divide both sides by 4 to get $$3!=6$$ then divide both sides by 3 to get $$2!=2$$ then divide both sides by 2 to get $$1!=1$$ then divide both sides by 1 to get $$\text{[fill in the blank here]}$$

-
But how is this a proof by "first principles"? (How is it a proof at all??) To be sure, I find the question itself somewhat fishy: first tell us what the definition of $0!$ is, then we can talk about how to prove $0! = 1$... – Pete L. Clark Sep 26 '11 at 23:43
It's not a proof, but it could be the reason why the definition was written in the first place. – Michael Hardy Dec 23 '11 at 0:19
Then divide both sides by zero to get $(-1)!=\infty$, which is consistent with $\Gamma(0)$ – Daenerys Naharis Oct 3 '12 at 1:17
The question does not want this kind of proof (which is nevertheless excellent). I think it wants a philosophical discussion of why mathematicians allow this sort of reasoning? – Alexander Giles Sep 2 '15 at 16:05

$0! = 1$ is consistent with, and for reasons related to, how we define the empty product.
See, for example, this entry on empty product. This is simply the name of the phenomenon Michael Hardy alludes to:

Empty product:

The empty product of numbers is the borderline case of product, where the number of factors is zero, that is, the set of the factors, is empty. In such a "borderline" case, the empty product of numbers is equal to the multiplicative identity, which is $1$.

Some of the most common examples are the following:

• The zero$^{\text{th}}$ power of a number $a$: $a^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$, and the "prime factorization" of $1$ = $1$, we define, as a matter of convention, $0! = 1$.

-

The empty product is taken to be equal to 1. Take logs and you get an empty sum equal to zero, which is somehow more intuitive, but this trick of taking logs to convert a product into a sum never seems to get a mention in the literature. [Assumes products have positive terms]

-
One of the primary uses of logs before calculators was to multiply numbers using addition and log tables. Slide rules also used logs to turn multiplication into addition. – robjohn Sep 26 '11 at 20:36
@robjohn:L Indeed - I still have my slide rule, and ten years ago I used it as a "mystery object" for a youth group - they didn't know what it was. I remember using it in A-level chemistry practicals to set up the instants, and do the calculations quicker than schoolmates with their Sinclair calculators! But the point I was making was more that taking logs can take the mystery out of infinite products (and the notion of convergence applicable) by turning them into (less elementary) infinite sums. – Mark Bennet Sep 26 '11 at 20:49

One can prove this by convention (that is based on what 'works', based on base cases for product of a list).

But for a proof from 'nothing' as it were...define what factorial is supposed to mean. I think of it as the number of one-to-one, onto (=bijective) functions from a set of size $n$ to itself. if$n$ is 0 then the set is the empty set. How many bijective functions are there from $\emptyset$ to $\emptyset$? (a function is a set of ordered pairs (with some restrictions)? There are no legal pairs for these restrictions, and so there are no legal subsets of these pairs...other than the empty set. So $\emptyset$ -is- a function (it -is- a set of pairs (empty of course), all of whose pairs satisfy the function criteria). No other functions will work so $\emptyset$ is the only function that works. So there is only 1 bijective function on a set of size 0. So $0! = 1$.

Yes, this is weird, but it works. Negative numbers, complex numbers, they're all weird even when you just manipulate their properties. But you'll get over it.

-

Let's try a different approach from my other answer to this:

To multiply a number $N$ by $6!$ is to multiply it by six factors and get $$N\cdot1\cdot2\cdot3\cdot4\cdot5\cdot6.$$ Similarly to multiply $N$ by $0!$ is to multiply it by $0$ numbers: $$N.$$ But that is the same as multiplying it by $1$ $$N\cdot1.$$ Multiplying $N$ by no numbers at all is multiplying $N$ by $1$.

(This answer doesn't apply only to factorials; it may be taken as a general explanation of why, when one multiplies no numbers, one gets $1$.)

-

You can define $\exp(x)$ as

$$1 + \frac {x} {1!} + \frac {x^2} {2!} + \frac {x^3} {3!} + ...$$ but the following seems more uniform: $$\frac {x^0} {0!} + \frac {x^1} {1!} + \frac {x^2} {2!} + \frac {x^3} {3!} + ...$$ These are only equal if $0! = 1$

Not a proof, but makes sense to me!

-
so we finally found a good possibility for support of spam? – Gottfried Helms Oct 2 '12 at 23:20
Well, almost equal. There is an exception at $x=0$ where the first term on the latter sum has a $0^0$ which is indeterminate. – Roman Chokler Oct 3 '12 at 0:51
@RomanChokler Yes, but in that case, we take it to mean $\lim_{x\to0}\left(x^0\right)$ rather than $x^0\big|_{x=0}$. – Akiva Weinberger Oct 12 '14 at 21:47
In think that, in the context of power series, $0^0$ is always taken to be $1$. This is even used in other power series like $\left(1+x\right)^{-1}=\sum \left(-1\right)^n x^n = 1-x+x^2-x^3+\cdots$, so that it has nothing to do with the factorial at all – fonini Jan 6 '15 at 15:38

Because there is only one way to do nothing.

-
As a professional procrastinator, I disagree. $^{\textrm{is joke}}$ – Akiva Weinberger Oct 12 '14 at 21:49
@columbus8myhw, haha. – goblin Mar 26 '15 at 4:39

Explanation 1: We define $n!$ as the product of all integers $k$ with $1\le k \le n.$ When $n = 0$ this product is empty so it should be 1.

Explanation 2: If $n$ is a nonnegative integer, we define $n!$ to be the number of orderings on a set with $n$ distinct objects. If $n = 0$, this set is empty. Vacuously, it has 1 order.

-

$${n \choose R} = \frac{n!}{R!(n-R)!}$$

You know: ${n \choose 0}=1$, so: $$\frac{n!}{0!n!}=1\implies\frac{1}{0!}=1\implies 1=0!$$ We know every set has $2^n$ subsets we know empty subset is unique so

-

$0! = 1$ usually is one of the "first principles".

-

Similar to @Mitch's answer, but with a slight twist at the end.

For any $n$, we define $n!$ to be the the number of invertible functions from a set of size $n$ to itself. The question is thus restated as "Prove that there is exactly one invertible function from the empty set to itself."

Now, it should be clear that there can't be more than one function from $\emptyset$ to itself, because in order for two functions to be different, they have to give different values for at least one input (clearly impossible if the domain is empty). The question therefore reduces to "Prove that there is at least one invertible function from the empty set to itself."

Well, assuming we can all agree that the empty set is a set, meaning an object in the category of sets, the empty set must have an identity function (morphism) defined on it; every object in every category is required to have an identity morphism. Further, identity morphisms are always invertible because $Id\circ Id = Id$, so we are done. $\Box$

http://en.wikipedia.org/wiki/Category_of_sets

This answers the question if and only if the "first principles" include axioms of category theory (and a few facts about sets).

-
Note: this argument also shows that $0^0 = 1$, if we define $a^b$ as the number of functions from a set of $b$ elements to a set of $a$ elements (for nonnegative integers $a$ and $b$). – mathmandan Jan 7 '15 at 6:55
Why isn't this the accepted answer? It is by far the best. – goblin Mar 26 '15 at 4:41

The way, I think about it is via permutations. Suppose you have $n$ objects then to permute them you have $n!$ factorial ways. So, for example, if you had $3$ objects then to permute them you would do $3!$ which is $6$. Suppose, you had $0$ objects then how many times could you permute $0$ things? Once. Therefore, $0!$ should be $1$. This is just an intuitive explanation and a proof by no means.

-

There is an interesting proof from inductive reasoning from this question: Do the differences of perfect squares apply to perfect cubes and more?

-
read the comments for the accepted answer in the link above to see the proof. – Jason Chen May 8 '14 at 20:56

## protected by MJDApr 6 '14 at 7:06

Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site.