The gamma function is a somewhat complicated function. This function is used in mathematical statistics. It can be thought of as a way to generalize the factorial.

### The Factorial as a Function

We learn fairly early in our mathematics career that the factorial, defined for non-negative integers *n*, is a way to describe repeated multiplication. It is denoted by the use of an exclamation mark. For example:

3! = 3 x 2 x 1 = 6 and 5! = 5 x 4 x 3 x 2 x 1 = 120.

The one exception to this definition is zero factorial, where 0! = 1. As we look at these values for the factorial, we could pair *n* with *n*!. This would give us the points (0, 1), (1, 1), (2, 2), (3, 6), (4, 24), (5, 120), (6, 720), and so on.

If we plot these points, we may ask a few questions:

- Is there a way to connect the dots and fill in the graph for more values?
- Is there a function that matches the factorial for nonnegative whole numbers, but is defined on a larger subset of the real numbers.

The answer to these questions is, “The gamma function.”

### Definition of the Gamma Function

The definition of the gamma function is very complex. It involves a complicated looking formula that looks very strange. The gamma function uses some calculus in its definition, as well as the number *e* Unlike more familiar functions such as polynomials or trigonometric functions, the gamma function is defined as the improper integral of another function.

The gamma function is denoted by a capital letter gamma from the Greek alphabet. This looks like the following: Γ( *z* )

### Features of the Gamma Function

The definition of the gamma function can be used to demonstrate a number of identities. One of the most important of these is that Γ( *z* + 1 ) = *z* Γ( *z* ).

We can use this, and the fact that Γ( 1 ) = 1 from the direct calculation:

Γ( *n* ) = (*n* - 1) Γ( *n* - 1 ) = (*n* - 1) (*n* - 2) Γ( *n* - 2 ) = (n - 1)!

The above formula establishes the connection between the factorial and the gamma function. It also gives us another reason why it makes sense to define the value of zero factorial to be equal to 1.

But we need not enter only whole numbers into the gamma function. Any complex number that is not a negative integer is in the domain of the gamma function. This means that we can extend the factorial to numbers other than nonnegative integers. Of these values, one of the most well known (and surprising) results is that Γ( 1/2 ) = √π.

Another result that is similar to the last one is that Γ( 1/2 ) = -2π. Indeed, the gamma function always produces an output of a multiple of the square root of pi when an odd multiple of 1/2 is input into the function.

### Use of the Gamma Function

The gamma function shows up in many, seemingly unrelated, fields of mathematics. In particular, the generalization of the factorial provided by the gamma function is helpful in some combinatorics and probability problems. Some probability distributions are defined directly in terms of the gamma function.

For example, the gamma distribution is stated in terms of the gamma function. This distribution can be used to model the interval of time between earthquakes. Student's t distribution, which can be used for data where we have an unknown population standard deviation, and the chi-square distribution are also defined in terms of the gamma function.