Math foundations
Permutations: Order Matters When You Count Arrangements
The idea
A permutation counts how many ways you can fill ordered slots from a pool. First place, second place, and third place are different outcomes even when the same people appear. That is the difference between ranking finalists and merely naming who made the cut.
Use permutations when sequence changes the outcome: podium order, seat assignments, password digit order, or A/B variant sequences shown in a fixed order. If you only care who is on the team and not who spoke first, you need combinations instead.
P(n,r) counts ordered arrangements of r distinct picks from n items.
Example: ordered arrangements with P(n,r)
Pick r distinct positions from n candidates. First slot, second slot, and third slot are different outcomes even when the same people appear. That is what order means.
P(n,r)
120
n!
720
(n − r)!
6
Candidate pool (n = 6)
Order matters: same letters, different permutations
A first
ABC
B first
BAC
Both use the same pool, but each ordering counts separately toward P(n,r).
One sample ranking: top 3 in order (slots matter)
#1
#2
#3
Swap two slots and you get a different permutation. ABC is not the same as BAC.
Formula building blocks: n! divided by (n − r)!
P(6,3) = 120 ordered arrangements. Pick 3 distinct slots from 6 candidates where position 1 is not the same as position 2. Swapping two picks counts as a different outcome. Same 3 picks in a different order count separately. P(6,3) = 120 is 6x larger than choosing the same set without caring about order.
Building blocks
Factorial. n! is the product 1 x 2 x 3 x ... x n. It counts ways to line up all n items when every position matters.
Partial lineup. P(n,r) fills only the first r slots. You multiply descending choices: n, then n−1, then n−2, until r picks are placed.
Full lineup. When r = n, every item gets a seat. P(n,n) = n!, the number of complete orderings.
The math
Permutation formula
n! counts all orderings of n items. Dividing by (n − r)! removes the unused tail positions you are not filling.
Factorial
5! = 120. Factorials grow fast. Ten items already have more than three million orderings.
Complete permutations
Ranking every candidate with no ties is a full permutation. There is exactly one ordering for zero items (1 way) by convention.
Versus combinations
The same three people in a different sequence are different permutations but one combination. Combinations divide out the r! orderings of each pick set.
Where teams get stuck
Treating a ranked shortlist like an unordered team. Counting seat assignments without caring about order, or the reverse. Forgetting that repeated digits in a PIN are a different problem (multiset permutations). Using n! when only the top r of n matter.
A quick check: if swapping two picks changes the outcome, use permutations. If swapping does not change the outcome, drop to combinations.
A simple application
Ranking top candidates for interviews, assigning numbered seats at an event, or counting distinct A/B/C test sequences all need ordered counts. Product teams often undercount variant orderings in onboarding flows. Getting P(n,r) right prevents surprise explosion in configuration or personalization options.