Factorial
The factorial is a function that is defined only for non-negative integers . The factorial of a number is written as , and is the product of all positive integers less than or equal to . Important to note is that and . For , the factorial is defined as:
or alternatively,
Example
Why is $0! = 1$?
There are many reasons why must be , most of them being related to combinatorics and counting problems. However, there is an intuitive explanation that can be given. Notice above that . This means that the factorial of a number is the product of that number and the factorial of the number that is one less than it.
For the above to hold true for we need to have because if , then would be:
and all other factorials would also be as well. Therefore, must be .