Gamma Function


The (complete) gamma function Gamma(n) is defined to be an extension of the factorial to complex and real number arguments. It is related to the factorial by


a slightly unfortunate notation due to Legendre which is now universally used instead of Gauss's simpler Pi(n)=n! (Gauss 1812; Edwards 2001, p. 8).

It is analytic everywhere except at z=0, -1, -2, ..., and the residue at z=-k is


There are no points z at which Gamma(z)=0.

The gamma function is implemented in the Wolfram Language as Gamma[z].

There are a number of notational conventions in common use for indication of a power of a gamma functions. While authors such as Watson (1939) use Gamma^n(z) (i.e., using a trigonometric function-like convention), it is also common to write [Gamma(z)]^n.

The gamma function can be defined as a definite integral for R[z]>0 (Euler's integral form)




The complete gamma function Gamma(x) can be generalized to the upper incomplete gamma function Gamma(a,x) and lower incomplete gamma function gamma(a,x).

Min Max
Im Powered by webMathematica

Plots of the real and imaginary parts of Gamma(z) in the complex plane are illustrated above.

Integrating equation (3) by parts for a real argument, it can be seen that


If x is an integer n=1, 2, 3, ..., then


so the gamma function reduces to the factorial for a positive integer argument.

A beautiful relationship between Gamma(z) and the Riemann zeta function zeta(z) is given by


for R[z]>1 (Havil 2003, p. 60).

The gamma function can also be defined by an infinite product form (Weierstrass form)


where gamma is the Euler-Mascheroni constant (Krantz 1999, p. 157; Havil 2003, p. 57). Taking the logarithm of both sides of (◇),




where Psi(z) is the digamma function and psi_0(z) is the polygamma function. nth derivatives are given in terms of the polygamma functions psi_n, psi_(n-1), ..., psi_0.

The minimum value x_0 of Gamma(x) for real positive x=x_0 is achieved when


This can be solved numerically to give x_0=1.46163... (OEIS A030169; Wrench 1968), which has continued fraction [1, 2, 6, 63, 135, 1, 1, 1, 1, 4, 1, 38, ...] (OEIS A030170). At x_0, Gamma(x_0) achieves the value 0.8856031944... (OEIS A030171), which has continued fraction [0, 1, 7, 1, 2, 1, 6, 1, 1, ...] (OEIS A030172).

The Euler limit form is




(Krantz 1999, p. 156).

One over the gamma function 1/Gamma(z) is an entire function and can be expressed as


where gamma is the Euler-Mascheroni constant and zeta(z) is the Riemann zeta function (Wrench 1968). An asymptotic series for 1/Gamma(z) is given by




the a_k satisfy


(Bourguet 1883, Davis 1933, Isaacson and Salzer 1943, Wrench 1968). Wrench (1968) numerically computed the coefficients for the series expansion about 0 of


The Lanczos approximation gives a series expansion for Gamma(z+1) for z>0 in terms of an arbitrary constant sigma such that R[z+sigma+1/2]>0.

The gamma function satisfies the functional equations


Additional identities are


Using (41), the gamma function Gamma(r) of a rational number r can be reduced to a constant times Gamma(frac(r)) or 1/Gamma(frac(r)). For example,


For R[z]=-1/2,


Gamma functions of argument 2z can be expressed using the Legendre duplication formula


Gamma functions of argument 3z can be expressed using a triplication formula


The general result is the Gauss multiplication formula


The gamma function is also related to the Riemann zeta function zeta(z) by


For integer n=1, 2, ..., the first few values of Gamma(n) are 1, 1, 2, 6, 24, 120, 720, 5040, 40320, 362880, ... (OEIS A000142). For half-integer arguments, Gamma(n/2) has the special form


where n!! is a double factorial. The first few values for n=1, 3, 5, ... are therefore


15sqrt(pi)/8, 105sqrt(pi)/16, ... (OEIS A001147 and A000079; Wells 1986, p. 40). In general, for n a positive integer n=1, 2, ...


Simple closed-form expressions of this type do not appear to exist for Gamma(1/n) for n a positive integer n>2. However, Borwein and Zucker (1992) give a variety of identities relating gamma functions to square roots and elliptic integral singular values k_n, i.e., elliptic moduli k_n such that


where K(k) is a complete elliptic integral of the first kind and K^'(k)=K(k^')=K(sqrt(1-k^2)) is the complementary integral. M. Trott (pers. comm.) has developed an algorithm for automatically generating hundreds of such identities.


Several of these are also given in Campbell (1966, p. 31).

A few curious identities include


of which Magnus and Oberhettinger (1949, p. 1) give only the last case and


(Magnus and Oberhettinger 1949, p. 1). Ramanujan also gave a number of fascinating identities:




(Berndt 1994).

Ramanujan gave the infinite sums




(Hardy 1923; Hardy 1924; Whipple 1926; Watson 1931; Bailey 1935; Hardy 1999, p. 7).

The following asymptotic series is occasionally useful in probability theory (e.g., the one-dimensional random walk):


(OEIS A143503 and A061549; Graham et al. 1994). This series also gives a nice asymptotic generalization of Stirling numbers of the first kind to fractional values.

It has long been known that Gamma(1/4)pi^(-1/4) is transcendental (Davis 1959), as is Gamma(1/3) (Le Lionnais 1983; Borwein and Bailey 2003, p. 138), and Chudnovsky has apparently recently proved that Gamma(1/4) is itself transcendental (Borwein and Bailey 2003, p. 138).

There exist efficient iterative algorithms for Gamma(k/24) for all integers k (Borwein and Bailey 2003, p. 137). For example, a quadratically converging iteration for Gamma(1/4)=3.6256099... (OEIS A068466) is given by defining


setting x_0=sqrt(2) and y_1=2^(1/4), and then


(Borwein and Bailey 2003, pp. 137-138).

No such iteration is known for Gamma(1/5) (Borwein and Borwein 1987; Borwein and Zucker 1992; Borwein and Bailey 2003, p. 138).

See also

Bailey's Theorem, Barnes G-Function, Binet's Fibonacci Number Formula, Bohr-Mollerup Theorem, Digamma Function, Fransén-Robinson Constant Gauss Multiplication Formula, Incomplete Gamma Function, Knar's Formula, Lambda Function, Lanczos Approximation, Legendre Duplication Formula, Log Gamma Function, Mellin's Formula, Mu Function, Nu Function, Pearson's Function, Polygamma Function, Regularized Gamma Function, Stirling's Series, Superfactorial Explore this topic in the MathWorld classroom

Related Wolfram sites,

Explore with Wolfram|Alpha


Abramowitz, M. and Stegun, I. A. (Eds.). "Gamma (Factorial) Function" and "Incomplete Gamma Function." §6.1 and 6.5 in Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables, 9th printing. New York: Dover, pp. 255-258 and 260-263, 1972.Arfken, G. "The Gamma Function (Factorial Function)." Ch. 10 in Mathematical Methods for Physicists, 3rd ed. Orlando, FL: Academic Press, pp. 339-341 and 539-572, 1985.Artin, E. The Gamma Function. New York: Holt, Rinehart, and Winston, 1964.Bailey, W. N. Generalised Hypergeometric Series. Cambridge, England: Cambridge University Press, 1935.Berndt, B. C. Ramanujan's Notebooks, Part IV. New York: Springer-Verlag, pp. 334-342, 1994.Beyer, W. H. CRC Standard Mathematical Tables, 28th ed. Boca Raton, FL: CRC Press, p. 218, 1987.Borwein, J. and Bailey, D. Mathematics by Experiment: Plausible Reasoning in the 21st Century. Wellesley, MA: A K Peters, 2003.Borwein, J. and Borwein, P. B. Pi & the AGM: A Study in Analytic Number Theory and Computational Complexity. New York: Wiley, p. 6, 1987.Borwein, J. M. and Zucker, I. J. "Fast Evaluation of the Gamma Function for Small Rational Fractions Using Complete Elliptic Integrals of the First Kind." IMA J. Numerical Analysis 12, 519-526, 1992.Bourguet, L. "Sur les intégrales Eulériennes et quelques autres fonctions uniformes." Acta Math. 2, 261-295, 1883.Campbell, R. Les intégrales eulériennes et leurs applications. Paris: Dunod, 1966.Davis, H. T. Tables of the Higher Mathematical Functions. Bloomington, IN: Principia Press, 1933.Davis, P. J. "Leonhard Euler's Integral: A Historical Profile of the Gamma Function." Amer. Math. Monthly 66, 849-869, 1959.Edwards, H. M. Riemann's Zeta Function. New York: Dover, 2001.Erdélyi, A.; Magnus, W.; Oberhettinger, F.; and Tricomi, F. G. "The Gamma Function." Ch. 1 in Higher Transcendental Functions, Vol. 1. New York: Krieger, pp. 1-55, 1981.Finch, S. R. "Euler-Mascheroni Constant." §1.5 in Mathematical Constants. Cambridge, England: Cambridge University Press, pp. 28-40, 2003.Gauss, C. F. "Disquisitiones Generales Circa Seriem Infinitam [(alphabeta)/(1·gamma)]x+[(alpha(alpha+1)beta(beta+1))/(1·2·gamma(gamma+1))]x^2 +[(alpha(alpha+1)(alpha+2)beta(beta+1)(beta+2))/(1·2·3·gamma(gamma+1)(gamma+2))]x^3+ etc. Pars Prior." Commentationes Societiones Regiae Scientiarum Gottingensis Recentiores, Vol. II. 1812. Reprinted in Gesammelte Werke, Bd. 3, pp. 123-163 and 207-229, 1866.Graham, R. L.; Knuth, D. E.; and Patashnik, O. Answer to Problem 9.60 in Concrete Mathematics: A Foundation for Computer Science, 2nd ed. Reading, MA: Addison-Wesley, 1994.Hardy, G. H. "A Chapter from Ramanujan's Note-Book." Proc. Cambridge Philos. Soc. 21, 492-503, 1923.Hardy, G. H. "Some Formulae of Ramanujan." Proc. London Math. Soc. (Records of Proceedings at Meetings) 22, xii-xiii, 1924.Hardy, G. H. Ramanujan: Twelve Lectures on Subjects Suggested by His Life and Work, 3rd ed. New York: Chelsea, 1999.Havil, J. "The Gamma Function." Ch. 6 in Gamma: Exploring Euler's Constant. Princeton, NJ: Princeton University Press, pp. 53-60, 2003.Isaacson, E. and Salzer, H. E. "Mathematical Tables--Errata: 19. J. P. L. Bourget, 'Sur les intégrales Eulériennes et quelques autres fonctions uniformes,' Acta Mathematica, v. 2, 1883, pp. 261-295.' " Math. Tab. Aids Comput. 1, 124, 1943.Koepf, W. "The Gamma Function." Ch. 1 in Hypergeometric Summation: An Algorithmic Approach to Summation and Special Function Identities. Braunschweig, Germany: Vieweg, pp. 4-10, 1998.Krantz, S. G. "The Gamma and Beta Functions." §13.1 in Handbook of Complex Variables. Boston, MA: Birkhäuser, pp. 155-158, 1999.Le Lionnais, F. Les nombres remarquables. Paris: Hermann, p. 46, 1983.Magnus, W. and Oberhettinger, F. Formulas and Theorems for the Special Functions of Mathematical Physics. New York: Chelsea, 1949.Nielsen, N. "Handbuch der Theorie der Gammafunktion." Part I in Die Gammafunktion. New York: Chelsea, 1965.Press, W. H.; Flannery, B. P.; Teukolsky, S. A.; and Vetterling, W. T. "Gamma Function, Beta Function, Factorials, Binomial Coefficients" and "Incomplete Gamma Function, Error Function, Chi-Square Probability Function, Cumulative Poisson Function." §6.1 and 6.2 in Numerical Recipes in FORTRAN: The Art of Scientific Computing, 2nd ed. Cambridge, England: Cambridge University Press, pp. 206-209 and 209-214, 1992.Sloane, N. J. A. Sequences A000079/M1129, A000142/M1675, A001147/M3002, A030169, A030170, A030171, A030172, A061549, A068466, and A143503 in "The On-Line Encyclopedia of Integer Sequences."Spanier, J. and Oldham, K. B. "The Gamma Function Gamma(x)" and "The Incomplete Gamma gamma(nu;x) and Related Functions." Chs. 43 and 45 in An Atlas of Functions. Washington, DC: Hemisphere, pp. 411-421 and 435-443, 1987.Watson, G. N. "Theorems Stated by Ramanujan (XI)." J. London Math. Soc. 6, 59-65, 1931.Watson, G. N. "Three Triple Integrals." Quart. J. Math., Oxford Ser. 2 10, 266-276, 1939.Wells, D. The Penguin Dictionary of Curious and Interesting Numbers. Middlesex, England: Penguin Books, p. 40, 1986.Whipple, F. J. W. "A Fundamental Relation between Generalised Hypergeometric Series." J. London Math. Soc. 1, 138-145, 1926.Whittaker, E. T. and Watson, G. N. A Course in Modern Analysis, 4th ed. Cambridge, England: Cambridge University Press, 1990.Wrench, J. W. Jr. "Concerning Two Series for the Gamma Function." Math. Comput. 22, 617-626, 1968.

Referenced on Wolfram|Alpha

Gamma Function

Cite this as:

Weisstein, Eric W. "Gamma Function." From MathWorld--A Wolfram Web Resource.

Subject classifications