Introduction to Factorials

Factorials are one of the most fundamental concepts in mathematics, with applications spanning from basic arithmetic to advanced fields like combinatorics, probability theory, and computer science. The factorial function grows at an astonishing rate, making it both powerful and computationally challenging.

Why Factorials Matter:

  • Essential for counting permutations and combinations
  • Foundation of probability and statistics
  • Critical in algorithm analysis and computational complexity
  • Used in Taylor series expansions and calculus
  • Applications in physics, engineering, and data science

This comprehensive guide will take you from the basic definition of factorials through their properties, applications, and advanced topics, complete with interactive tools to help you master this essential mathematical concept.

What is a Factorial?

The factorial of a non-negative integer n, denoted by n!, is the product of all positive integers less than or equal to n. Factorials are fundamental to combinatorics because they count the number of ways to arrange n distinct objects.

n! = n × (n-1) × (n-2) × ... × 3 × 2 × 1

Where:

  • n is a non-negative integer (n ≥ 0)
  • n! is read as "n factorial"
  • The product includes all integers from n down to 1

Examples:

5! = 5 × 4 × 3 × 2 × 1 = 120

4! = 4 × 3 × 2 × 1 = 24

3! = 3 × 2 × 1 = 6

2! = 2 × 1 = 2

1! = 1

0! = 1 (by definition)

Special Cases and Conventions
  • 0! = 1: Defined for mathematical consistency in formulas
  • 1! = 1: The trivial case
  • Negative integers: Factorials are not defined for negative integers
  • Non-integer values: Extended via the Gamma function: Γ(z) = (z-1)!
n n! Value Approximate
0 0! 1 1
1 1! 1 1
2 2! 2 2
3 3! 6 6
4 4! 24 24
5 5! 120 120
6 6! 720 720
7 7! 5,040 5.04 × 10³
8 8! 40,320 4.032 × 10⁴
9 9! 362,880 3.629 × 10⁵
10 10! 3,628,800 3.629 × 10⁶
15 15! 1,307,674,368,000 1.308 × 10¹²
20 20! 2,432,902,008,176,640,000 2.433 × 10¹⁸

If you want to test your skills, explore real-world practice using the factorial calculator.

Properties and Rules of Factorials

Factorials follow specific mathematical properties that make them useful in calculations and simplifications:

🔢

Recursive Definition

n! = n × (n-1)! for n ≥ 1
0! = 1

This recursive property is fundamental to both mathematical proofs and computational implementations of factorials.

Division Property

n! / (n-1)! = n

Useful for simplifying factorial expressions in combinatorial formulas and probability calculations.

✖️

Multiplication Rule

n! × m! ≠ (n × m)!
n! × m! ≠ (n + m)!

Important: Factorials don't distribute over multiplication or addition. This is a common misconception.

📈

Growth Rate

n! grows faster than:
• Any polynomial
• Any exponential function aⁿ

Factorial growth is super-exponential, which has important implications in computer science and algorithm analysis.

Common Factorial Identities
Identity Formula Example
Double Factorial n!! = n × (n-2) × (n-4) × ... 8!! = 8 × 6 × 4 × 2 = 384
Factorial of Sum (a+b)! ≠ a! + b! (2+3)! = 120 ≠ 2!+3! = 8
Ratio Simplification n!/(n-k)! = n×(n-1)×...×(n-k+1) 7!/4! = 7×6×5 = 210
Stirling's Approximation n! ≈ √(2πn)(n/e)ⁿ 10! ≈ √(20π)(10/e)¹⁰

Permutations: Arranging Objects

Permutations count the number of ways to arrange objects in a specific order. Factorials are essential for calculating permutations.

Definition: A permutation is an arrangement of objects in a specific order. The number of permutations of n distinct objects is n!.

🔤

Simple Permutations

Formula: P(n) = n!

Example: Arranging 3 books on a shelf

3! = 3 × 2 × 1 = 6 arrangements

ABC, ACB, BAC, BCA, CAB, CBA

📐

k-Permutations

Formula: P(n,k) = n!/(n-k)!

Example: Choosing President, VP from 5 people

P(5,2) = 5!/(5-2)! = 5!/3! = 5×4 = 20

Order matters: AB ≠ BA

🔄

Circular Permutations

Formula: (n-1)!

Example: Seating 4 people at a round table

(4-1)! = 3! = 6 arrangements

Rotations are considered identical

🔢

Permutations with Repetition

Formula: n!/(n₁!n₂!...nₖ!)

Example: Arranging "MISSISSIPPI"

11!/(4!4!2!1!) = 34,650

Accounts for identical letters

Permutation Calculator

Enter values for n and k and click "Calculate"

To check your understanding, try practical examples with the factorial calculator.

Combinations: Selecting Objects

Combinations count the number of ways to select objects without regard to order. The binomial coefficient, expressed using factorials, is central to combination calculations.

Definition: A combination is a selection of objects where order doesn't matter. The number of ways to choose k objects from n distinct objects is given by the binomial coefficient.

C(n,k) = nCk = n!/k!(n-k)!
🎯

Simple Combinations

Example: Choosing 3 students from 10 for a committee

C(10,3) = 10!/(3!7!) = 120

Order doesn't matter: ABC = ACB = BAC, etc.

📊

Binomial Theorem

Formula: (a+b)ⁿ = Σ C(n,k)aⁿ⁻ᵏbᵏ

(x+y)³ = C(3,0)x³ + C(3,1)x²y + C(3,2)xy² + C(3,3)y³

Binomial coefficients are factorial ratios

🎲

Pascal's Triangle

Property: C(n,k) = C(n-1,k-1) + C(n-1,k)

Each entry is sum of two above

Visual representation of binomial coefficients

⚖️

Symmetry Property

Formula: C(n,k) = C(n,n-k)

C(10,3) = C(10,7) = 120

Choosing k is same as rejecting n-k

Common Combination Formulas
Formula Name Expression Example
Basic Combination C(n,k) = n!/(k!(n-k)!) C(5,2) = 10
Sum of Combinations Σ C(n,k) = 2ⁿ C(4,0)+C(4,1)+...+C(4,4)=16
Vandermonde's Identity C(m+n,k) = Σ C(m,i)C(n,k-i) C(3+2,2) = C(3,0)C(2,2)+...
Hockey Stick Identity Σ C(i,k) = C(n+1,k+1) C(2,2)+C(3,2)+C(4,2)=C(5,3)

Want to evaluate your knowledge? Solve real-life problems using the factorial calculator.

Probability Applications

Factorials are fundamental to probability theory, particularly in calculating probabilities of equally likely outcomes and combinatorial probabilities.

🎯

Simple Probability

Formula: P(event) = favorable/total

Example: Probability of specific arrangement

P(specific order) = 1/n!

For n distinct items, each arrangement equally likely

🃏

Card Probabilities

Example: Probability of specific poker hand

P(royal flush) = 4/C(52,5)

Combinations calculate possible hands

🎰

Lottery Odds

Example: Powerball probability

P(jackpot) = 1/C(69,5)×C(26,1)

Extremely small probabilities using combinations

📊

Binomial Distribution

Formula: P(k successes) = C(n,k)pᵏ(1-p)ⁿ⁻ᵏ

Coin flips, success/failure trials

Combinations count ways to get k successes

Probability Calculator

Enter values and click "Calculate"
Birthday Paradox

The probability that in a group of n people, at least two share a birthday:

P(shared birthday) = 1 - 365!/365ⁿ(365-n)!

With just 23 people, the probability exceeds 50%. With 70 people, it's over 99.9%.

Computing Factorials

Factorials grow extremely fast, presenting computational challenges. Understanding how to compute factorials efficiently is crucial in computer science and numerical analysis.

💾

Iterative Computation

function factorial(n) {
  let result = 1;
  for (let i = 2; i <= n; i++) {
    result *= i;
  }
  return result;
}

Time complexity: O(n), Space: O(1)

🔄

Recursive Computation

function factorial(n) {
  if (n <= 1) return 1;
  return n * factorial(n-1);
}

Time: O(n), Space: O(n) due to call stack

📈

Stirling's Approximation

n! ≈ √(2πn) × (n/e)ⁿ

// More accurate version:
n! ≈ √(2πn) × (n/e)ⁿ ×
    (1 + 1/(12n) + 1/(288n²))

Useful for large n where exact computation is impossible

Big Integer Handling

// Python example using big integers
import math
# Python handles big integers automatically
result = math.factorial(100)
# Result has 158 digits

20! already exceeds 64-bit integer limit

Factorial Growth Comparison
n n! Digits Comparison
10 3.63×10⁶ 7 Small town population
20 2.43×10¹⁸ 19 Grains of sand on Earth
52 8.07×10⁶⁷ 68 Possible card deck orders
100 9.33×10¹⁵⁷ 158 More than atoms in universe

If you're ready to practice, apply concepts in real scenarios with the factorial calculator.

Advanced Topics

Beyond basic factorials, several advanced mathematical concepts extend and build upon factorial theory.

Gamma Function

Extends factorial to complex numbers:

Γ(z) = ∫₀^∞ t^{z-1}e^{-t}dt
Γ(n+1) = n! for n ∈ ℕ

Allows factorial calculation for non-integer values

Double Factorial

Product of integers with same parity:

n!! = n × (n-2) × (n-4) × ...
8!! = 8×6×4×2 = 384
7!! = 7×5×3×1 = 105

Used in combinatorics and special functions

Falling Factorial

Also called descending factorial:

(x)_n = x(x-1)(x-2)...(x-n+1)
= x!/(x-n)!

Useful in calculus and difference equations

Superfactorial

Product of first n factorials:

sf(n) = ∏_{k=1}^n k!
= 1!×2!×3!×...×n!

Grows even faster than factorial

Mathematical Series with Factorials
Series Formula Application
Taylor Series f(x) = Σ f⁽ⁿ⁾(a)(x-a)ⁿ/n! Function approximation
Exponential eˣ = Σ xⁿ/n! Calculus, differential equations
Sine sin x = Σ (-1)ⁿx²ⁿ⁺¹/(2n+1)! Trigonometry, physics
Cosine cos x = Σ (-1)ⁿx²ⁿ/(2n)! Trigonometry, engineering

Interactive Tools

Factorial Calculator

Calculate factorials, permutations, and combinations with real-time results.

Enter a value for n and click a button to see results

Challenge: How many ways can 8 people be seated in 8 chairs?

Solution:

This is a simple permutation problem: P(8) = 8!

8! = 8 × 7 × 6 × 5 × 4 × 3 × 2 × 1 = 40,320

There are 40,320 different ways to seat 8 people in 8 chairs.

Challenge: A committee of 4 needs to be chosen from 12 people. How many different committees are possible?

Solution:

This is a combination problem (order doesn't matter): C(12,4)

C(12,4) = 12!/(4!8!) = (12×11×10×9)/(4×3×2×1) = 495

There are 495 different possible committees.

Challenge: How many distinct arrangements can be made from the letters in "MATHEMATICS"?

Solution:

This is a permutation with repetition problem.

Word: MATHEMATICS (11 letters)

Letter frequencies: M=2, A=2, T=2, H=1, E=1, I=1, C=1, S=1

Number of arrangements = 11!/(2!2!2!1!1!1!1!1!)

= 39,916,800/(2×2×2) = 39,916,800/8 = 4,989,600

Check how well you understand factorials by using the factorial calculator.

Real-World Applications

Factorials have numerous practical applications across various fields:

🔐

Cryptography

Key Space Size: n! possible permutations for n elements

Example: 256-bit encryption has ~2²⁵⁶ possible keys

Factorial growth provides security through computational infeasibility

🧬

Genetics

Gene Sequencing: n! possible arrangements of n genes

Protein Folding: Combinatorial possibilities in folding patterns

Biological systems exploit combinatorial complexity

🚗

Operations Research

Traveling Salesman: n! possible routes for n cities

Scheduling: n! possible schedules for n tasks

Optimization problems often involve factorial search spaces

🎨

Art and Design

Color Palettes: n! arrangements of n colors

Musical Compositions: n! permutations of n notes

Creative fields use permutations for variation and exploration

Common Factorial Applications by Field
Field Application Formula
Computer Science Algorithm complexity analysis O(n!) factorial time
Statistics Sampling without replacement n!/(n-k)!
Physics Statistical mechanics n! arrangements of particles
Economics Game theory strategies n! possible strategy profiles
Chemistry Molecular arrangements n! stereoisomers
Linguistics Sentence structures n! word arrangements