Is $0! = 1$ because there is only one way to do nothing?

The proof for $0!=1$ was already asked at here. My question, yet, is a bit apart from the original question. I'm asking whether actually $0!=1$ is true because there is only one way to do nothing or just because of the way it's defined.


Yes, precisely there is a unique function $\emptyset \to \emptyset$ (with empty graph), which happens to be a bijection ($\operatorname{id}_\emptyset$). Note, that $n!$ is the number of bijections $\{1,\dots, n\}\to \{1,\dots,n\}$.


For positive numbers the factorial function $n!$ is defined as the product of all positive integers less or equal to $n$. To define $0!$ we need to "extend" the definition. Another way to define it is to notice that:

$$(n-1)! = \frac{n!}{n}$$

Pluging $n=1$ we get: $0! = \frac{1!}{1} = 1$


I'm going to go a bit against the grain and say that this isn't a very great way of thinking about this. Having a combinatorial intuition for functions that have combinatorial definitions is great, but that intuition often just doesn't work for vacuous cases where you plug in 0 for one of the values, because getting the right answer really requires thinking carefully about the formal definition with sets.

Say you have three numbers, 1, 2, 3, and you look at all the different ways you can write them down

1, 2, 3

1, 3, 2

2, 1, 3

2, 3, 1

3, 1, 2

3, 2, 1

Now if you count those, you see six lines. In general, if you do this for $n$ numbers, you will see $n!$ lines. But what about 0 numbers? Here's all the ways you can write 0 numbers:

Seems weird. I don't know about you, but I see 0 lines. But based on what everyone is saying, there should be one line there. What's going on? Is there really one way to count nothing?

The problem is that, for this intuitive definition to work right, there has to be one "empty" line. There aren't empty lines in the other cases, though, just when you have 0 numbers. Confused? Let's look at this just a little differently. Let's do the same thing again, but this time, when we write the numbers, let's write parentheses around them:

(1, 2, 3)

(1, 3, 2)

(2, 1, 3)

(2, 3, 1)

(3, 1, 2)

(3, 2, 1)

Now instead of counting lines, we count the number of parenthesized items of numbers. These are called $n$-tuples, or just tuples. $n!$ is the number of $n$-tuples, the number of tuples of length $n$. Formally, it is the size of the set of all $n$-tuples.

Now, let's do 0. How many tuples of length 0 are there? Here's one:

()

Based on our definition of a tuple (parenthesized ordered list of numbers), that counts. It should be pretty obvious that that is the only one. So 0! is 1.

At the end of the day, you have to define functions like $n!$ in a set theoretic way. Then the values of corner cases like $0!$ fall out of those definitions, typically by something called vacuous truth ("vacuous" is a word I used above, not by accident).


Yes. 0! = 1 because it is defined that way. One of the reasons it is defined that way is because it makes sense in the context of combinatorics given that there is only one empty object or permutation up to isomorphism.

So both are correct - it varies on one's definition of the factorial function. When defined in reference to a combinatorial quantity it would be possible to prove 0! = 1. When defined recursively it is usually taken as definitional.


"Everybody knows that if you add up no numbers, you get zero. Not everybody knows that if you multiply no numbers, you get $1$, but I know that." - Tom Goodwillie, 2 Dec 2008