Education
 

Factorial

From Mathematics

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:

math

The notation math is read "n factorial". Alternatively, one could think of the product as being in the opposite order:

math

As a consequence of the empty product,

math

As a concrete example:

math

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 (math), which extends the factorial to the complex plane (excluding the non-positive integers). In particular, for all values for which the factorial is defined:

math