The factorial of a non-negative integer n, denoted n!, is the product of all positive integers less than or equal to n.
For example, 5! = 5 ร 4 ร 3 ร 2 ร 1 = 120. By convention, 0! = 1. Factorials grow extremely fast: 10! = 3,628,800 and 20! โ 2.43 ร 10ยนโธ. Factorials are used in permutations (n!), combinations (n!/(k!(n-k)!)), probability, Taylor series expansions, and the gamma function (which extends factorials to real and complex numbers).
The factorial function was studied by ancient Indian mathematicians for counting problems. The symbol n! was introduced by Christian Kramp in 1808, though earlier mathematicians like Jabir ibn Hayyan (8th century) and James Stirling (18th century) studied factorial-related concepts. Stirling's approximation n! โ โ(2ฯn)(n/e)โฟ provides a useful estimate for large factorials.