Factorial is typically used when figuring out combinations. x! tells you how many ways there are to arrange x objects. there are 0! or 1 way to arrange 0 objects.
There are also people who define factorial recursively for reasons I wont get into here,
so n! = (n-1)! times n. If 0! wasn’t 1 this wouldn’t work anymore.
There is an **excellent** video by Eddie Woo on youtube, I don’t know if I can link it but I highly recommend you go watch it. However, the proof basically boils down to:
1! = 1
2! = 2
3! = 6
4! = 24
Find the pattern. To get from 4! to 3!, divide by 4. From 3! to 2!, divide by 3. From 2! to 1!, divide by 2. What will be the next answer? Divide it by 1. 0! = 1. It fits the pattern in our made up language of mathematics.
I’ll start with
>Wouldn’t this also mean that 1!=0!
Yes. Many functions are multi-valued, this is not big news. For example, (x-1)^2 has the same value, 1, for both 0 and 2.
Now for the harder bit.
One way to think of it is recursively in reverse. Meaning that n! is equal to (n+1)! divided by n. For instance, 6! = 7! / 7. Thus, 0! = 1!/1 = 1/1 = 1.
While this makes some sense, you are open to valid accusations of extrapolating outside the defined bounds of the function, and things get funky for negative integer factorials. The real reason is pretty much “because it’s defined to be”, which also makes it work with something called the [Gamma function](https://en.wikipedia.org/wiki/Gamma_function), making Gamma(n) = (n-1)! for all positive integer n.
2! is what you get when you multiply 1 by 2.
1! is what you get when you multiply 1
0! is what you get when you multiply
So 0! is what you get when you’re multiplying, but you’re not putting anything in. That’s called the empty product. The empty product is usually defined as 1, because that’s the multiplicative identity- same as how the empty sum is 0, the additive identity. 1 is nothing in the context of multiplication, not 0.
Another way to think about factorials is to think about the number of ways you can arrange items. With zero items, there is only 1 way to arrange them.
Say you have two coins, a red one and a blue one. You can arrange the 2 coins in 2! ways. Red, then blue. Or Blue, then red.
Say you have 1 red coin. There is 1! ways to arrange them. Red coin.
Say you have 0 coins. There is 0! ways to arrange them. This gets sort of abstract, but imagine nothing. You can only arrange nothing one way, and that’s to not have anything. That’s the one way to arrange the set when there is nothing in the set. So 0! is 1.
The real answer is “because we say so”. We define the factorial however we want. The other answers are justifications as to why defining 0!=1 makes sense.
We could say that 0! is simply not defined (as are -1! and 0.5!, for instance). However, it would mean we would have to deal with many special cases. We would have to do things like f(n)= … if n = 0 and … otherwise.
It is way more useful to just define 0!=1 so the equations look cleaner.
Edit : changed convenient to useful, as u/peeja’s suggestion.
Latest Answers