The Gamma Function

The factorial n! = 1\cdot 2\cdot 3\cdots n is defined only for whole numbers — you can compute 5!, but "(\tfrac12)!" looks like nonsense. The Gamma function \Gamma(s) is the answer to a daring question: is there a single smooth curve, defined for (almost) every complex number, that passes exactly through the factorials? There is, it is essentially unique, and it turns out to be one of the most important functions in analytic number theory — it is the "Gamma factor" that completes the Riemann zeta function and makes its functional equation symmetric.

Euler found it in 1729, aged 22, in a letter to Christian Goldbach. The clean modern notation \Gamma — and the slightly annoying shift by one that comes with it — is due to Legendre. That shift is the first thing to get straight, so let's meet the definition.

The definition

For \Re(s) > 0, the Gamma function is the convergent integral

\Gamma(s) = \int_0^\infty t^{s-1} e^{-t}\,dt.

The integrand t^{s-1}e^{-t} is a tug-of-war: the power t^{s-1} pulls it up as t grows, while the exponential e^{-t} crushes it back down. The exponential always wins in the end, which is why the integral converges at the top; near t = 0 it converges precisely when \Re(s) > 0.

Worked example — \Gamma(1). Put s = 1:

\Gamma(1) = \int_0^\infty e^{-t}\,dt = \big[-e^{-t}\big]_0^\infty = 0 - (-1) = 1.

So \Gamma(1) = 1. Keep that in your pocket — combined with the next property it generates every factorial.

The magic recursion

The whole point of \Gamma is a single identity, proved in one line by integration by parts. Take u = t^{s} and dv = e^{-t}\,dt in \Gamma(s+1) = \int_0^\infty t^{s}e^{-t}\,dt:

\Gamma(s+1) = \big[-t^{s}e^{-t}\big]_0^\infty + s\int_0^\infty t^{s-1}e^{-t}\,dt = 0 + s\,\Gamma(s).

The second bullet follows by climbing the ladder from \Gamma(1) = 1 = 0!: \Gamma(2) = 1\cdot\Gamma(1) = 1 = 1!, \Gamma(3) = 2\cdot\Gamma(2) = 2 = 2!, \Gamma(4) = 3\cdot\Gamma(3) = 6 = 3!, and so on. This is the source of the infamous off-by-one: \Gamma interpolates the factorials, but \Gamma(n) = (n-1)!, not n!.

Seeing it: a curve through the factorials

Below is \Gamma(s) on the positive real axis. The curve passes through the factorial values \Gamma(n) = (n-1)! — at (1,1), (2,1), (3,2), (4,6). It doesn't merely hit them: it is the unique logarithmically convex curve that does (the Bohr–Mollerup theorem), which is what makes \Gamma "the" factorial and not just "a" factorial.

Notice the dip: \Gamma has a minimum near s \approx 1.4616, where its value is about 0.8856. Between the integer pegs the curve sags below them and then climbs away steeply — factorial growth outpaces any exponential.

The landmark half-integer value

The recursion generates the integer factorials, but the real surprise is what \Gamma does between them. The cornerstone is

\Gamma\!\left(\tfrac12\right) = \sqrt{\pi}.

Worked example. By definition, \Gamma(\tfrac12) = \int_0^\infty t^{-1/2}e^{-t}\,dt. Substitute t = u^2, so dt = 2u\,du and t^{-1/2} = u^{-1}:

\Gamma\!\left(\tfrac12\right) = \int_0^\infty u^{-1} e^{-u^2}\,(2u\,du) = 2\int_0^\infty e^{-u^2}\,du = \sqrt{\pi},

using the famous Gaussian integral \int_0^\infty e^{-u^2}\,du = \tfrac{\sqrt\pi}{2}. That a stray \pi should fall out of the factorial of a half is the first sign that \Gamma reaches deep into analysis. Combined with the recursion it gives, e.g., \Gamma(\tfrac32) = \tfrac12\Gamma(\tfrac12) = \tfrac{\sqrt\pi}{2}.

Extending to the whole plane: the poles

The integral only converges for \Re(s) > 0, but the recursion lets us continue \Gamma everywhere else. Rearranged, it reads

\Gamma(s) = \frac{\Gamma(s+1)}{s}.

The right-hand side makes sense for \Re(s) > -1 (except s = 0), and defines \Gamma there. Repeating, we reach the whole plane. The price is a simple pole at every non-positive integer s = 0, -1, -2, \dots, with residue \operatorname*{Res}_{s=-n}\Gamma(s) = \dfrac{(-1)^n}{n!}. Crucially, \Gamma is never zero — so 1/\Gamma(s) is entire. Those poles, sitting at the negative integers, are exactly what will manufacture the trivial zeros of the zeta function.

The single most common Gamma mistake is writing \Gamma(n) = n!. It is \Gamma(n) = (n-1)!. The clean statement is \Gamma(n+1) = n!. So \Gamma(5) = 4! = 24, not 120. Whenever you meet a Gamma in a formula, check whether the author means the "argument" or the "factorial it equals" — the shift by one has caused more sign-and-index errors in analytic number theory than almost anything else.

You could fit a polynomial through (0,1), (1,1), (2,2), (3,6), \dots — but there are infinitely many smooth curves through any set of points, so "smooth and hits the factorials" doesn't pin down a unique function. What makes \Gamma canonical is the extra condition of log-convexity: the function \ln\Gamma(s) is convex. The Bohr–Mollerup theorem (1922) says there is exactly one function on (0,\infty) with \Gamma(1)=1, \Gamma(s+1)=s\Gamma(s), and \ln\Gamma convex — and it is Euler's. A different-looking definition (Euler's product, Weierstrass's product, or the integral) all land on the same curve.

The reflection formula — where Gamma meets sine

One more identity earns its keep constantly in this course. For non-integer s,

\Gamma(s)\,\Gamma(1-s) = \frac{\pi}{\sin(\pi s)}.

It ties \Gamma at s to its value at 1-s — precisely the reflection s \mapsto 1-s that governs the zeta functional equation. Setting s = \tfrac12 recovers \Gamma(\tfrac12)^2 = \pi/\sin(\pi/2) = \pi, i.e. \Gamma(\tfrac12) = \sqrt\pi again. And the sine's zeros at the integers are what force \Gamma's poles there — analysis fitting together like a watch.