product of all integers between 1 and the integral input of the function

The factorial of a whole number , written as [1] or ,[2] is found by multiplying by all the whole numbers less than it. For example, the factorial of 4 is 24, because . Hence one can write . 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 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, choices.

The factorial function is a good example of recursion (doing things over and over), as can be written as , which can be written as and finally as . Because of this, can also be defined as ,[4] with [3]

The factorial function grows very fast. There are ways to arrange 10 items.[4]


The earliest uses of the factorial function involve counting permutations: there are   different ways of arranging   distinct objects into a sequence.[5] Factorials appear more broadly in many formulas in combinatorics, to account for different orderings of objects. For instance the binomial coefficients   count the  -element combinations (subsets of   elements) from a set with   elements, and can be computed from factorials using the formula[6]

Related sequences and functions

Several other integer sequences are similar to or related to the factorials:

Falling factorial
The notations   or   are sometimes used to represent the product of the   integers counting up to and including  , equal to  . This is also known as a falling factorial or backward factorial, and the   notation is a Pochhammer symbol.[7] Falling factorials count the number of different sequences of   distinct items that can be drawn from a universe of   items.[8] They occur as coefficients in the higher derivatives of polynomials,[9] and in the factorial moments of random variables.[10]


Factorials are not defined for negative numbers. However, the related gamma function ( ) is defined over the real and complex numbers (except for negative integers).[3]

Related pagesEdit


  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. 3.0 3.1 3.2 3.3 Weisstein, Eric W. "Factorial". mathworld.wolfram.com. Retrieved 2020-09-09.
  4. 4.0 4.1 "Factorial Function !". www.mathsisfun.com. Retrieved 2020-09-09.
  5. Conway, John H.; Guy, Richard (1998). "Factorial numbers". The Book of Numbers. Springer Science & Business Media. pp. 55–56. ISBN 978-0-387-97993-9.
  6. Graham, Knuth & Patashnik 1988, p. 156.
  7. Graham, Knuth & Patashnik 1988, pp. x, 47–48.
  8. Sagan, Bruce E. (2020). "Theorem 1.2.1". Combinatorics: the Art of Counting. Graduate Studies in Mathematics. Vol. 210. Providence, Rhode Island: American Mathematical Society. p. 5. ISBN 978-1-4704-6032-7. MR 4249619.
  9. Hardy, G. H. (1921). "Examples XLV". A Course of Pure Mathematics (3rd ed.). Cambridge University Press. p. 215.
  10. Daley, D. J.; Vere-Jones, D. (1988). "5.2: Factorial moments, cumulants, and generating function relations for discrete distributions". An Introduction to the Theory of Point Processes. Springer Series in Statistics. New York: Springer-Verlag. p. 112. ISBN 0-387-96666-8. MR 0950166.

Other websitesEdit