Factorial
================
Definition
The factorial of a non-negative integer ( n ), denoted by ( n! ) or ( factorial(n) ), is the product of all positive integers less than or equal to ( n ). It is a fundamental mathematical operation that has numerous applications in various fields, including physics, engineering, computer science, and mathematics.
Formula
The formula for calculating the factorial of a non-negative integer ( n ) is:
[ n! = n \times (n-1) \times (n-2) \times \ldots \times 2 \times 1 ]
For example, ( 5! = 5 \times 4 \times 3 \times 2 \times 1 = 120 ).
History
The concept of factorial dates back to ancient civilizations. The Babylonians used a sexagesimal (base-60) number system that included a factorials-like calculation around 1900 BCE.
In the 16th century, German mathematician Ludolph van Ceulen calculated the factorial of 7, 11, and 13, demonstrating its computational value.
Calculation
To calculate the factorial of a non-negative integer ( n ), you can use the following formula:
[ n! = n \times (n-1) \times (n-2) \times \ldots \times 2 \times 1 ]
For example, to calculate ( 5! ):
[ 5! = 5 \times 4 \times 3 \times 2 \times 1 = 120 ]
Properties
- Distributive Property: The factorial of a sum is equal to the product of the factorials: [ (a + b)! = a! \times b! ]
- Product Property: The factorial of a product is equal to the product of the factorials: [ (ab)! = a! \times b! ]
Applications
- Physics and Engineering: Factorials are used in calculations involving probabilities, random variables, and statistical distributions.
- Computer Science: Factorials are employed in algorithms for sorting, searching, and other data structures.
- Mathematics: Factorials have numerous applications in combinatorics, number theory, and algebraic geometry.
Example Use Cases
- Combinatorial Calculations: Calculate the number of ways to arrange objects in a specific order using factorials: [ 3! = \frac{3!}{0!} = \frac{6}{1} = 6 ]
- Random Number Generation: Use factorials to generate random numbers with specific distributions: [ X \sim \text{Exponential}(1) \implies X = \frac{-\ln(1)}{\lambda}]
- Statistical Analysis: Calculate the probability of events occurring within a given range using factorials: [ P(X > 5) = \int_{6}^{\infty} f(x) dx ]
Further Reading
- “A Course of Pure Mathematics” by David Hilbert (1902): A comprehensive textbook on mathematics that includes chapters on the Factorial Function.
- “Introduction to Combinatorics” by George F. Roemer (1988): A book that explores combinatorial applications and properties of the factorial.
References
- International Mathematical Olympiad (IMO) Computation Project: Provides resources and solutions for calculating factorials and related mathematical functions.
- Wikipedia: Factorial : An article covering the definition, formula, history, calculation, and applications of the Factorial Function.