The factorial of a number

Let's take a positive integer, for example 5, and let's do the following multiplication:

54321=120

That is, the product of all the positive integers that are less than 5.

The result is called factorial of five and it is indicated by an exclamation mark next to the number five: 5! and it is read "factorial of five".

5!=54321=120

Example

Other examples would be:

  • Factorial of three: 3!=321=6
  • Factorial of eight: 8!=87654321=40320
  • Factorial of four: 4!=4321=24

All scientific calculators have a key that allows us to do this calculation. It is usually indicated with an x!. Thus, if we want to calculate the factorial of a number, we must first write the number in the calculator and then press the key x!.

When we are dealing with big numbers, the factorial expression is long and it is possible to cut it short by means of suspension points.

Example

For example,: 8!=87654321 can also be written as: 8!=8721

Example

To write, for example, 54! it is enough to write a few numbers at the beginning and others at the end, separated by suspension points: 54!=545352321

We are now ready to give the general definition of a factorial of a number. The factorial of a positive integer n is defined as: n!=n(n1)(n2)21

Logically 1!=1. It does not seem that logical that 0!=1, but this is adopted as a convention. So, for the factorial calculation it is important to remember that 1!=1 and 0!=1.

It is easy to observe, using a calculator, that the factorial of a number grows in an almost exponential way; in other words, it grows very quickly.

10!=3628800

15!=1307674368000

20!=2432902008176640000

Therefore, it can be difficult to clear bothersome calculations when operating with factorials.

A property of factorials used to simplify fractions is: n!=n(n1)!

Example

For example, in the factorial of 8

8!=87654321

We can associate the factors as follows: 8(7654321)

the group in brackets is precisely 7!. So that we can write down: 8!=8(7654321)=87!

Example

7!=76!

11!=11109!

x!=x(x1)(x2)(x3)!