Mathematics & Logic · Games, networks & optimization

Permutations and combinations

Count possibilities without listing them. Learn when to multiply choices, when order matters and when it doesn't, and work out why a 6-from-49 lottery ticket has about a 1 in 14 million chance.

4 short lessons · about 16 minutes · 8 sources · updated November 2026

What you will learn

  • Use the multiplication rule to count the ways to make several choices in a row
  • Tell when to add counts instead of multiplying them
  • Count the arrangements of items when order matters, using factorials
  • Count selections where order doesn't matter by dividing out the orderings

Lesson 1 of 4 · 4 min

Why four small dials make 10,000 lock codes

Before you readYou own 4 shirts, 3 pairs of trousers and 2 pairs of shoes. How many different outfits of one of each can you make?

Correct.Not quite. The answer is 24.

You get 24 outfits, because each shirt pairs with every pair of trousers and each of those pairs with every pair of shoes. The lesson shows why multiplying beats listing.

Lay 4 shirts in a row. Under each one, put 3 pairs of trousers. That's 4 × 3 = 12 pairs of shirt and trousers. Now give each pair 2 choices of shoes, and you have 12 × 2 = 24 outfits.

This is the multiplication rule. If one choice can be made in some number of ways and the next in some other number, multiply them to get the ways to make both. Each extra choice multiplies the total again.

The rule counts things too big to list. A plate of 3 letters then 3 digits allows 26 × 26 × 26 × 10 × 10 × 10 = 17,576,000 plates. A 4-digit PIN allows 10 × 10 × 10 × 10 = 10,000 codes, so one more digit makes 100,000.

Check yourselfA café makes sandwiches from one of 5 breads, one of 4 fillings and one of 3 sauces. How many different sandwiches can it make?

Correct.Not quite. The answer is 60.

Each bread goes with each filling, and each of those goes with each sauce, so the multiplication rule gives 5 × 4 × 3 = 60. Adding the choices to get 12 treats the sandwich as one pick instead of three.

Now say a menu has 2 vegetarian mains and 5 meat mains, and you order one main. You have 2 + 5 = 7 choices, not 10. You make one pick from either list, so the lists add.

That's the addition principle. It works when the options can't overlap, so no dish sits in both lists. The test is the word you'd use. "A shirt and trousers" means separate choices, so you multiply. "A vegetarian main or a meat main" means one choice from pooled lists, so you add.

Real counts mix both. Choose one main from those 7 and one of 3 desserts, and you get 7 × 3 = 21 meals.

Try to recallA lunch menu has 2 soups and 5 salads. Why do you get 7 options when you order one starter, but 10 when you order one soup and one salad?

Ordering one starter is a single pick from the pooled lists, so the counts add to 7. Ordering a soup and a salad is two separate choices, so each soup pairs with each salad and the counts multiply to 10.

You can now count outfits, codes and menus without listing them. Multiply when you make one choice after another, and add when you make a single choice from separate lists.

Lessons in this topic

  1. Why four small dials make 10,000 lock codes

    Learn the multiplication rule that counts outfits, PIN codes and license plates without listing them, and when you add choices instead.

    Essentials · 4 min

  2. Why a committee has fewer options than a podium

    See how factorials count arrangements where order matters, and why you divide by them when it doesn't.

    Essentials · 4 min

  3. Working out the real odds of a lottery ticket

    Count every possible ticket in a 6-from-49 lottery and see what that number means for one ticket, any set of numbers and a bigger ball pool.

    Deeper · 4 min

  4. Counting traps and how to fix them

    Spot when a count includes the same thing more than once, from repeated letters to round tables to handshakes, and divide it out.

    Deeper · 4 min

Three quick stories from this topic

Bulgaria's repeat draw

Bulgaria's lottery drew the same six numbers in two draws in a row in 2009

The numbers 4, 15, 23, 24, 35 and 42 came up on 6 September and again on 10 September. Nobody won the first time. A record 18 people matched all six the second time.

An inquiry found nothing

Bulgaria ordered an investigation. The organisers called it a freak coincidence and pointed out the balls came out in a different order.

Why it can happen

Each draw starts fresh. The set just drawn has the same 1 in 13,983,816 chance as any other set of six.

A 9th-century formula

The formula for combinations was written down in India around 850 CE

The Jain mathematician Mahāvīra gave it in his book, the Ganita Sara Sangraha. Europe only began studying combinations seriously around the 13th century, about four hundred years later.

The same rule we use

Mahāvīra's formula multiplies the falling choices and divides by the orders of the chosen items, just as a lottery count does.

An older thread

Pingala had described combinations in India by the second century BCE, and later writers built on his work.

Ten more balls

Adding 10 balls to the UK Lotto in 2015 made its jackpot over 3 times harder to win

The draw went from 6 balls out of 49 to 6 out of 59. The number of possible sets of six jumped from 13,983,816 to 45,057,474, so one ticket's chance fell to 1 in 45,057,474.

Small change, big jump

The count multiplies a run of numbers, so raising each one a little multiplies the total a lot.

Same rule as before

The count is still 59 × 58 × 57 × 56 × 55 × 54 divided by 720, the orders of six numbers.

Sources

  • The seven bridges of Königsberg

    Turn a famous walking puzzle into points and lines, then count the bridges at each piece of land to prove the walk impossible without trying a single route.

    4 lessons · 17 min

  • Why the shortest delivery route is so hard to find

    Ask for a route that visits every place once, instead of every road once, and the easy test disappears. The number of possible tours outruns any computer, which is why real route planners settle for good enough.

    4 lessons · 22 min

  • Game theory and the prisoner's dilemma

    Game theory studies choices whose results depend on what others choose. See how two prisoners acting sensibly both end up worse off, what a Nash equilibrium is, and why repeating the game can make cooperation pay.

    4 lessons · 16 min

  • Linear versus exponential growth

    Linear growth adds the same amount at each step and exponential growth multiplies by the same factor. See why they look alike at first, how decay and compound interest follow the same rule, and where the number e comes from.

    4 lessons · 20 min

  • How calculus finds speed at a single instant

    Build a speedometer reading from average speeds over shorter and shorter intervals. See why the method never divides by zero, why a sharp corner breaks it, and how one rate predicts the next moment.

    4 lessons · 17 min

  • Percentages and why the base matters

    See why a 20% fall takes a 25% rise to undo, why 5% to 10% is both five points and a doubling, and why you can't average two percentages.

    4 lessons · 21 min

All mathematics & logic topics · Take the quiz