Understanding the Proof: Factorial of 0 is 1

  • Thread starter Thread starter jobsism
  • Start date Start date
  • Tags Tags
    Factorial
jobsism
Messages
115
Reaction score
0
Factorial of 0=1 ?!

Can anyone please explain to me the proof that the factorial of 0 is 1?
 
Physics news on Phys.org


It's not really a proof, its more of a definition which turns out to be convenient in calculations, so we don't have to make exceptions in cases where "0!" might turn up.

If you let n! mean "the number of ways that n distinct objects can be ordered", you should ask: "in how many ways can 0 objects be ordered?". Reasonable answers would be 0 (if you have no objects, you cannot order them at all) or 1 (there is just one way, namely: don't
order them at all).

If we consider the the binomial coefficients (n choose k) we can look at (n choose 0), where n is a positive integer. This coefficient is defined as
n! / (n! 0!)
so if 0! were to be equal to zero, this would be undefined. If 0! = 1, then this would give n! / n! = 1.
Now the latter is more useful, for example, (n choose 0) means: "in how many ways can we choose 0 objects from a set of n?". The answer "1: namely, choose neither of them" is more sensible than "this question makes no sense, because (n choose 0) is undefined due to division by zero". Also, in expansions like
(a + b)^n = \binom{n}{0} a^n b^0 + \cdots = \frac{1}{0!} a^n + \cdots
it would make sense to have 0! = 1, because when you work out the brackets you will indeed get one and only one term with an. So we can write
(a + b)^n = \sum_{k = 0}^n \binom{n}{k} a^k b^{n - k}
where otherwise we would have to write
(a + b)^n = a^n + \left( \sum_{k = 1}^{n - 1} \binom{n}{k} a^k b^{n - k} \right) + b^n
(note that the final term, a0 bn, cannot be included in the sum either, because (n choose n) will contain 0! as well).

We can also use the recursive definition of the factorial to argue that 0! should be defined as being equal to 0. The function f(n) = n! can be recursively defined on the integers by
n! = n * (n - 1)!
where 1! = 1.

Although by definition the base case is 1! = 1, we could try and apply it to n = 1, and get
1! = 1 * 0!
If this is equal to 1, then 0! should be equal to 1.
[Note that going further would give 1 = 0! = 0 * (-1)!, making (-1)! undefined].
Again, this is not a rigorous argument, but it makes our life a little easier. There is no strong mathematical reason why we should be able to apply the recursion to n = 1 (after all, that's the definition), but it makes things a little more consistent if we do.

Finally there is the direct definition of n!, as the product of all numbers from 1 up to (and including) n. For example, 12! = 12 * 11 * 10 * 9 * 8 * 7 * 6 * 5 * 4 * 3 * 2 * 1, 4! = 4 * 3 * 2 *1 and 1! = 1. If you know the following notation, it's simply
n! = \prod_{k = 0}^n k
Then 0! would be an "empty" product, which we usually define as having the value 1 (just like the empty sum has value 0).

So setting 0! = 1 is somewhat of an arbitrary choice (we could make n! be undefined for n = 0, or assign any other value), but it is a choice which allows us to use n! in great generality without having to make exceptions all the time, whenever n might possibly take on the value 0.
 


In other words, the very applications that inspired us to bother defining the factorial function require us to set 0!=1 if we want to make the most use of it.
 


In school they taught us that 0! = 1 because there is only one way to choose nothing, I'm not sure that makes sense when translated to the mathematical idea but 0! = 1 does anyway.
 


You could also use the gamma function to show that \Gamma(1)=1.
 
  • Like
Likes milkism


Let A be a set with n \geq 0 elements. Then, the number of permutations of elements of A (bijective functions from A to A) is n!; now, if A is the empty set (n = 0), then there is only one permutation, the empty one, so 0! = 1.
 


I always thought of 0! as being the product of nothing, i.e. the empty product, which is 1.
 


If you define (n+1)!=(n+1)*n!, 1!=1, as a function over the integers, then it follows that, by choosing n=0, 1!=1*0!, or 0!=1 if existing.

Note, by the weay that this definition "proves" that (-1)! can't exist together with the above result.
 


Please note that this function:

If you define (n+1)!=(n+1)*n!, 1!=1

Is not defined for n = 0, so you can't really choose this...
 
  • #10


JSuarez said:
Please note that this function:



Is not defined for n = 0, so you can't really choose this...

How is that not defined for n=0?

(0+1)!=(0+1)*0!

1!=1*0!

1!=0!

Which is true.
 
  • #11


I think JSuarez means, that the recursion technically is not valid for n = 0, because n = 1 is the first case.
Of course, you can always extend the definition by setting n! to anything you want for n = 0, -1, -2, ...
The logical choice, in agreement with the above relation, would be 0! = 1! and keeping (-n)! undefined (n > 0).
Of course, there are other choices (such as extending the definition to the Gamma function).

At least, that's the way I look at it.
 
  • #12


JSuarez said:
Please note that this function:



Is not defined for n = 0, so you can't really choose this...

Sure it is defined.

I defined a general function from the integers into itself.

Then, it is a matter of exploration to find out which subset of the integers that can properly be regarded as the argument set. (The negatives are seen to be ruled out).
 
  • #13


Look,
(n-1)!=n!/n right?
So 0!=1!/1=1.
 
  • #14


That's a bit of an oversimplification blob.
Is (-1)! = 0!/0 = 1/0 then?
 
  • #15


arildno said:
Sure it is defined.

I defined a general function from the integers into itself.

Then, it is a matter of exploration to find out which subset of the integers that can properly be regarded as the argument set. (The negatives are seen to be ruled out).
The domain of a function is part of the definition of that function! You can't say "I define a function \mathbb{Z}\to \mathbb{Z} by writing some formula, but hey, for negative integers the formula doesn't make sense, oh well".

Anyway, recursion is the same as mathematical induction. If you recursively define
(n+1)!=(n+1)*n!, 1!=1
then you have specified the "base case" to be n=1. There has to be a base case (the formula (n+1)!=(n+1)*n alone does not make sense as definition), and it is part of the definition.
Formally you should say: recursively define the function
!:\mathbb{N}\to \mathbb{N}
by 1!=1 and, for all n>1, (n+1)!=(n+1)*n! (which is well-defined because of induction).


What you have shown is that
!:\mathbb{N}\cup\{0\}\to \mathbb{N}\cup\{0\}
defined by 1!=1 and, for all n\in\mathbb{N}\cup\{0\}, (n+1)!=(n+1)*n!
is well-defined if and only if 0!=1.
 
Last edited:
  • #16


CompuChip said:
That's a bit of an oversimplification blob.
Is (-1)! = 0!/0 = 1/0 then?

Factorials are defined on the natural numbers and zero.
 
  • #17


CompuChip said:
That's a bit of an oversimplification blob.
Is (-1)! = 0!/0 = 1/0 then?

Actually, if you look at the gamma function, \Gamma\left(-1\right) does tend to infinity, as does 1/0...


Sorry about the necro.
 
Last edited:
  • #18


Char. Limit said:
Actually, if you look at the gamma function, \Gamma\left(-1\right) does tend to infinity
Gamma(-1) is a projective complex number; it doesn't "tend", it simply is projective infinity.
 
Back
Top