StatlectThe Digital Textbook

# Factorial

The factorial of a natural number is the product of all natural numbers smaller than or equal to that natural number. Factorials are often found in probability theory and statistics, because they are used to count the number of possible ways of ordering a set of objects.

## Definition

The following is a formal definition:

Definition Let . The factorial of , denoted by , is:

The expression is read " factorial".

This definition is often extended also to the number 0, by using the following convention:

## Examples

As an example, the factorial of 6 is:

This is equal to the number of possible ways of ordering 6 objects, from first to last.

It is also frequent to encounter ratios of factorials, which can be computed by simplifying the common terms. For example:

## Generalization

The concept of factorial can also be extended to non-integer numbers, using the Gamma function.

## More details

An in-depth explanation of factorials can be found in the lecture entitled Permutations.