- #1

- 109

- 0

## Main Question or Discussion Point

**Factorial of 0=1 ?!!**

Can anyone please explain to me the proof that the factorial of 0 is 1?

- Thread starter jobsism
- Start date

- #1

- 109

- 0

Can anyone please explain to me the proof that the factorial of 0 is 1?

- #2

CompuChip

Science Advisor

Homework Helper

- 4,302

- 47

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 a

[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, a

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

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.

- #3

Hurkyl

Staff Emeritus

Science Advisor

Gold Member

- 14,916

- 19

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.

- #4

- 107

- 0

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.

- #5

Cyosis

Homework Helper

- 1,495

- 0

You could also use the gamma function to show that [itex]\Gamma(1)=1[/itex].

- #6

- 402

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

- #7

- 36

- 0

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

- #8

arildno

Science Advisor

Homework Helper

Gold Member

Dearly Missed

- 9,970

- 132

If you

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

- #9

- 402

- 1

Please note that

Is not defined for n = 0, so you can't really choose this...If you define (n+1)!=(n+1)*n!, 1!=1

- #10

- 52

- 0

How is that not defined for n=0?Please note thatthisfunction:

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

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

1!=1*0!

1!=0!

Which is true.

- #11

CompuChip

Science Advisor

Homework Helper

- 4,302

- 47

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

arildno

Science Advisor

Homework Helper

Gold Member

Dearly Missed

- 9,970

- 132

Sure it is defined.Please note thatthisfunction:

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

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

- 5

- 0

Look,

(n-1)!=n!/n right?

So 0!=1!/1=1.

- #14

CompuChip

Science Advisor

Homework Helper

- 4,302

- 47

That's a bit of an oversimplification blob.

Is (-1)! = 0!/0 = 1/0 then?

- #15

Landau

Science Advisor

- 905

- 0

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

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.(n+1)!=(n+1)*n!, 1!=1

Formally you should say:

[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[tex]!:\mathbb{N}\cup\{0\}\to \mathbb{N}\cup\{0\}[/tex]

defined by 1!=1 and, for all [itex]n\in\mathbb{N}\cup\{0\}[/itex], (n+1)!=(n+1)*n!

Last edited:

- #16

- 5

- 0

Factorials are defined on the natural numbers and zero.That's a bit of an oversimplification blob.

Is (-1)! = 0!/0 = 1/0 then?

- #17

Char. Limit

Gold Member

- 1,204

- 14

Actually, if you look at the gamma function, [itex]\Gamma\left(-1\right)[/itex] does tend to infinity, as does 1/0...That's a bit of an oversimplification blob.

Is (-1)! = 0!/0 = 1/0 then?

Sorry about the necro.

Last edited:

- #18

Hurkyl

Staff Emeritus

Science Advisor

Gold Member

- 14,916

- 19

Gamma(-1) is a projective complex number; it doesn't "tend", it simplyActually, if you look at the gamma function, [itex]\Gamma\left(-1\right)[/itex] does tend to infinity

- Last Post

- Replies
- 1

- Views
- 2K

- Last Post

- Replies
- 9

- Views
- 7K

- Last Post

- Replies
- 5

- Views
- 3K

- Last Post

- Replies
- 7

- Views
- 26K

- Last Post

- Replies
- 15

- Views
- 3K

- Last Post

- Replies
- 6

- Views
- 2K

- Last Post

- Replies
- 3

- Views
- 6K

- Last Post

- Replies
- 7

- Views
- 6K

- Last Post

- Replies
- 2

- Views
- 2K

- Replies
- 3

- Views
- 3K