The Factorial
A factorial is an operation on a number that multiplies it by all the positive integers below it. More formally,
$$ n! = n \times (n-1) \times (n-2) \times ... \times 2 \times 1$$
Example$5! = 5\times4\times3\times2\times1 = 120$
$n!$ is also equal to the number of ways you can arrange $n$ objects in order. To illustrate this, let's consider five objects A, B, C, D, and E.
For the first object, we can choose between any of the five objects. This means that there are $5$ possibilities.
For the second object, we've already chosen one object to put in front, so we can choose between four objects for the second position. This means that there are now $5\times4$ possibilities.
We can continue this for the rest of the positions, showing that there are $5\times4\times3\times2\times1$ possibilities to arrange all $5$ objects. This is the definition of $5!$, and you can do a similar process for any $n$ objects to find the number of possibilities as $n!$.
Counting Principles: Permutations and Combinations
Permutations
Permutations are arrangements of objects where order matters. $nPr$ represents the number of possibilities if you take $r$ objects from a set of $n$, where order matters.
This is very similar to a factorial, however instead of going all the way down to $1$, we are multiplying $n\times(n-1)\times(n-2)\times...\times(n-r)$. So, as $(n-r)!$ multiplies the rest of the numbers down to $1$:
$nPr = n\times(n-1)\times(n-2)\times...\times(n-r)=\frac{n!}{(n-r)!}$
ExampleYou have eight plushies, and you need to arrange three of them on a shelf. How many ways are there to arrange the shelf?
Solution: This is equivalent to $8P3$. This can be calculated as $8\times7\times6=336$, or $\frac{8!}{(8-3)!}=\frac{40320}{120}=336$.
NoteThere are many notations for $nPr$, including $^n_rP$, $^nP_r$, $P^n_r$, and $P(n, r)$. They are all interchangeable, so use them according to preference.
Combinations
Combinations are selections of objects where order doesn't matter.
For example, let's say we have four tennis players: Abigail, Brennan, Corey, and Dennis. You need to select two for a match, so the possibilities are:
- Abigail and Brennan
- Abigail and Corey
- Abigail and Dennis
- Brennan and Corey
- Brennan and Dennis
- Corey and Dennis
There are six possibilities. We notate this as $4C2 = 6$.
The number of combinations of $n$ objects taken $r$ at a time is:
$nCr = \binom{n}{r} = \frac{n!}{r!(n-r)!}$