Factorials

Definitionfactorialcolor50pix

A factorial is the result of multiplying a positive integer by every positive integer less than it.  For example, 4 factorial (written 4!) is

4! = 4 · 3 · 2 · 1 = 24

Other examples:

5! = 5 · 4 · 3 · 2 · 1 = 120
8! = 8 · 7 · 6 · 5 · 4 · 3 · 2 · 1 = 40,320
12! = 12 · 11 · 10 · 9 · 8 · 7 · 6 · 5 · 4 · 3 · 2 · 1= 479,001,600
17! = 17 · 16 · 15 · 14 · 13 · 12 · 11 · 10 · 9 · 8 · 7 · 6 · 5 · 4 · 3 · 2 · 1= 355,687,428,096,000

Whew! As you can see, factorials get very large very fast.

That last number is 355 trillion, 687 billion, 428 million, and 96 thousand. And that’s just the 17th factorial.

They grow even faster than exponentially. Think what 100! would be!

Uses

Factorials are valuable in figuring permutations, combinations, and probability. For example, the formula used to calculate the number of combinations of 4 things taken 2 at a time is:

\(\begin{align}\frac{4!}{(4-2)!2!}\end{align}\)

Notice that this is equal to:

\(\begin{align}\frac{4 \times 3 \times 2 \times 1}{(2 \times 1) \times 2 \times 1} = 2 \times 3\end{align}\)

which is equal to 6. Notice that the numbers in the denominator of this fraction cancel out with the numbers in the numerator, leaving just 2 and 3.

0 Factorial

So what would happen if we wanted the number of combinations of 4 things taken 4 at a time? Then the formula would be:

\(\begin{align}\frac{4!}{(4-4)!4!} = \frac{4!}{0!4!}\end{align}\)

But what is 0!? Well, since we know that there is only 1 combination of 4 things taken 4 at a time, then 0! is best defined as being equal to 1. So, it’s understood that

0! = 1

Factorials are Huge

Factorials are also interesting in other ways. For example, how would you answer this question:

How many zeroes are at the end of 50!?

Obviously, 50! is much too large a number to calculate, so you have to answer the question without actually doing the calculation.  Here’s how to do it:

A zero occurs every time we multiply by 10, which happens whenever a 5 and a 2 are multiplied.  Therefore, 5! has one zero at the end, and 10! has two. In fact, every time we increase the factorial by 10 we add two more zeroes to the end. So,

20! has 4 zeroes
30! has 7. Seven? Why 7?

Because 30! includes 25 as a factor, and 25 has two 5’s in its factorization, so that adds one more zero than you would expect. And so,

40! has 9 zeroes
50! has 12,

because 50 is 2 times 25, so 50 itself adds 2 more zeroes. So the answer to the question,

How many zeroes are at the end of 50!?

is 12.