Definition for Factorials of Natural Numbers

A factorial of some natural number , written as and read as ” factorial,” is the product of all natural numbers less than or equal to .

Definition of Factorials of Natural Numbers

If is a natural number, then

Below are the computations of the first few factorials.

Permutations of a Set of Elements

One of the most fundamental motivations for defining the factorial of a natural number is to represent the number of permutations (orderings) of objects in a sequence. For example, the five letters ABCDE can be arranged in different orderings (ABCDE, EDACB, BADCE, etc).

We will return to this example of distinct permutations of the letters ABCDE in the next section.

Definition of

The above definition does not provide for a straightforward way to reason about the value of , though needing to compute this value is not uncommon, particularly when solving problems in probability, computing combinations and permutations, or constructing power series.

Definition of

Including this definition for now provides us with an understanding of how to compute the factorial of any nonnegative integer.

Let’s return back now to the task of determining the number of ways to distinctly permute (order) the letters ABCDE. The number of ways to arrange the letters ABCDE can be thought of the number of ways to permute five elements out of a set of five, or in other words . According to the formula for permutations, this is given as follows.

This result is consistent with the results of the previous section, but raises two noteworthy points:

  • In order to compute using the factorial-based formula, we needed to use the definition . This value indeed provides the expected results when working with the permutations formula above.
  • Extending the result that we see here for , we find that evidently, for any nonnegative integer, we get .

Definition for All Other Numbers

For calculus students who are familiar with improper integrals, the factorial can be extended to other numbers (including fractional numbers, irrational numbers, and complex numbers) via an integral.

Integral Definition of the Factorial of Any Value of

Remark: Copy-paste the code \int_0^\infty x^n e^{-x} dx to compute values of this integral in Desmos. Don’t forget to add a slider for .

(In textbooks, the Gamma function is often used instead of the above definition, but I’m omitting that explanation here because there is an annoying subtle difference between the Gamma function and the factorial that in my opinion has no practical value.)

I strongly recommend trying to verify the following facts that follow from this definition.

  1. For any , (this requires integration by parts)

These two facts together are what ensure that the definition above agrees with the definition for factorials of nonnegative integers mentioned earlier in this article (why is this so?). Try verifying that the integral and factorial values agree with each other using a calculator of your choice and a value of of your choice.

Additionally, the integral definition shown in the box above provides the same values that calculators give for factorials of nonnegative integers (such as Desmos and TI calculators).

Miscellaneous remarks:

  • This integral definition does yield some unexpected results, such as the famous factorial of , which is related to . Try verifying the result below with your calculator (use the integral definition as well as built-in factorial functionality as a sanity check). It is not easy to show that this result follows from the integral definition of the factorial but nonetheless the result is true.
  • This integral does not converge for any negative integer , which in general means that is undefined for any negative integer . When graphing , one can see vertical asymptotes at all of the negative integer values of , which reflects this fact.

From the property and the integral definition of the factorial given in the box above, the values of the factorial of any negative number can be extrapolated as illustrated in the example below.

Example

Given that , show that