# Factorial

The factorial of a whole number ${\displaystyle n}$, written as ${\displaystyle n!}$[1] or ${\displaystyle n}$,[2] is found by multiplying ${\displaystyle n}$ by all the whole numbers less than it. For example, the factorial of 4 is 24, because ${\displaystyle 4\times 3\times 2\times 1=24}$. Hence one can write ${\displaystyle 4!=24}$. For some technical reasons, 0! is equal to 1.[3]

Factorials can be used to find out how many possible ways there are to arrange ${\displaystyle n}$ objects.[3]

For example, if there are 3 letters (A, B, and C), they can be arranged as ABC, ACB, BAC, BCA, CAB, and CBA. That is be 6 choices because A can be put in 3 different places, B has 2 choices left after A is placed, and C has only one choice left after A and B are placed. In other words, ${\displaystyle 3\times 2\times 1=6}$ choices.

The factorial function is a good example of recursion (doing things over and over), as ${\displaystyle 3!}$ can be written as ${\displaystyle 3\times 2!}$, which can be written as ${\displaystyle 3\times 2\times 1!}$ and finally as ${\displaystyle 3\times 2\times 1\times 0!}$. Because of this, ${\displaystyle n!}$ can also be defined as ${\displaystyle n\times (n-1)!}$,[4] with ${\displaystyle 0!=1}$[3]

The factorial function grows very fast. There are ${\displaystyle 10!=3,628,800}$ ways to arrange 10 items.[4]

## Notes

Factorials are not defined for negative numbers. However, the related gamma function (${\displaystyle \Gamma (x)}$) is defined over the real and complex numbers (except for negative integers).[3]

## References

1. "Compendium of Mathematical Symbols". Math Vault. 2020-03-01. Retrieved 2020-09-09.
2. Aggarwal, M.L. (2021). "8. Permutations and Combinations". Understanding ISC Mathematics Class XI. Vol. I. Industrial Area, Trilokpur Road, Kala Amb-173030, Distt. Simour (H.P.): Arya Publications (Avichal Publishing Company). p. A-400. ISBN 978-81-7855-743-4.{{cite book}}: CS1 maint: location (link)
3. Weisstein, Eric W. "Factorial". mathworld.wolfram.com. Retrieved 2020-09-09.
4. "Factorial Function !". www.mathsisfun.com. Retrieved 2020-09-09.