Mathwords logoMathwords

Gamma Function — Definition, Formula & Examples

The Gamma function is a continuous extension of the factorial to real and complex numbers, so that for every positive integer nn, Γ(n)=(n1)!\Gamma(n) = (n-1)!. It is defined by an improper integral that converges for all positive real numbers and can be analytically continued to most of the complex plane.

For Re(z)>0\operatorname{Re}(z) > 0, the Gamma function is defined by the convergent improper integral Γ(z)=0tz1etdt\Gamma(z) = \int_0^{\infty} t^{\,z-1} e^{-t}\, dt. It satisfies the functional equation Γ(z+1)=zΓ(z)\Gamma(z+1) = z\,\Gamma(z) and has simple poles at z=0,1,2,z = 0, -1, -2, \ldots with no zeros.

Key Formula

Γ(z)=0tz1etdt,Re(z)>0\Gamma(z) = \int_0^{\infty} t^{\,z-1}\, e^{-t}\, dt, \quad \operatorname{Re}(z) > 0
Where:
  • zz = A complex number with positive real part (or any complex number except 0 and negative integers, via analytic continuation)
  • tt = The integration variable, ranging from 0 to infinity

How It Works

The Gamma function lets you compute "factorials" of non-integer values. To evaluate Γ(z)\Gamma(z) for a positive real number zz, you set up the integral 0tz1etdt\int_0^{\infty} t^{\,z-1} e^{-t}\, dt and evaluate it, often using the recursive property Γ(z+1)=zΓ(z)\Gamma(z+1) = z\,\Gamma(z) to reduce to a known value. For positive integers this reproduces the factorial: Γ(5)=4!=24\Gamma(5) = 4! = 24. A famous special value is Γ(12)=π\Gamma(\tfrac{1}{2}) = \sqrt{\pi}, which connects the function to Gaussian integrals and probability distributions.

Worked Example

Problem: Compute Γ ⁣(72)\Gamma\!\left(\tfrac{7}{2}\right).
Step 1: Apply the functional equation Γ(z+1)=zΓ(z)\Gamma(z+1) = z\,\Gamma(z) repeatedly to reduce the argument toward a known value.
Γ ⁣(72)=52Γ ⁣(52)\Gamma\!\left(\tfrac{7}{2}\right) = \tfrac{5}{2}\,\Gamma\!\left(\tfrac{5}{2}\right)
Step 2: Continue reducing.
Γ ⁣(52)=32Γ ⁣(32),Γ ⁣(32)=12Γ ⁣(12)\Gamma\!\left(\tfrac{5}{2}\right) = \tfrac{3}{2}\,\Gamma\!\left(\tfrac{3}{2}\right), \qquad \Gamma\!\left(\tfrac{3}{2}\right) = \tfrac{1}{2}\,\Gamma\!\left(\tfrac{1}{2}\right)
Step 3: Use the known value Γ(12)=π\Gamma(\tfrac{1}{2}) = \sqrt{\pi} and multiply everything together.
Γ ⁣(72)=523212π=158π\Gamma\!\left(\tfrac{7}{2}\right) = \tfrac{5}{2} \cdot \tfrac{3}{2} \cdot \tfrac{1}{2} \cdot \sqrt{\pi} = \tfrac{15}{8}\,\sqrt{\pi}
Answer: Γ ⁣(72)=15π83.3234\Gamma\!\left(\tfrac{7}{2}\right) = \dfrac{15\sqrt{\pi}}{8} \approx 3.3234

Another Example

Problem: Show that Γ(4)=3!=6\Gamma(4) = 3! = 6 using the integral definition.
Step 1: Write the defining integral with z=4z = 4.
Γ(4)=0t3etdt\Gamma(4) = \int_0^{\infty} t^{3}\, e^{-t}\, dt
Step 2: Apply repeated integration by parts (or use the known general result for integer arguments).
0t3etdt=3!=6\int_0^{\infty} t^{3}\, e^{-t}\, dt = 3! = 6
Step 3: Alternatively, use the functional equation three times from Γ(1)=1\Gamma(1) = 1.
Γ(4)=3Γ(3)=32Γ(2)=321Γ(1)=6\Gamma(4) = 3 \cdot \Gamma(3) = 3 \cdot 2 \cdot \Gamma(2) = 3 \cdot 2 \cdot 1 \cdot \Gamma(1) = 6
Answer: Γ(4)=6\Gamma(4) = 6, confirming Γ(n)=(n1)!\Gamma(n) = (n-1)! for positive integers.

Visualization

Why It Matters

The Gamma function appears throughout advanced calculus, probability, and physics. In statistics, the Gamma and Beta distributions are defined directly in terms of Γ\Gamma, and the normalization constant of the Gaussian distribution involves Γ(12)=π\Gamma(\tfrac{1}{2}) = \sqrt{\pi}. Courses in complex analysis, mathematical physics, and combinatorics all rely on its properties.

Common Mistakes

Mistake: Writing Γ(n)=n!\Gamma(n) = n! instead of Γ(n)=(n1)!\Gamma(n) = (n-1)!.
Correction: The argument is shifted by one. For example, Γ(5)=4!=24\Gamma(5) = 4! = 24, not 5!=1205! = 120. Always remember Γ(1)=0!=1\Gamma(1) = 0! = 1.
Mistake: Trying to evaluate Γ(0)\Gamma(0) or Γ(2)\Gamma(-2) as a finite number.
Correction: The Gamma function has poles (is undefined) at z=0,1,2,z = 0, -1, -2, \ldots. The functional equation Γ(z)=Γ(z+1)/z\Gamma(z) = \Gamma(z+1)/z shows division by zero at these points.