In mathematics, the factorial of a non-negative integer, $n$, denoted $n!$ is the product of all of the positive integers less than or equal to $n$. By convention $0! = 1$. More formally,

n! = \prod_{k=1}^{n}k

The factorial function can also be defined recursively:

n! = \begin{cases}
1, & \text{if $n = 0$},\\
(n – 1)! * n & \text{if $n > 0$}
\end{cases}

« Back to Glossary Index