In
mathematics
Mathematics is an area of knowledge that includes the topics of numbers, formulas and related structures, shapes and the spaces in which they are contained, and quantities and their changes. These topics are represented in modern mathematics ...
, the gamma function (represented by , the capital letter
gamma
Gamma (uppercase , lowercase ; ''gámma'') is the third letter of the Greek alphabet. In the system of Greek numerals it has a value of 3. In Ancient Greek, the letter gamma represented a voiced velar stop . In Modern Greek, this letter re ...
from the
Greek alphabet
The Greek alphabet has been used to write the Greek language since the late 9th or early 8th century BCE. It is derived from the earlier Phoenician alphabet, and was the earliest known alphabetic script to have distinct letters for vowels as ...
) is one commonly used extension of the
factorial function
In mathematics, the factorial of a non-negative denoted is the product of all positive integers less than or equal The factorial also equals the product of n with the next smaller factorial:
\begin
n! &= n \times (n-1) \times (n-2) \t ...
to
complex number
In mathematics, a complex number is an element of a number system that extends the real numbers with a specific element denoted , called the imaginary unit and satisfying the equation i^= -1; every complex number can be expressed in the for ...
s. The gamma function is defined for all complex numbers except the non-positive integers. For every
positive integer
In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country").
Numbers used for counting are called ''cardinal n ...
,
Derived by
Daniel Bernoulli, for complex numbers with a positive real part, the gamma function is defined via a convergent
improper integral:
The gamma function then is defined as the
analytic continuation of this integral function to a
meromorphic function that is
holomorphic in the whole complex plane except zero and the negative integers, where the function has simple
poles
Poles,, ; singular masculine: ''Polak'', singular feminine: ''Polka'' or Polish people, are a West Slavic nation and ethnic group, who share a common history, culture, the Polish language and are identified with the country of Poland in Cen ...
.
The gamma function has no zeroes, so the
reciprocal gamma function is an
entire function. In fact, the gamma function corresponds to the
Mellin transform of the negative
exponential function:
Other extensions of the factorial function do exist, but the gamma function is the most popular and useful. It is a component in various probability-distribution functions, and as such it is applicable in the fields of
probability
Probability is the branch of mathematics concerning numerical descriptions of how likely an Event (probability theory), event is to occur, or how likely it is that a proposition is true. The probability of an event is a number between 0 and ...
and
statistics
Statistics (from German language, German: ''wikt:Statistik#German, Statistik'', "description of a State (polity), state, a country") is the discipline that concerns the collection, organization, analysis, interpretation, and presentation of ...
, as well as
combinatorics.
Motivation

The gamma function can be seen as a solution to the following
interpolation
In the mathematical field of numerical analysis, interpolation is a type of estimation, a method of constructing (finding) new data points based on the range of a discrete set of known data points.
In engineering and science, one often has a n ...
problem:
: "Find a
smooth curve that connects the points given by at the positive integer values for ."
A plot of the first few factorials makes clear that such a curve can be drawn, but it would be preferable to have a formula that precisely describes the curve, in which the number of operations does not depend on the size of . The simple formula for the factorial, , cannot be used directly for non-integer values of since it is only valid when is a
natural number
In mathematics, the natural numbers are those numbers used for counting (as in "there are ''six'' coins on the table") and ordering (as in "this is the ''third'' largest city in the country").
Numbers used for counting are called '' cardinal ...
(or positive integer). There are, relatively speaking, no such simple solutions for factorials; no finite combination of sums, products, powers,
exponential functions, or
logarithm
In mathematics, the logarithm is the inverse function to exponentiation. That means the logarithm of a number to the base is the exponent to which must be raised, to produce . For example, since , the ''logarithm base'' 10 of ...
s will suffice to express ; but it is possible to find a general formula for factorials using tools such as
integral
In mathematics, an integral assigns numbers to functions in a way that describes displacement, area, volume, and other concepts that arise by combining infinitesimal data. The process of finding integrals is called integration. Along with ...
s and
limits from
calculus
Calculus, originally called infinitesimal calculus or "the calculus of infinitesimals", is the mathematics, mathematical study of continuous change, in the same way that geometry is the study of shape, and algebra is the study of generalizati ...
. A good solution to this is the gamma function.
There are infinitely many continuous extensions of the factorial to non-integers: infinitely many curves can be drawn through any set of isolated points. The gamma function is the most useful solution in practice, being
analytic (except at the non-positive integers), and it can be defined in several equivalent ways. However, it is not the only analytic function which extends the factorial, as adding to it any analytic function which is zero on the positive integers, such as for an integer , will give another function with that property.
Such a function is known as a
pseudogamma function, the most famous being the
Hadamard function.

A more restrictive property than satisfying the above interpolation is to satisfy the
recurrence relation defining a translated version of the factorial function,
:
:
for any positive real number . But this would allow for multiplication by any function satisfying both for all real numbers and , such as the function . One of several ways to resolve the ambiguity comes from the
Bohr–Mollerup theorem. It states that when the condition that be
logarithmically convex In mathematics, a function ''f'' is logarithmically convex or superconvex if \circ f, the composition of the logarithm with ''f'', is itself a convex function.
Definition
Let be a convex subset of a real vector space, and let be a function tak ...
(or "super-convex,"
meaning that
is
convex) is added, it uniquely determines for positive, real inputs. From there, the gamma function can be extended to all real and complex values (except the negative integers and zero) by using the unique
analytic continuation of .
Definition
Main definition
The notation
is due to
Legendre.
If the real part of the complex number is strictly positive (
), then the
integral
In mathematics, an integral assigns numbers to functions in a way that describes displacement, area, volume, and other concepts that arise by combining infinitesimal data. The process of finding integrals is called integration. Along with ...
:
converges absolutely
In mathematics, an infinite series of numbers is said to converge absolutely (or to be absolutely convergent) if the sum of the absolute values of the summands is finite. More precisely, a real or complex series \textstyle\sum_^\infty a_n is s ...
, and is known as the Euler integral of the second kind. (Euler's integral of the first kind is the
beta function.
) Using
integration by parts, one sees that:
:

Recognizing that
as
:
We can calculate
:
Given that
and
:
for all positive integers . This can be seen as an example of
proof by induction.
The identity
can be used (or, yielding the same result,
analytic continuation can be used) to uniquely extend the integral formulation for
to a
meromorphic function defined for all complex numbers , except integers less than or equal to zero.
It is this extended version that is commonly referred to as the gamma function.
Alternative definitions
Euler's definition as an infinite product
When seeking to approximate
for a complex number
, it is effective to first compute
for some large integer
. Use that to approximate a value for
, and then use the recursion relation
backwards
times, to unwind it to an approximation for
. Furthermore, this approximation is exact in the limit as
goes to infinity.
Specifically, for a fixed integer
, it is the case that
:
If
is not an integer then it is not possible to say whether this equation is true because we have not yet (in this section) defined the factorial function for non-integers. However, we do get a unique extension of the factorial function to the non-integers by insisting that this equation continue to hold when the arbitrary integer
is replaced by an arbitrary complex number
.
:
Multiplying both sides by
gives
:
This
infinite product converges for all complex numbers
except the negative integers, which fail because trying to use the recursion relation
backwards through the value
involves a division by zero.
Similarly for the gamma function, the definition as an infinite product due to
Euler
Leonhard Euler ( , ; 15 April 170718 September 1783) was a Swiss mathematician, physicist, astronomer, geographer, logician and engineer who founded the studies of graph theory and topology and made pioneering and influential discoveries in ma ...
is valid for all complex numbers
except the non-positive integers:
:
By this construction, the gamma function is the unique function that simultaneously satisfies
,
for all complex numbers
except the non-positive integers, and
for all complex numbers
.
Weierstrass's definition
The definition for the gamma function due to
Weierstrass is also valid for all complex numbers except the non-positive integers:
:
where
is the
Euler–Mascheroni constant.
This is the
Hadamard product of
in a rewritten form. Indeed, since
is
entire of genus 1 with a simple zero at
, we have the product representation
:
where the product is over the zeros
of
. Since
has simple poles at the non-positive integers, it follows
has simple zeros at the nonpositive integers, and so the equation above becomes Weierstrass's formula with
in place of
. The derivation of the constants
and
is somewhat technical, but can be accomplished by using some identities involving the
Riemann zeta function
The Riemann zeta function or Euler–Riemann zeta function, denoted by the Greek letter (zeta), is a mathematical function of a complex variable defined as \zeta(s) = \sum_^\infty \frac = \frac + \frac + \frac + \cdots for \operatorname(s) > ...
(see
this identity, for instance). See also the
Weierstrass factorization theorem In mathematics, and particularly in the field of complex analysis, the Weierstrass factorization theorem asserts that every entire function can be represented as a (possibly infinite) product involving its zeroes. The theorem may be viewed as an e ...
.
Properties
General
Other important functional equations for the gamma function are
Euler's reflection formula
:
which implies
:
and the
Legendre duplication formula
:
Since
the gamma function can be represented as
:
Integrating by parts
times yields
:
which is equal to
:
This can be rewritten as
:
We can use this to evaluate the left-hand side of the reflection formula:
:
It can be
proved that
:
Then
:
Euler's reflection formula follows:
:
The
beta function can be represented as
:
Setting
yields
:
After the substitution
we get
:
The function
is even, hence
:
Now assume
:
Then
:
This implies
:
Since
:
the Legendre duplication formula follows:
:
The duplication formula is a special case of the
multiplication theorem (See,
Eq. 5.5.6)
:
A simple but useful property, which can be seen from the limit definition, is:
:
In particular, with , this product is
:
If the real part is an integer or a half-integer, this can be finitely expressed in
closed form:
:
First, consider the reflection formula applied to
.
:
Applying the recurrence relation to the second term, we have
:
which with simple rearrangement gives
:
Second, consider the reflection formula applied to
.
:
Formulas for other values of
for which the real part is integer or half-integer quickly follow by
induction using the recurrence relation in the positive and negative directions.
Perhaps the best-known value of the gamma function at a non-integer argument is
:
which can be found by setting
in the reflection or duplication formulas, by using the relation to the
beta function given below with
, or simply by making the substitution
in the integral definition of the gamma function, resulting in a
Gaussian integral. In general, for non-negative integer values of
we have:
:
where the
double factorial
In mathematics, the double factorial or semifactorial of a number , denoted by , is the product of all the integers from 1 up to that have the same parity (odd or even) as . That is,
:n!! = \prod_^ (n-2k) = n (n-2) (n-4) \cdots.
For even , the ...
. See
Particular values of the gamma function for calculated values.
It might be tempting to generalize the result that
by looking for a formula for other individual values
where
is rational, especially because according to
Gauss's digamma theorem
In mathematics, the digamma function is defined as the logarithmic derivative of the gamma function:
:\psi(x)=\frac\ln\big(\Gamma(x)\big)=\frac\sim\ln-\frac.
It is the first of the polygamma functions. It is strictly increasing and strict ...
, it is possible to do so for the closely related
digamma function at every rational value. However, these numbers
are not known to be expressible by themselves in terms of elementary functions. It has been proved that
is a
transcendental number and
algebraically independent of
for any integer
and each of the fractions
. In general, when computing values of the gamma function, we must settle for numerical approximations.
The derivatives of the gamma function are described in terms of the
polygamma function, :
:
For a positive integer the derivative of the gamma function can be calculated as follows:
:
where H(m) is the mth
harmonic number and is the
Euler–Mascheroni constant.
For
the
th derivative of the gamma function is:
:
(This can be derived by differentiating the integral form of the gamma function with respect to
, and using the technique of
differentiation under the integral sign.)
Using the identity
:
where
is the
Riemann zeta function
The Riemann zeta function or Euler–Riemann zeta function, denoted by the Greek letter (zeta), is a mathematical function of a complex variable defined as \zeta(s) = \sum_^\infty \frac = \frac + \frac + \frac + \cdots for \operatorname(s) > ...
, and
is a
partition of
given by
:
we have in particular the
Laurent series
In mathematics, the Laurent series of a complex function f(z) is a representation of that function as a power series which includes terms of negative degree. It may be used to express complex functions in cases where a Taylor series expansion c ...
expansion of the gamma function
:
Inequalities
When restricted to the positive real numbers, the gamma function is a strictly
logarithmically convex function In mathematics, a function (mathematics), function ''f'' is logarithmically convex or superconvex if \circ f, the function composition, composition of the logarithm with ''f'', is itself a convex function.
Definition
Let be a convex set, convex su ...
. This property may be stated in any of the following three equivalent ways:
* For any two positive real numbers
and
, and for any