A topic in the Open Knowledge Graph — a free, open map of 15,290 topics and the order to learn them in.

Factorial

Middle & High School Depth 61 in the knowledge graph ☐ I know this ☆ Set as goal
9,511topics build on this
273prerequisites beneath it
See this on the map →
Multiplying Polynomials→→PermutationsPermutations and Arrangements
factorial combinatorics counting

Core Idea

The factorial of a non-negative integer n, written n!, is the product of all positive integers from 1 to n: n! = n × (n−1) × (n−2) × ... × 2 × 1. For example, 5! = 5 × 4 × 3 × 2 × 1 = 120. By convention, 0! = 1 (this is not arbitrary — it's required for combinatorial formulas to work correctly and is consistent with the empty product). Factorials grow extremely fast: 10! = 3,628,800 and 20! exceeds 2.4 × 10¹⁸. Factorials are fundamental to counting problems because n! counts the number of ways to arrange n distinct objects in a sequence (permutations), making them the building block for permutations, combinations, and the binomial theorem.

How It's Best Learned

Start with a concrete counting problem: "How many ways can 3 people line up?" List all 6 arrangements, then show the multiplication principle (3 choices × 2 choices × 1 choice = 3! = 6). Extend to 4 and 5 people to build the pattern. Introduce the notation and the recursive definition: n! = n × (n−1)!. Address 0! = 1 by showing it's needed for formulas like C(n,0) = n!/0!n! = 1 to work. Practice computing factorials by hand for small values, then discuss how quickly they grow. Connect to permutations and combinations as the immediate applications.

Common Misconceptions

Explainer

Factorials emerge from a single concrete question: in how many different orders can you arrange a set of distinct objects? Suppose you have three books to place on a shelf. The first slot can hold any of the 3 books. Once placed, 2 books remain for the second slot. One book is left for the third. The multiplication principle — the number of sequences equals the product of choices at each step — gives 3 × 2 × 1 = 6. This is 3! (read "three factorial"). For n distinct objects, the count of possible orderings is n! = n × (n−1) × (n−2) × … × 2 × 1. Every factorial is answering this arrangement-counting question.

The growth of factorials is explosive compared to the other functions you've worked with. Polynomial growth (n², n³) and even exponential growth (2n) are left behind quickly: 210 = 1,024, but 10! = 3,628,800. By 20!, you exceed 2.4 × 10¹⁸ — roughly the number of grains of sand on Earth. This explosive growth is why factorials appear in probability: a standard deck of 52 cards can be shuffled into 52! ≈ 8 × 10⁶⁷ possible orders, so a randomly shuffled deck has almost certainly never been in that exact arrangement before. Developing intuition for factorial magnitude helps you know when a result is plausible.

The convention 0! = 1 is not arbitrary. Think of it this way: "How many ways can you arrange zero objects?" There is exactly one way — the empty arrangement. This matches the general pattern: 1! = 1 (one arrangement of one object), and moving from n! to (n−1)! divides by n. Working backward: 1!/1 = 0! must equal 1. More practically, 0! = 1 is required for combinatorial formulas to be consistent. The combination C(n, 0) = n!/(0! · n!) must equal 1 (there is exactly one way to choose nothing from n items). If 0! = 0, this formula would be undefined, breaking every counting formula that uses it.

A critical computational skill is canceling factorials rather than expanding both. To compute 8!/6!, do not calculate each separately. Instead: 8!/6! = (8 × 7 × 6 × 5 × … × 1)/(6 × 5 × … × 1). Everything from 6 down to 1 appears in both numerator and denominator and cancels, leaving 8 × 7 = 56. This pattern is universal in combinatorics: the permutation formula P(n, r) = n!/(n−r)! always reduces to a product of exactly r consecutive integers from n downward. Recognizing and applying this cancellation transforms computations that would otherwise be intractable into one-step arithmetic.

Practice Questions 5 questions

Prerequisite Chain

Understanding Zero → The Number Zero → Counting to Five → Counting to 10 → Counting to 20 → Counting a Set of Objects Up to 20 → Cardinality: The Last Number Counted → Matching Numerals to Quantities → Subitizing Small Quantities → Addition Within 10 → Making 10 as an Addition Strategy → Addition Within 20 → Doubles and Near Doubles → Doubles Facts Within 10 → Near Doubles Facts Within 20 → Mental Math Strategies for Addition → Mental Math: Adding and Subtracting Tens → Addition Within 100 → Repeated Addition as Multiplication → Multiplication as Equal Groups → Multiplication: Arrays → Basic Multiplication Facts Through 10 → Multiplication Facts Within 100 → Division as Equal Sharing → Division as Grouping (Measurement Division) → Division: Grouping (Repeated Subtraction) Model → Division: Fair Sharing Model → Division as Equal Sharing → Division as Grouping → Basic Division Facts → Division Facts Within 100 → Multiplication and Division Fact Families → Relationship Between Multiplication and Division → Division Facts as Inverse of Multiplication → Remainders and Quotients in Division → Division Word Problems → Multi-Step Word Problems → Solving Multi-Step Word Problems → Multiplication Word Problems → Division Word Problems → Introduction to Long Division → Factors and Multiples → Prime and Composite Numbers → Equivalent Fractions → Relating Fractions and Decimals → Decimal Place Value → Integers and the Number Line → Opposites and Additive Inverses → Absolute Value → Adding Integers → Subtracting Integers → Multiplying Integers → Introduction to Exponents → Order of Operations → Integer Order of Operations → Variable Expressions → The Distributive Property → Variables and Expressions Review → Introduction to Polynomials → Adding and Subtracting Polynomials → Multiplying Polynomials → Factorial

Longest path: 62 steps · 273 total prerequisite topics

Prerequisites (1)

Leads To (2)