
For alternative uses of the exclamation point symbol, please see double factorial for expressions of the form n!! or subfactorial for expressions of the form !n .
Factorial is a function denoted by a trailing exclamation point (!), which is defined for all non-negative integers.
For any positive integer, it outputs the product of all natural numbers between 1 and that number, inclusive:
The notation is read " factorial". Alternatively, one could think of the product as being in the opposite order:
As a concrete example:
As a consequence of the empty product,
You can further prove this by saying that . For example,
Therefore,
Factorials are commonly used in combinatorics and probability theory. It is also used in Taylor polynomials and infinite series.
The factorial function can also be seen as a specific case of the gamma function (), which extends the factorial to the complex plane (excluding the non-positive integers). In particular, for all values for which the factorial is defined:
Examples[]
0 | 1 |
1 | 1 |
2 | 2 |
3 | 6 |
4 | 24 |
5 | 120 |
External links[]
- Fast Factorial Functions: Contains algorithms for computing large factorials.