TITLE: Is $0! = 1$ because there is only one way to do nothing?
QUESTION [90 upvotes]: 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.

REPLY [22 votes]: 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).