# Factorials

Math Lair Home > Topics > Factorials

How many ways are there of arranging three objects in a row? If you try this problem by attempting to find all of the arrangements, you will find that there are six arrangements (ABC, BCA, CAB, ACB, BAC, and CBA). How about for four objects? If you work at this problem for a while, you'll find that there are 24 ways.

Notice that 6 = 1 × 2 × 3 and 24 = 1 × 2 × 3 × 4. In general, for n objects, there are 1 × 2 × 3 × ... × n different ways of arranging them. This number is called "n factorial" and is written n!. n! grows very quickly, as the following table shows:

nn!
01
11
22
36
424
5120
6720
75040
840,320
9362,880
10362,8800
1139,916,800
12479,001,600
136,227,020,800
1487,178,291,200
151,307,674,368,000

Note that 15! is already larger than one trillion! Because factorials grow so quickly, a problem that involves checking all arrangements of a number of items quickly becomes unsolvable for even thirty items (for example, the Travelling Salesman problem).

You may want to check out some numbers that are really large.

There are several uses of factorials in mathematics. For example, see my prime gaps page.