How can I prove from first principles that $0!$ is equal to $1$?
Prove $0! = 1$ from first principles
-
16For any cardinal c let c! be the order of the group of permutations of a set of cardinality c. – 2011-02-08
-
33You 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. – 2011-02-08
-
55Please don't state questions as orders; write them as questions. – 2011-02-09
-
5Or to put it differently, $0!=1$ *is* one of the "first principles" in the most typical formulation. – 2011-09-27
-
21Wow, 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$). – 2012-10-03
-
2What do you consider as "first principles"? – 2012-11-17
-
4Because there is ONLY ONE way to do nothing. http://math.stackexchange.com/questions/20969/prove-0-1-from-first-principles/485421#485421 – 2014-01-13
-
0Simple. Instead of defining $0!$, define $1!$ instead, then prove that $0! = 1$. – 2016-06-24
18 Answers
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.
-
42It 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.) – 2011-02-08
-
5You 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). – 2011-02-08
-
4@joriki Thats just fudging notation. In the same sense I can say that 1! = 1. – 2016-06-03
-
0@TheGreatDuck: How's that? That's not true when you move the space. – 2016-06-03
-
0Exactly you said 0! = 1 therefore 0 != 1. I can also say 1! = 1 therefore 1 != 1. Your reasoning is flawed. – 2016-06-03
-
0By convention is that for the multiplicative monoid of the semiring $\mathbb{N}$, we define the empty product $x^0$ to be the identity element which is $1$. – 2016-07-03
-
0@Rawling You said that " "n! = number of ways of arranging n objects" convention: there is only one way of arranging no objects." I just wanted to ask that doesn't there exist infinite number of ways of arranging n objects ?? – 2016-08-14
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]} $$
-
13But 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$... – 2011-09-26
-
13It's not a proof, but it could be the reason why the definition was written in the first place. – 2011-12-23
-
27Then divide both sides by zero to get $(-1)!=\infty$, which is consistent with $\Gamma(0)$ – 2012-10-03
-
2The 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? – 2015-09-02
-
1But can you prove that $6! = 720$? – 2017-05-17
-
0@MorganRodgers : ha ha...... Probably I can do that, but it's not worth doing in this context. – 2017-05-17
$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$.
-
0`empty product of numbers is equal to the multiplicative identity` - means defined to be multiplicative identity ? – 2018-10-09
Because there is only one way to do nothing.
-
14As a professional procrastinator, I disagree. $^{\textrm{is joke}}$ – 2014-10-12
-
1@columbus8myhw, haha. – 2015-03-26
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]
-
0One 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. – 2011-09-26
-
3@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. – 2011-09-26
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.
-
2I remember in my college days getting drunk and using this argument in an attempt to settle this $0! = 1$ matter. See also https://math.stackexchange.com/a/789411/432081 – 2017-09-09
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$.)
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.
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!
-
0so we finally found a good possibility for support of spam? – 2012-10-02
-
0Well, almost equal. There is an exception at $x=0$ where the first term on the latter sum has a $0^0$ which is indeterminate. – 2012-10-03
-
0@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}$. – 2014-10-12
-
3In 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 – 2015-01-06
$0! = 1$ usually is one of the "first principles".
-
0That would make sense. I thought it was always proven by definition. – 2016-06-03
$${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
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).
-
1Note: 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$). – 2015-01-07
-
0Why isn't this the accepted answer? It is by far the best. – 2015-03-26
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$
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.
$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$
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:
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$.
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$.
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.
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$.