In mathematics, the factorial of a non-negative integer, denoted by, is the product of all positive integers less than or equal to. The factorial of also equals the product of with the next smaller factorial:
For example,
The value of 0! is 1, according to the convention for an empty product.