A factorial is a function that multiplies a number by every number below it. For example 5!= 5*4*3*2*1=120. The function is used, among other things, to find the number of way ānā objects can be arranged.
In mathematics, there are n! ways to arrange n objects in sequence. "The factorial n! gives the number of ways in which n objects can be permuted." For example:
- 2 factorial is 2! = 2 x 1 = 2
-- There are 2 different ways to arrange the numbers 1 through 2. {1,2,} and {2,1}.
- 4 factorial is 4! = 4 x 3 x 2 x 1 = 24
-- There are 24 different ways to arrange the numbers 1 through 4. {1,2,3,4}, {2,1,3,4}, {2,3,1,4}, {2,3,4,1}, {1,3,2,4}, etc.
- 6 factorial is 6! = 6 x 5 x 4 x 3 x 2 x 1 = 720
- 0 factorial is a definition: 0! = 1. There is exactly 1 way to arrange 0 objects.