On this concept: Formula

Not sure which lesson to do first? Find your level and get a plan →

Math · Statistics & Probability · Grade 9-12

Permutation

A permutation counts ordered arrangements: choosing and ordering r items from n distinct items, $P(n,r)=\frac{n!

P(n,r)=n!(n−r)!

Quick Answer

A permutation counts ordered arrangements: choosing and ordering r items from n distinct items, P(n,r)=n!(n−r)!. Use it when the same items in a different order give a different result: race finishes, seat assignments, codes with no repeated character, officers with different titles. Fill the positions one at a time: n choices for the first, n−1 for the second, and so on for r positions. When order does not matter, as with a team or a hand of cards, use a combination instead.

Why This Matters

Permutations count arrangements far too many to list: 10 runners can fill 1st, 2nd and 3rd in 10×9×8=720 ways. Those counts become probability denominators, such as the 1720 chance of guessing the exact podium at random. Treat ordered outcomes as unordered, or the reverse, and the count is off by a factor of r!.

Intuitive Explanation

Eight runners race for gold, silver and bronze. Fill the podium one step at a time: any of the 8 can take gold, then 7 runners remain for silver, then 6 for bronze, so there are 8×7×6=336 possible podiums. The formula P(8,3)=8!5! gives the same number, because the 5! underneath cancels the tail 5×4×3×2×1 that belongs to the five runners without a medal.

Order is what makes each of those 336 a separate outcome. Ana, Ben, Cal on the podium is not the same result as Ben, Ana, Cal, since different people hold gold. Any three runners can stand on the podium in 3!=6 orders, and the permutation counts all 6. The formula also assumes no item is used twice: one runner cannot take gold and silver. When repeats are allowed, as in a 3-digit lock code, the count is 10×10×10=1000, not 10×9×8=720.

Picking 3 of the 8 runners to represent the school, with no positions, looks like the same problem but is not. Ana-Ben-Cal and Ben-Ana-Cal are the same team, so each team appears 6 times among the 336 podiums, and the number of teams is 3366=56, a combination. Titles, ranks and places make order matter; a plain group does not.

Think of it like this. A permutation is like seating friends in numbered seats. With five friends and three numbered seats, seat 1 has 5 candidates, seat 2 has 4 and seat 3 has 3. Moving two friends between seats creates a new seating, which is why order counts; on an unnumbered bench, it would be a combination.

Core idea. A permutation counts the ways to line up r chosen items from n when the order of the line matters.


When to Use

Use a permutation when you choose items and arrange them, and the positions differ: 1st, 2nd and 3rd places, a president and vice-president, a code where no digit repeats, the order of songs in a playlist. Each item is used at most once. If the chosen items form a group with no roles (a team, a committee, a hand of cards), use a combination. If items can repeat, as in a PIN, multiply n by itself r times.

Tip. Ask: Does swapping two of the chosen items create a different valid outcome?

How to Recognize It

Before using P(n,r), check three things about the choices: whether the chosen items get different places, whether any item can be used twice, and how many of the items are used.

  1. Do the chosen items fill named positions, like gold, silver and bronze or president and secretary?

    If yes, order matters and a permutation counts the ways. If the chosen items just form a group with no roles, such as a 3-person committee, use a combination.

  2. Can the same item be picked more than once, as a digit can in a PIN?

    If yes, P(n,r) undercounts; multiply n by itself once for each position, giving 104=10,000 four-digit PINs. A permutation needs each item used at most once.

  3. Are all n items being arranged, rather than only some of them?

    If yes, the count is simply the factorial n!, since P(n,n)=n!. If only r of the n items are placed, stop the countdown after r factors.

Permutation compared with Combination, Factorial, and Counting principle

Permutations, combinations, factorials and the counting principle all multiply numbers of choices, so their answers can look alike. Ask whether order matters, whether items can repeat and whether every item is used: ordered without repeats is a permutation, all items a factorial, repeats the counting principle, unordered a combination.

Permutation

Meaning
Use this when you are arranging or ranking items and the order of the chosen items matters.
Key test
Does swapping two of the chosen items create a different valid outcome?
Formula
P(n,r)=n!(n−r)!
Example
In how many ways can 5 runners finish 1st, 2nd, and 3rd?

Combination

Meaning
Counts unordered selections, so rearrangements are the same choice.
Key test
Use when only the group matters, not its order.
Formula
C(n,r)=n!r!(n−r)!
Example
Choosing a 3-person committee

Factorial

Meaning
Arranges all n items, the special case P(n,n)=n!.
Key test
Use when you arrange every item, not a subset of size r.
Formula
n!
Example
Seating all 5 guests in a row

Counting principle

Meaning
Multiplies the number of choices at each stage; with repeats allowed it gives nr, without repeats it gives P(n,r).
Key test
Use for any multi-stage choice; a permutation is its ordered, no-repeat case.
Formula
m×n
Example
A 4-digit PIN where digits can repeat

Formula & Notation

P(n,r)=n!(n−r)!
P(n,r)=n!(n−r)!=n(n−1)(n−2)⋯(n−r+1) for 0≤r≤n

How to read it: P(n,r), nPr, or Prn all denote permutations of r items from n

Worked Examples

Example 1 — Top-3 finishers

Easy

In how many ways can 5 runners finish 1st, 2nd, and 3rd?
Show the steps and the answer
  1. Decide that order matters: 1st, 2nd and 3rd are different places.

    Runner A first and B second is a different result from B first and A second.

  2. Count the choices place by place: 5 for 1st, 4 for 2nd, 3 for 3rd.

    Each runner finishes in only one place, so each later place has one fewer candidate.

  3. Multiply: 5×4×3=60.

    Every choice for 1st pairs with every choice for 2nd and 3rd.

  4. Check with the formula: P(5,3)=5!(5−3)!=1202=60.

    Dividing by 2! removes the orderings of the two runners who are not placed.

Answer: 60

Takeaway: When positions differ, multiply the shrinking number of choices for each position; that product is P(n,r).

Example 2 — Order stops mattering

Standard

From 5 players, how many ways to pick a 3-person team (no positions)?
Show the steps and the answer
  1. Decide whether order matters: a team of A, B, C is the same team as C, A, B.

    With no positions, rearranging the chosen players gives the same team.

  2. Start from the ordered count: P(5,3)=60.

    The 60 ordered lists include every team, each one several times.

  3. Find how often each team appears: 3 players can be ordered in 3!=6 ways.

    Each team shows up once for each of its 6 orderings.

  4. Divide: 606=10.

    Listing confirms it: ABC, ABD, ABE, ACD, ACE, ADE, BCD, BCE, BDE, CDE.

Answer: C(5,3)=606=10

Takeaway: If the chosen items have no positions, divide the permutation count by r! to get a combination.

Example 3 — Find the mistake: a code that allows repeats

Application

A bike lock opens with a 4-digit code, and digits may repeat (7-7-3-1 is allowed). Kim writes: "The number of codes is P(10,4)=10×9×8×7=5040." Find the mistake and correct it.
Show the steps and the answer
  1. Check the assumption behind P(10,4): each digit can be used only once.

    The factors shrink because a used digit is removed, but this lock lets a digit appear again.

  2. Count with repeats allowed: 10 choices for each of the 4 positions.

    Using a digit does not remove it, so every position still has all 10 digits available.

  3. Multiply: 10×10×10×10=10,000.

    The counting principle multiplies the choices at each position.

  4. Compare: Kim's 5040 counts only the codes with four different digits.

    The other 10,000−5040=4960 codes have at least one repeated digit.

Answer: 104=10,000 codes

Takeaway: P(n,r) is for arrangements without repeats; when items can be reused, the count is nr.

Where You'll See It

  • Setting a baseball batting order

    A coach with 9 starters can arrange the batting order in 9!=362,880 ways. Choosing and ordering 9 hitters from a roster of 13 gives P(13,9)=13!4!=259,459,200 lineups, which is why coaches use rules of thumb instead of testing every order.

  • Codes with no repeated letters

    A 6-letter code using 26 letters with none repeated has P(26,6)=26×25×24×23×22×21=165,765,600 possibilities. Allowing repeats raises that to 266=308,915,776, which is why systems that permit repeated characters are harder to guess.

Common Mistakes

  1. The slip: Using a permutation when order doesn't matter

    Instead: that overcounts by r!; use a combination instead.

  2. The slip: Allowing repeats

    Instead: P(n,r) assumes distinct items each used once; repeats need the counting principle.

  3. The slip: Confusing n and r in n!(n−r)!

    Instead: n is the pool, r is how many positions you fill.


Mini Practice

Try these on your own. Tap Reveal when you want to check.

  1. You have 7 different books. In how many ways can you arrange 4 of them in a row on a shelf?

    Hint: Count the choices for the first spot, then the second, and so on.

  2. A club of 10 members elects a president, a vice-president and a secretary. How many outcomes are possible?

    Hint: The three jobs are different, so order matters.

  3. How many 4-letter codes can be made from the letters A to F if no letter is repeated?

    Hint: There are 6 letters, and each one can be used only once.

  4. Five people sit in a row of 5 chairs. Two of them are friends who must sit next to each other. How many seatings are possible?

    Hint: Glue the two friends into one block, then remember the block can flip.

  5. You pick 4 songs from 12 and play them in a chosen order as a playlist. Permutation or combination?

    Hint: If you swap two songs, is it a different playlist?

  6. For gold, silver and bronze among 9 skaters, Ana writes "9!3!=60,480." Correct her work.

    Hint: In n!(n−r)!, which number goes in the denominator?

Want the full set?

50 practice questions for this concept — free to try, every one with a complete worked solution showing the why, not just the answer.

Frequently Asked Questions

Why is P(n,r) written with factorials when I can just multiply the first r numbers?

They are the same number written two ways. The fraction n!(n−r)!\frac{n!}{(n-r)!} is the full countdown from nn with its unwanted tail divided away: 8!5!=8×7×6×5!5!=336\frac{8!}{5!} = \frac{8 \times 7 \times 6 \times 5!}{5!} = 336. Multiplying the first rr factors is quicker by hand; the factorial form is shorter to write in formulas and is what the nPr key on a calculator computes.

Is a combination lock really a combination?

No, the name is misleading. The code 12-30-7 opens the lock but 7-30-12 does not, so order matters. Most such locks also let a number repeat, so the count is not a permutation either but the counting principle: with 40 numbers on the dial and a 3-number code, there are 403=64,00040^3 = 64{,}000 codes. If repeats were banned, there would be P(40,3)=59,280P(40, 3) = 59{,}280.

How many ways can 5 friends sit around a round table?

If only who sits next to whom matters, 4!=244! = 24, not 5!=1205! = 120. Turning everyone one seat to the left gives the same arrangement, and each seating can be turned 5 ways, so 1205=24\frac{120}{5} = 24. Another way to see it: seat one friend anywhere as a fixed reference point, then arrange the other 4 in order around the table. If the seats are numbered, all 120 count as different.

Learning Path

← Before

Factorial
Permutation

You are here

Next →

Combination
You need Factorial, since P(n,r)=n!(n−r)! is built from factorials, plus the habit of multiplying the choices at each step. Permutation adds the count of ordered arrangements of part of a set. Next, Combination divides out the orderings to count groups where order does not matter: C(n,r)=P(n,r)r!.

See Also