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