IB Maths AA HLTopic 1 โ Number & AlgebraPaper 1 & 2HL only~10 min read
Permutations
A permutation is a fancy word for a rearrangement โ and the key feature is that order matters. Imagine three runners crossing the finish line: gold to Aisha, silver to Ben, bronze to Cara is a different result from gold to Ben, silver to Aisha, bronze to Cara. Same three people, different order, different outcome. This note teaches you the small toolkit you need for arranging objects in a row: factorials, the nPr formula, and a few clever tricks for handling restrictions like “these two must sit together” or “those two cannot be next to each other”. Once you’ve seen each trick once, the same patterns show up in almost every exam question.
๐ What you need to know
A permutation is a rearrangement where order matters.
Factorials:n! = n ร (n โ 1) ร โฆ ร 2 ร 1. By convention, 0! = 1.
You can rearrange n different objects in n! ways.
The nPr formula = n! รท (n โ r)! gives the number of ways to arrange r objects chosen from n different ones, in order. It’s in the formula booklet.
For “two must be together“: treat them as a single block, then multiply by the number of internal arrangements.
For “two must not be together“: find the opposite (together) and subtract from the total.
For fixed positions: place the restricted objects first, then fill the remaining slots with what’s left.
What’s a permutation?
Suppose you’ve got three letters โ A, B, C โ and you want to count how many different rows you can make. Let’s just list them all: ABC, ACB, BAC, BCA, CAB, CBA. That’s six. Each one is a different permutation of the three letters. The same letters appear in each row, but the order changes โ and the order matters.
A “rearrangement” or “arrangement” means the same thing as a permutation. Watch out for the word “selection” โ that’s different. Selection just means you’re choosing some objects out of a bigger pool, and it’s not always clear whether order matters. We’ll deal with selection (combinations) in the next note.
Factorials โ the engine behind permutations
Before any of this works, you need to be comfortable with factorials. The factorial of a positive integer n, written n!, just means multiply n by every smaller positive integer down to 1.
So 5! = 5 ร 4 ร 3 ร 2 ร 1 = 120, and 7! = 5040, and 10! = 3 628 800 (numbers grow fast). And one strange convention worth memorising:
0! = 1
Why? It looks weird, but it makes the nPr formula behave properly when r = n. Just accept it for now.
Use your calculator! Every IB-approved GDC has a factorial button (usually labelled “!” or “x!”). For anything bigger than 5! or 6!, use it.
Rearranging n different objects
Here’s the cleanest result in the topic. If you have n different objects and you want to arrange them all in a row, the number of arrangements is just n!.
Why? Because of the slot-filling logic from the previous note. You have n choices for the first slot, then n โ 1 left for the second, then n โ 2 for the third, and so on, down to 1 for the last slot. Multiply: n ร (n โ 1) ร (n โ 2) ร โฆ ร 1 = n!.
Why arranging 5 different objects gives 5!
This slot-filling picture is the secret behind all permutation problems. Whenever you see “how many waysโฆ”, draw the slots, fill in how many choices each one has, and multiply. The factorial is just a shortcut name for what you’re already doing.
The nPr formula โ when you don’t use them all
What if you’ve got n different objects, but you only want to arrange some of them โ say r of them โ in a row? That’s where nPr comes in.
Permutations of r from nnPr = n!(n โ r)! (where 0 โค r โค n)
โ in the formula booklet
The formula looks intimidating but it’s just doing the slot-filling for you. Want to arrange 4 paintings out of 8 different ones in a row? You’ve got 8 choices for slot 1, 7 for slot 2, 6 for slot 3, 5 for slot 4 โ total 8 ร 7 ร 6 ร 5 = 1680. The factorial form simply says 8P4 = 8! รท 4! = 1680.
๐ค Why does the formula use (n โ r)!?
Because dividing n! by (n โ r)! is exactly the cancellation needed to leave only the first r factors. Think of 8P4: 8! = 8 ร 7 ร 6 ร 5 ร 4!, so dividing by 4! gives just 8 ร 7 ร 6 ร 5 โ the four “slot counts” you wanted. The factorial form is just a tidy way of saying “stop multiplying after r terms”.
Permutations don’t allow repeats. Once an object is placed in a slot, it can’t appear again. So nPr is for selecting different objects โ not for things like passwords where digits can repeat.
The formula and a calculator button (usually labelled nPr or “nPr”) will both give you the answer instantly. Use whichever feels faster, but be ready to show working if a Paper 1 question demands it.
Trick #1 โ when two (or more) must be together
Now we move into the techniques that exam questions love. The first scenario: you’re rearranging some objects and a couple of them have to sit next to each other.
๐งญ Recipe โ “must be together”
Glue them together. Treat the pair (or trio) as a single combined object โ call it X.
Count the arrangements of the new shorter list (which now has one fewer object).
Multiply by the internal arrangements of the glued pair. If two letters are glued, that’s 2!. If three are glued, it’s 3!.
For example, suppose you’ve got the letters PIANO (5 different letters), and you want P and I to be together (in either order). Treat PI as a single block X. Now you’re arranging X, A, N, O โ that’s 4 objects, so 4! = 24 ways. Then the block PI itself can be PI or IP โ that’s 2! = 2 ways. Multiply: 24 ร 2 = 48.
What if the order of the pair is fixed? If the question says “P must come before I” (or “in the order PI”), don’t multiply by 2! โ there’s only one way to internally arrange them.
Trick #2 โ when two cannot be together
This sounds like the opposite, and the technique is too โ but with a twist. Instead of counting “not together” directly, count the opposite (together) and subtract from the unrestricted total.
Calculate the total unrestricted arrangements โ usually n!.
Calculate the “together” count using Trick #1.
Subtract: not-together = total โ together.
๐ค Why do we count the opposite?
Because counting “not together” directly is messy โ you’d have to think about gaps and positions. The “together” version is much cleaner thanks to the gluing trick. Subtracting from the total is a classic mathematician’s move: when one thing is hard, see if its opposite is easy.
Trick #3 โ when objects must be in specific places
Sometimes the question pins certain objects to certain positions: “the first letter must be a vowel”, “the last seat must be Aisha”, “the middle digit must be even”. The fix is the same as in counting principles โ fill the restricted slots first, then arrange the rest.
๐งญ Recipe โ fixed positions
Place the restricted objects first. Multiply the number of valid choices in each restricted slot.
Arrange the remaining objects in the remaining slots โ usually a smaller factorial.
Multiply the two parts.
Worked examples
WE 1
Arranging books on a shelf
How many ways can 6 different books be arranged in a row on a shelf?
Step 1: Spot the structure โ 6 different objects, all in a rowuse n! with n = 6Step 2: Compute6! = 6 ร 5 ร 4 ร 3 ร 2 ร 1= 720720 different arrangementswhenever you arrange n different objects in a row, the answer is just n!
WE 2
Hanging paintings โ using nPr
A gallery has 8 different paintings, but only 4 spots on the main wall. How many ways can the curator choose and hang 4 of the 8 paintings, given that the order on the wall matters?
Step 1: Identify the structureselecting r = 4 out of n = 8, order matters โ use 8P4Step 2: Apply the formula8P4 = 8! / (8 โ 4)! = 8! / 4!= (8 ร 7 ร 6 ร 5 ร 4!) / 4!= 8 ร 7 ร 6 ร 5= 56 ร 30 = 16801680 ways to arrange 4 paintings out of 8slot logic gives the same: 8 ร 7 ร 6 ร 5 = 1680. The formula is just a tidy version of this.
WE 3
Two letters must be together
How many ways can the letters of the word WORLD be rearranged so that the W and the O are next to each other (in either order)?
Step 1: Glue W and O into a single block Xtreat WO as one unit โ arranging X, R, L, D = 4 objectsStep 2: Count arrangements of the new list4! = 24 arrangementsStep 3: Multiply by internal arrangements of WOblock can be WO or OW โ 2! = 2total = 24 ร 2 = 4848 arrangementsif the question said “W must come before O”, drop the 2! โ only one internal order is allowed
WE 4
Two letters must NOT be together
How many ways can the letters of TUESDAY (7 different letters) be rearranged so that the T and U are never next to each other?
Step 1: Find the unrestricted totaltotal = 7! = 5040Step 2: Find arrangements where T and U ARE togetherglue TU into one block โ 6 objects to arrange = 6!block can be TU or UT โ ร 2!together = 6! ร 2! = 720 ร 2 = 1440Step 3: Subtractnot-together = 5040 โ 1440 = 36003600 arrangementsit’s much easier to count “together” and subtract than to count “apart” directly
WE 5
Letters in specific positions
How many ways can the letters of FRIEND (6 different letters) be rearranged so that F is the first letter and D is the last letter?
Step 1: Place the restricted letters firstposition 1: F (1 choice โ fixed)position 6: D (1 choice โ fixed)Step 2: Arrange the remaining 4 letters in positions 2โ5letters left: R, I, E, N (4 different)arrangements = 4! = 24Step 3: Multiplytotal = 1 ร 24 ร 1 = 2424 arrangementswhen an object is fixed in a slot, that slot contributes a “1” to the multiplication โ handle the restrictions before the free positions
WE 6
Vowels at both ends
How many ways can the letters of MONDAY (6 different letters) be rearranged if the two vowels (O and A) must be at the two ends?
Step 1: Place the vowels at the endsvowels: O, A โ 2! = 2 ways to arrange them at positions 1 and 6(could be OโฆA or AโฆO)Step 2: Arrange the other 4 letters in the middleletters left: M, N, D, Y โ 4! = 24 ways in positions 2โ5Step 3: Multiply (AND, so multiply)total = 2 ร 24 = 4848 arrangementsalways do the restricted parts first โ vowels at ends, then the unrestricted middle
๐ก Top tips
Draw the slots first. A row of empty boxes makes restrictions visible โ and stops you from miscounting positions.
Place restricted objects before free ones. Always. The free positions take whatever is left over.
Use the “glue trick” the moment you see “together”. Treat the pair as one block, work out the smaller arrangement, then multiply by the internal order.
For “not together”, use the subtract trick. Total minus together โ much faster than trying to count “apart” directly.
Watch for “together but in a fixed order”. If “A must come before B” but they don’t have to be adjacent, that’s a different problem (and usually halves the total). If they must be adjacent in a specific order, drop the 2! multiplier.
Distinguish arrangement vs selection. If the question says “arrange”, “rearrange” or “in order”, use a permutation. If it says “choose” or “select” without saying “in order”, it might be a combination โ see the next note.
Use your GDC. The nPr button is faster than computing the factorials by hand. On Paper 2, always use it.
โ Common mistakes
Forgetting to multiply by 2! when the pair is together. The two glued objects can usually swap places โ that’s two internal arrangements, not one.
Multiplying by 2! when the order is fixed. If “A must come immediately before B”, the pair AB only has one internal order, not two.
Trying to count “not together” directly. Almost always slower and more error-prone than total โ together.
Confusing “must be together” with “must be in specific positions”. Adjacent โ pinned. Re-read the question.
Treating selections as arrangements. “Choose 3 of 8” is different from “arrange 3 of 8 in order”. The first is a combination, the second is a permutation.
Computing 0! as 0. 0! = 1, by convention. If you treat it as 0, the nPr formula gives a divide-by-zero error.
Forgetting that nPr doesn’t allow repeats. If you can repeat objects, use the multiplication rule instead โ nPr assumes distinct selections.
Permutations questions reward students who slow down. The big mistake isn’t the algebra โ it’s reading too quickly and missing whether two things must be together, or apart, or fixed in specific seats. Underline the conditions, draw the slots, and pick the right trick. Once you’ve done five or six of these, the patterns become obvious. Up next: combinations, where order suddenly stops mattering and the formulas shift slightly.
Need help with Permutations?
Get 1-on-1 help from an IB examiner who knows exactly what Paper 1 & 2 are looking for.