# Factorial

Factorial of a number n is the product of all positive numbers less than equal to n. For example, for the number $3$ the factorial of $3$ will be $3 \times 2 \times \times 1$. The factorial of a number has intensive use in permutations, combinations and probability. The factorial is represented by an exclamation mark $(!)$. Factorials also find their use in number theory, approximations, statistics. There are various functions based on factorials such as double factorial, multifactorials, hyperfactorials and so on. Gamma function is an important concept based on factorial.

## Definition

Factorial of a number $n$ can be defined as product of all positive numbers less than or equal to $n$. It the multiplying sequence of numbers in a descending order till $1$. It is defined by the symbol of exclamation $(!)$.

$1! = 1$

$2! = 2 \times 1$

$3! = 3 \times 2 \times 1$

$4! = 4 \times 3 \times 2 \times 1$
...
$n!$ = $n \times (n - 1) \times (n - 2) ... \times 2 \times 1$

## Formula

To get the factorial of a number n the given formula is used,
$n! = n \times (n-1) \times (n-2)... \times 2 \times 1$For a number n, the factorial of n can be written as,

$n! = n \times (n-1)!$

$n! = n \times (n-1) \times (n-2)!$

For example, $\frac{45!}{43!}$ = $\frac{43! \times 44 \times 45}{43!}$ = $44 \times 45 = 1980$
Factorial of $0$ is $1$, that is, $0!$ = $1$.

## Applications

The factorial find its use in following mathematical concepts:

1) Recursion: In recursive definition of a number, a number can be expressed in an expression containing the number only.
$n! = n \times (n - 1) \times (n - 2) \times (n - 3) .. (n-(n - 2)) \times (n - (n - 1))$

2)
Permutations: Arrangement of r things out of n things when order is important.
$P_{r}^{n}$ = $\frac{n!}{(n-r)!}$

3)
Combinations: Arrangement of r things out of n things when order is not important.
$C_{r}^{n}$ = $\frac{n!}{(n-r)!r!}$

4) Probability Distributions: There are various probability distributions like binomial distribution which include the use of factorial. To find                 probability of an event, concept of permutations and combinations is used a lot.

5) Number Theory: Factorials find their use in number theory and approximations.

## Factorial Like Product and Functions

Double Factorials (!!):

For an odd number, the product of all positive odd numbers less than the number n gives the double factorial and for an even number he product of all positive even numbers less than the number n gives the double factorial
If n is odd,

$n!! = n \times (n - 2) \times (n - 4) ... \times 3 \times 1$

If $n$ is even.

$n!! = n \times (n - 2) \times (n - 4) ... \times 4 \times 2$
Multifactorials:

A factorial of the form n!! or n!!! is known as multifactorial. The form of multifactorial is $n!^{(k)}$.

$n!^{(k)} = 1$, if $0 \leq n < k$

$n!^{(k)} = n(n - k)!^{(k)}$, if $n \geq k$