Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Factorial of 0=1 ?

  1. Jun 9, 2010 #1
    Factorial of 0=1 ?!!

    Can anyone please explain to me the proof that the factorial of 0 is 1?
     
  2. jcsd
  3. Jun 9, 2010 #2

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    Re: Factorial of 0=1 ?!!

    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
    [tex](a + b)^n = \binom{n}{0} a^n b^0 + \cdots = \frac{1}{0!} a^n + \cdots[/tex]
    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
    [tex](a + b)^n = \sum_{k = 0}^n \binom{n}{k} a^k b^{n - k} [/tex]
    where otherwise we would have to write
    [tex](a + b)^n = a^n + \left( \sum_{k = 1}^{n - 1} \binom{n}{k} a^k b^{n - k} \right) + b^n [/tex]
    (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
    [tex]n! = \prod_{k = 0}^n k[/tex]
    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.
     
  4. Jun 9, 2010 #3

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Re: Factorial of 0=1 ?!!

    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.
     
  5. Jun 9, 2010 #4
    Re: Factorial of 0=1 ?!!

    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.
     
  6. Jun 9, 2010 #5

    Cyosis

    User Avatar
    Homework Helper

    Re: Factorial of 0=1 ?!!

    You could also use the gamma function to show that [itex]\Gamma(1)=1[/itex].
     
  7. Jun 9, 2010 #6
    Re: Factorial of 0=1 ?!!

    Let A be a set with [itex]n \geq 0[/itex] 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.
     
  8. Jun 12, 2010 #7
    Re: Factorial of 0=1 ?!!

    I always thought of 0! as being the product of nothing, i.e. the empty product, which is 1.
     
  9. Jun 19, 2010 #8

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    Re: Factorial of 0=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.
     
  10. Jun 19, 2010 #9
    Re: Factorial of 0=1 ?!!

    Please note that this function:

    Is not defined for n = 0, so you can't really choose this...
     
  11. Jun 19, 2010 #10
    Re: Factorial of 0=1 ?!!

    How is that not defined for n=0?

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

    1!=1*0!

    1!=0!

    Which is true.
     
  12. Jun 21, 2010 #11

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    Re: Factorial of 0=1 ?!!

    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.
     
  13. Jun 21, 2010 #12

    arildno

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    Dearly Missed

    Re: Factorial of 0=1 ?!!

    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).
     
  14. Jul 8, 2010 #13
    Re: Factorial of 0=1 ?!!

    Look,
    (n-1)!=n!/n right?
    So 0!=1!/1=1.
     
  15. Jul 8, 2010 #14

    CompuChip

    User Avatar
    Science Advisor
    Homework Helper

    Re: Factorial of 0=1 ?!!

    That's a bit of an oversimplification blob.
    Is (-1)! = 0!/0 = 1/0 then?
     
  16. Jul 8, 2010 #15

    Landau

    User Avatar
    Science Advisor

    Re: Factorial of 0=1 ?!!

    The domain of a function is part of the definition of that function! You can't say "I define a function [itex]\mathbb{Z}\to \mathbb{Z}[/itex] 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
    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
    [tex]!:\mathbb{N}\to \mathbb{N}[/tex]
    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
    is well-defined if and only if 0!=1.
     
    Last edited: Jul 8, 2010
  17. Jul 9, 2010 #16
    Re: Factorial of 0=1 ?!!

    Factorials are defined on the natural numbers and zero.
     
  18. Jul 27, 2010 #17

    Char. Limit

    User Avatar
    Gold Member

    Re: Factorial of 0=1 ?!!

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


    Sorry about the necro.
     
    Last edited: Jul 27, 2010
  19. Jul 27, 2010 #18

    Hurkyl

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Re: Factorial of 0=1 ?!!

    Gamma(-1) is a projective complex number; it doesn't "tend", it simply is projective infinity.
     
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook