Skip to content
LearnMathora

Counting & combinatorics · 01 · Counting without listing · 7 min

Easy

The counting principle & factorials

How many passwords, outfits, or seating plans are possible? Listing them is hopeless — but a single idea, the fundamental counting principle, counts gigantic sets in one multiplication. It's the doorway from foundations into probability.

Build the intuition

Independent choices multiply

Make a series of independent choices and the totals multiply: 3 shirts and 2 pants give 3 × 2 = 6 outfits — every shirt pairs with every pant. This is the fundamental counting principle. Each added stage multiplies the count, which is why possibilities explode so fast: a 4-digit PIN has 10 × 10 × 10 × 10 = 10,000 options.

n1×n2××nkn_1 \times n_2 \times \cdots \times n_k

Why the count explodes

Multiplication compounds. Add one more independent choice and you don't add to the count — you multiply it. One extra PIN digit takes 10,000 to 100,000. One extra password character multiplies the options by the alphabet size. This explosive growth is exactly why long passwords are secure and why counting by hand is futile — and why we need formulas.

Factorials: counting full arrangements

How many ways to order n distinct things in a row? The first slot has n choices, the next n−1 (one's used up), then n−2, down to 1 — multiply them all. That product is n factorial, written n!. Five books arrange in 5! = 120 ways. Factorials grow ferociously: 10! is already over 3 million. They are the engine inside permutations and combinations.

n!=n×(n1)××2×1n! = n \times (n-1) \times \cdots \times 2 \times 1

See it move

InteractiveThe counting lab
9 leaves = 3^2
2
3
2 stages, each with 3 choices → 3^2 = 9 outcomes. The fundamental counting principle: independent choices multiply.

The counting principle as a tree: each stage branches into its choices, and the leaves are all the outcomes. Add a stage and watch the leaves multiply.

A worked example

Count the breakfast menus

  1. A café offers 3 mains, 4 drinks, and 2 sides. How many distinct breakfasts?

  2. Three independent choices — multiply:

    3×4×2=243 \times 4 \times 2 = 24
  3. 24 breakfasts, counted without listing one. Now add a choice of 2 pastries: 24 × 2 = 48 — one stage doubled it.

  4. That's the principle: independent choices multiply, and counts grow fast.

Out in the world

Password strength is a count

An 8-character password from 62 symbols allows 62⁸ ≈ 218 trillion combinations — the fundamental counting principle, eight stages deep. Security teams compute attacker-years directly from this count. 'Longer beats clever' is a theorem of multiplication.

Common confusion, cleared

You add the choices at each stage.

Independent stages multiply, not add. 3 shirts and 2 pants give 3 × 2 = 6 outfits, not 5. (You add when choosing one option OR another from a single stage — different situation.)

0! must be 0.

0! = 1 by convention — there's exactly one way to arrange nothing (do nothing). It keeps the permutation and combination formulas consistent, and it's genuinely the right count.

Check yourself

PracticeQuick check

  1. A meal has 4 starters, 5 mains, 3 desserts. How many three-course meals?

  2. How many ways can 4 distinct books be arranged on a shelf?

Recap

  • Fundamental counting principle: independent choices multiply.
  • Counts explode because each stage multiplies, not adds.
  • n! counts full arrangements of n distinct items; 0! = 1.

Progress saves in this browser.