HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
Counting Arrangements and Selections
  1. 1Factorials and permutations
  2. 2Combinations
  3. 3Permutation or combination?
  1. Mathematics
  2. /Counting Arrangements and Selections
  3. /Factorials and permutations

Course 22.2·Lesson 1 of 3

Factorials and permutations

When the order matters, the number of ways to fill places in a row is a product that shrinks by one each time. You use the multiplication rule and factorials, count arrangements of all the objects, count arrangements of some of them with the permutation formula, and use the rule on codes, numbers and queues.

about 25 min1 simulation1 practice question
Lesson 1 of 3Show all lessonsHide
Counting Arrangements and Selections
  1. 1Factorials and permutations
  2. 2Combinations
  3. 3Permutation or combination?

Try the code and the simulations beside the lesson.

This lesson is Additional Mathematics, unit 11 of Cambridge IGCSE Additional Mathematics 0606, outcomes 11.1 and 11.2. That course has one level, so there is no Core and Extended split here. The unit works with objects that are all different and are used once, so we never repeat an object. The Class 11 and 12 chapter on Permutations and Combinations goes further, with repeated objects and circles.

How many outfits?

A student has 333 shirts and 444 pairs of trousers. Each shirt can go with any trousers, so there are 3×4=123 \times 4 = 123×4=12 outfits. Add a choice of 222 pairs of shoes and there are 12×2=2412 \times 2 = 2412×2=24.

The multiplication rule. If one choice can be made in aaa ways, and then another in bbb ways whatever the first was, there are a×ba \times ba×b ways to make both. We use this for any number of choices made one after another.

Factorials

Five different books go on a shelf. The first place has 555 choices. The next place has 444 choices left, then 333, then 222, then 111. So there are 5×4×3×2×1=1205 \times 4 \times 3 \times 2 \times 1 = 1205×4×3×2×1=120 arrangements.

We write that product as 5!5!5!, said "five factorial". In general

n!=n×(n−1)×(n−2)×⋯×2×1.\displaystyle n! = n \times (n - 1) \times (n - 2) \times \cdots \times 2 \times 1.n!=n×(n−1)×(n−2)×⋯×2×1.
  • 1!=11! = 11!=1 and 2!=22! = 22!=2 and 3!=63! = 63!=6.
  • 4!=244! = 244!=24 and 5!=1205! = 1205!=120.
  • 6!=7206! = 7206!=720 and 7!=50407! = 50407!=5040.

Factorials grow very fast. Notice that n!=n×(n−1)!n! = n \times (n - 1)!n!=n×(n−1)!. For example 6!=6×5!6! = 6 \times 5!6!=6×5!. Put n=1n = 1n=1 in this rule: 1!=1×0!1! = 1 \times 0!1!=1×0!, so 0!=10! = 10!=1. This is the value the syllabus asks you to use. It also makes sense: there is exactly one way to arrange nothing.

Simplifying. Cancel the common part of a fraction of factorials. 8!6!=8×7=56\dfrac{8!}{6!} = 8 \times 7 = 566!8!​=8×7=56. And (n+1)!(n−1)!=(n+1)×n\dfrac{(n + 1)!}{(n - 1)!} = (n + 1) \times n(n−1)!(n+1)!​=(n+1)×n.

Permutations

Five runners race for gold, silver and bronze. The gold medal has 555 choices, the silver has 444 choices left and the bronze has 333. So there are 5×4×3=605 \times 4 \times 3 = 605×4×3=60 ways.

An ordered choice of rrr objects from nnn different objects is a permutation. We write the number of them as nPr{}^{n}P_{r}nPr​:

nPr=n(n−1)(n−2)⋯(n−r+1)=n!(n−r)!.\displaystyle {}^{n}P_{r} = n(n - 1)(n - 2)\cdots(n - r + 1) = \frac{n!}{(n - r)!}.nPr​=n(n−1)(n−2)⋯(n−r+1)=(n−r)!n!​.

There are rrr factors, starting at nnn and going down by 111. The fraction form comes from multiplying and dividing by (n−r)!(n - r)!(n−r)!. For the runners, 5P3=5!2!=60{}^{5}P_{3} = \dfrac{5!}{2!} = 605P3​=2!5!​=60.

Special cases: nP1=n{}^{n}P_{1} = nnP1​=n. And nPn=n!{}^{n}P_{n} = n!nPn​=n!, because all the objects are arranged. And nP0=1{}^{n}P_{0} = 1nP0​=1.

A grid of four rows and four columns labelled A, B, C and D. The cells are the ordered pairs of two different letters: the first letter is the row and the second letter is the column. The cells above the diagonal, AB, AC, AD, BC, BD and CD, are blue. The six cells below the diagonal, BA, CA, CB, DA, DB and DC, are orange. The cells on the diagonal are empty.

The picture lists the arrangements of 222 letters taken from A,B,C,DA, B, C, DA,B,C,D. There are 4P2=12{}^{4}P_{2} = 124P2​=12 cells, because ABABAB and BABABA are different. You will see in the next lesson what happens when the order does not matter.

Codes and numbers

  • A PIN with different digits. Four digits from 000 to 999, with no digit used twice: 10P4=10×9×8×7=5040{}^{10}P_{4} = 10 \times 9 \times 8 \times 7 = 504010P4​=10×9×8×7=5040.
  • Numbers from given digits. How many 333-digit numbers can be made from 1,2,3,4,51, 2, 3, 4, 51,2,3,4,5 with no digit repeated? Each number is an ordered choice of 333 of the 555 digits: 5P3=60{}^{5}P_{3} = 605P3​=60.
  • A condition on the last digit. How many of those are even? The last digit is 222 or 444, so it has 222 choices. The first two places are then an ordered choice of 222 from the 444 digits left: 4P2=12{}^{4}P_{2} = 124P2​=12. The total is 2×12=242 \times 12 = 242×12=24.

When a place has a condition, fill that place first. This is the most useful habit in the unit. A number cannot start with 000, so with the digits 000 to 555 you fill the first place first, using only 111 to 555.

Practise with new numbers

Try it in Python

The program prints the factorials, then counts the arrangements of 333 runners out of 555 by the formula and by listing them all.

Read it first. Then run it. Do the formula and the list agree?

1. Change n, r = 5, 3 to n, r = 6, 2. Predict the count first.

2. Print math.perm(7, 7). Which factorial is it?

Common mistakes

  • Forgetting that the choices shrink. The second place has n−1n - 1n−1 choices, not nnn.
  • Starting a number with 000. Fill the first place first, with the digit 000 excluded.
  • Mixing up n!n!n! and nPr{}^{n}P_{r}nPr​. The first uses all nnn objects. The second uses only rrr of them.
  • Writing 0!=00! = 00!=0. The value is 111.

Remember these

  • The multiplication rule: choices made one after another multiply.
  • n!=n(n−1)⋯1n! = n(n - 1)\cdots 1n!=n(n−1)⋯1, and 0!=10! = 10!=1.
  • nPr=n!(n−r)!{}^{n}P_{r} = \dfrac{n!}{(n - r)!}nPr​=(n−r)!n!​ counts ordered choices of rrr objects from nnn.
  • Fill the places with a condition first.

Check yourself

Try each one on your own first. If you are stuck, open a hint. Then check with Show the answer.

  1. Work out 9!7!\dfrac{9!}{7!}7!9!​.
  1. In how many ways can 666 different books be arranged on a shelf?
  1. Four of 777 runners will get a first, second, third and fourth place. How many results are possible?
  1. How many 333-digit numbers can be made from 1,2,3,4,5,61, 2, 3, 4, 5, 61,2,3,4,5,6 with no digit repeated, if the number must be odd?
  1. Show that nP2=n2−n{}^{n}P_{2} = n^2 - nnP2​=n2−n.

References

  • Cambridge International, IGCSE Additional Mathematics 0606 syllabus (2025, 2026 and 2027), unit 11, outcomes 11.1 and 11.2.

Enroll free in Counting Arrangements and Selections

Every lesson is open to read. Enrolling also lets you:

  • Mark lessons done and carry on where you stopped.
  • Take the tests of this lesson and its course.
  • Count the course towards the certificate for its chapter.
No payment. You can leave at any time.

Problems (3)

A sprint final has nine athletes. The first three to finish receive gold, silver and bronze, one…Easy · High School (9–10) · by StemPy Lab
A phone lock accepts a code of four digits taken from 1, 2, 3, 4, 5, 6, 7…Medium · High School (9–10) · by StemPy Lab
Seven people stand in a queue. Two of them are Asha and Ben…Hard · High School (9–10) · by StemPy Lab
Next: lesson 2Combinations
← Counting Arrangements and Selections
← PreviousCombinations →

Discussion (0)

Log in to join the discussion.

Loading…

1 Python program
5 questions to check yourself

This lesson is free to read. Enroll free to keep your place and take the tests.

Python Labs (1)

Counting with loopsPython Lab · by StemPy Lab