63
$\begingroup$

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

$\endgroup$
  • 16
    $\begingroup$ For any cardinal c let c! be the order of the group of permutations of a set of cardinality c. $\endgroup$ – Pierre-Yves Gaillard Feb 8 '11 at 12:01
  • 33
    $\begingroup$ 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. $\endgroup$ – Zhen Lin Feb 8 '11 at 15:47
  • 55
    $\begingroup$ Please don't state questions as orders; write them as questions. $\endgroup$ – Arturo Magidin Feb 9 '11 at 4:34
  • 5
    $\begingroup$ Or to put it differently, $0!=1$ is one of the "first principles" in the most typical formulation. $\endgroup$ – user14972 Sep 27 '11 at 2:45
  • 21
    $\begingroup$ 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$). $\endgroup$ – SL2 Oct 3 '12 at 0:32

18 Answers 18

61
$\begingroup$

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.

$\endgroup$
  • 42
    $\begingroup$ 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.) $\endgroup$ – Rawling Feb 8 '11 at 10:33
  • 5
    $\begingroup$ 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). $\endgroup$ – joriki Feb 8 '11 at 11:03
  • 4
    $\begingroup$ @joriki Thats just fudging notation. In the same sense I can say that 1! = 1. $\endgroup$ – The Great Duck Jun 3 '16 at 5:04
  • $\begingroup$ @TheGreatDuck: How's that? That's not true when you move the space. $\endgroup$ – joriki Jun 3 '16 at 5:48
  • $\begingroup$ Exactly you said 0! = 1 therefore 0 != 1. I can also say 1! = 1 therefore 1 != 1. Your reasoning is flawed. $\endgroup$ – The Great Duck Jun 3 '16 at 5:55
61
$\begingroup$

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

$\endgroup$
  • $\begingroup$ The argument about the factorial formula isn't needed: that formula would hold anyway when $k=n$: maybe you mean $k=0$? $\endgroup$ – gented May 6 at 14:22
35
$\begingroup$

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]} $$

$\endgroup$
  • 14
    $\begingroup$ 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$... $\endgroup$ – Pete L. Clark Sep 26 '11 at 23:43
  • 13
    $\begingroup$ It's not a proof, but it could be the reason why the definition was written in the first place. $\endgroup$ – Michael Hardy Dec 23 '11 at 0:19
  • 27
    $\begingroup$ Then divide both sides by zero to get $(-1)!=\infty$, which is consistent with $\Gamma(0)$ $\endgroup$ – Chris Brooks Oct 3 '12 at 1:17
  • 2
    $\begingroup$ 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? $\endgroup$ – Alexander Kartun-Giles Sep 2 '15 at 16:05
  • 1
    $\begingroup$ But can you prove that $6! = 720$? $\endgroup$ – Morgan Rodgers May 17 '17 at 16:16
26
$\begingroup$

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

$\endgroup$
  • $\begingroup$ empty product of numbers is equal to the multiplicative identity - means defined to be multiplicative identity ? $\endgroup$ – tarit goswami Oct 9 '18 at 14:47
16
$\begingroup$

Because there is only one way to do nothing.

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

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]

$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – robjohn Sep 26 '11 at 20:36
  • 3
    $\begingroup$ @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. $\endgroup$ – Mark Bennet Sep 26 '11 at 20:49
12
$\begingroup$

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.

$\endgroup$
10
$\begingroup$

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

$\endgroup$
8
$\begingroup$

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.

$\endgroup$
8
$\begingroup$

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!

$\endgroup$
  • $\begingroup$ so we finally found a good possibility for support of spam? $\endgroup$ – Gottfried Helms Oct 2 '12 at 23:20
  • $\begingroup$ 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. $\endgroup$ – Roman Chokler Oct 3 '12 at 0:51
  • $\begingroup$ @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}$. $\endgroup$ – Akiva Weinberger Oct 12 '14 at 21:47
  • 3
    $\begingroup$ 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 $\endgroup$ – fonini Jan 6 '15 at 15:38
5
$\begingroup$

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

$\endgroup$
  • $\begingroup$ That would make sense. I thought it was always proven by definition. $\endgroup$ – The Great Duck Jun 3 '16 at 5:19
4
$\begingroup$

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

$\endgroup$
  • 1
    $\begingroup$ 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$). $\endgroup$ – mathmandan Jan 7 '15 at 6:55
  • $\begingroup$ Why isn't this the accepted answer? It is by far the best. $\endgroup$ – goblin Mar 26 '15 at 4:41
3
$\begingroup$

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

$\endgroup$
3
$\begingroup$

First we state that $n!=\frac {(n+1)!}{(n+1)}$. Now let $n=0$ then $0!=\frac{(0+1)!}{(0+1)}=\frac{1!}{1}=1$ Hence $0!=1$

$\endgroup$
1
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

$n!$ is defined as the number of way n distinct object can be arranged.

For example,

$1!$ is described to arrange $1$ object,i.e $1$ way.

$A$

$2!$ is described to arrange $2$ object,i.e $2$ way.

$AB,BA$

$3!$ is described to arrange $3$ object,i.e $6$ way.

$ABC,ACB,BAC,BCA,CAB,CBA$

Similary, $0!$ describe the way to arrange $0$ object.$0$ object means nothing.There comes a hypothetical thinking,there is $1$ way to arrange $0$ object or nothing,that is nothing.

So, $0!=1$

$\endgroup$
1
$\begingroup$

You cannot prove that $0!=1$ from first principles, because it is a convention. First, we define "$!$" as follows:

$n!=\begin{array}{c}n\\ \prod\\ k=1 \end{array}k=1\cdot2\cdot3\cdot...\cdot(n-1)\cdot n$

This has no meaning for $n=0$ . But it would be useful if it had one. So, we make the convention that $0!=1$ . This is the best choice, because:

  1. For $n>1$ , $n!=n\cdot(n-1)!$ If we want to extent this for $n=1$ , we must have: $1!=1\cdot0!\Rightarrow1!=0!\Rightarrow0!=1$.

  2. There are $n!$ ways to arrange $n$ objects into a sequence, for $n\geq1$. For zero objects, there is only one arrangement. So, if we want to extent the formula $n!$ to be applicable to zero objects, we must have $0!=1$.

  3. A taylor series is an infinite series of the form: $$f(a)+\dfrac{f'(a)}{1!}\left(x-a\right)+\dfrac{f''(a)}{2!}\left(x-a\right)^{2}+\dfrac{f'''(a)}{3!}\left(x-a\right)^{3}+...$$

    If we aggre that $0!=1$ , we can write the same thing using the sigma notation: $$\begin{array}{c} \infty\\ \sum\\ k=0 \end{array}\dfrac{f^{(k)}(\alpha)}{k!} \left(x-a\right)^{k}$$

From these and other cases (see previous answers), we conclude that the best choice is to give $0!$ the value 1.

$\endgroup$
0
$\begingroup$

Also remember that $n! $ is the number of ways to arrange $n$ objects. We have only one way to arrange $0$ objects, i.e; $0!=1$.

$\endgroup$

protected by MJD Apr 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 (the association bonus does not count).

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.