What is Factorial?
A factorial, denoted by n!, is the product of all positive integers from 1 to n. For example, 5! (read as "five factorial") equals 5 × 4 × 3 × 2 × 1 = 120. The factorial function is one of the most fundamental concepts in mathematics, particularly in combinatorics and probability theory.
By mathematical convention, 0! is defined to equal 1. This might seem counterintuitive, but it's essential for many formulas to work correctly, including the binomial coefficient and various counting formulas.
Factorial Formula
n! = n × (n-1) × (n-2) × ... × 3 × 2 × 1
Or recursively: n! = n × (n-1)! where 0! = 1
Examples
3! = 3 × 2 × 1 = 6
5! = 5 × 4 × 3 × 2 × 1 = 120
7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040
10! = 3,628,800
Common Uses of Factorial
- Permutations: The number of ways to arrange n distinct objects is n!
- Combinations: C(n,r) = n! / (r! × (n-r)!) calculates how many ways to choose r items from n items
- Probability: Many probability calculations involve factorials, especially in binomial distributions
- Taylor Series: Factorials appear in the denominators of Taylor series expansions (e.g., e^x, sin(x))
- Computer Science: Used in algorithm analysis, counting problems, and recursive function design
Properties of Factorial
- Factorial is only defined for non-negative integers
- Factorials grow extremely fast - faster than exponential functions
- n! = n × (n-1)! (recursive property)
- For large n, Stirling's approximation can be used: n! ≈ √(2πn) × (n/e)^n