Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

From what I know, the factorial function is defined as follows:

$$n! = n(n-1)(n-2) \cdots(3)(2)(1)$$

And $0! = 1$. However, this page seems to be saying that you can take the factorial of a fraction, like, for instance, $\frac{1}{2}!$, which they claim is equal to $\frac{1}{2}\sqrt\pi$ due to something called the gamma function. Moreover, they start getting the factorial of negative numbers, like $-\frac{1}{2}! = \sqrt{\pi}$

How is this possible? What is the definition of the factorial of a fraction? What about negative numbers?

I tried researching it on Wikipedia and such, but there doesn't seem to be a clear-cut answer.

share|cite|improve this question
the definition is the definition of the gamma function. – Integral May 20 '13 at 3:12
Gamma functions is sort of an extension of the concept of factorials to fractions. – Uma kant May 20 '13 at 3:12
I wrote an answer to this on a similar question. (P.S. If anyone thinks they can explain that better, please write it up as an answer!) EDIT: Did not realize that this question was from 2013. Whoops. – Akiva Weinberger Feb 23 '15 at 7:36
up vote 30 down vote accepted

The gamma function is defined by the following integral, which converges for real $s>0$: $$\Gamma(s)=\int_0^\infty t^{s-1}e^{-t}dt.$$

The function can also be extended into the complex plane, if you're familiar with that subject. I'll assume not and just let $s$ be real.

This function is like the factorial in the when $s$ is a positive integer, say $s=n$, it satisfies $\Gamma(n)=(n-1)!$. It generalizes the factorial in the sense that it is the factorial for positive integer arguments, and is also well-defined for positive rational (and even real) numbers. This is what it means to take a "rational factorial," but I would hesitate to call it that. Many functions have those two properties, and $\Gamma$ is chosen out of all of them because it is the most useful in other applications. Rather than the notation used in that article you refer to, it would be more accurate for you to say that "the gamma function takes these values for these arguments." Gamma is not a function that intends to generalize factorials; rather, generalizing factorials came along as something of an accident following the definition. Its true purpose is deeper.

As for why $\Gamma(1/2)=\sqrt{\pi}$, this comes out of an interesting property of the $\Gamma$ function: some of them are here The property you are interested in is the reflection formula: $$\Gamma(1-z)\Gamma(z)=\frac{\pi}{\sin(\pi z)}.$$ Set $z=1/2$ in the formula to get the desired identity.

If you want to learn more about the gamma function, the hard way is to learn a lot more math, in particular real and complex analysis. An easier way is to read this excellent set of notes:

share|cite|improve this answer
Both ways are rewarding, the former perhaps exponentially more so. – Gyu Eun Lee May 20 '13 at 3:27
It's interesting how our answers have exactly the same number of votes (6) at this point. I think I prefer yours. – Lee Sleek May 20 '13 at 3:40
The gamma function is also really nice amongst the family of generalizations of the factorial because it is logarithmically convex. I believe you can show that it is the unique such generalization that is logarithmically convex. – Cameron Williams May 20 '13 at 5:31
@JpMcCarthy You'd get a better and more detailed response if you posted this as a new question. The best answer I can give you right now is that, like I've mentioned in my answer, $\Gamma$ was not defined to generalize factorials. If you're still not satisfied, you can define $\Delta(x) = \Gamma(x+1)$, and then $\Delta$ will satisfy $\Delta(n) = n!$. But I don't see that there's any value to $\Delta$ over $\Gamma$, especially since the analytic continuation of $\Gamma$ is aesthetically nicer (cuts off at real part $0$ nicely). – Gyu Eun Lee Nov 13 '13 at 11:23
@neuguy: I don't get this that the "gamma function was 'not' created to generalize factorials". This shows a historical study: and it suggests they were indeed trying to generalize factorials. – mike4ty4 Feb 23 '15 at 8:00

The gamma function, shown with a Greek capital gamma $\Gamma$, is a function that extends the factorial function to all real numbers, except to the negative integers and zero, for which it is not defined. $\Gamma(x)$ is related to the factorial in that it is equal to $(x-1)!$. The function is defined as

$$\Gamma(z) = \frac{1}{z} \prod_{n=1}^\infty \frac{\left(1+\frac{1}{n}\right)^z}{1+\frac{z}{n}}$$

Simply use this to compute factorials for any number. A handy way of calculating for real fractions with even denominators is:

$$\Gamma(\tfrac12 + n) = {(2n)! \over 4^n n!} \sqrt{\pi}$$

Where n is an integer. But keep in mind that the gamma function is actually the factorial of 1 less than the number than it evaluates, so if you want $\frac{3}{2}!$ use n = 2 instead of 1.

Or, you could just put the fraction into Google Calculator, which uses the gamma function to evaluate factorials of any number.

For some more examples of the gamma function's values, see here.

(If you don't understand this, don't worry, because I don't either, and the Wikipedia article on the function seems to lack a clear-cut definition of it or how it relates to $\sqrt{\pi}$.)

share|cite|improve this answer
'If you don't understand this, don't worry because I don't either'? Perhaps the questioner wants to know more about the topic than you do? – jwg May 20 '13 at 8:19
It would be nice to know why the infinite product is equal to the factorial for natural numbers, and why $\Gamma(n) = (n-1)\Gamma(n-1)$ for all values. The formula you gave works for real fractions with denominator $2$, not any even number. If you can't say anything about how to evaluate infinite products, about where that product comes from, the poles of the Gamma function, the relationship with $\sin$ or the product expression for $\pi$, it's not clear why you bothered to try and answer. – jwg May 20 '13 at 8:24
...And that's why I voted for proximal's answer as the best. – Lee Sleek May 21 '13 at 19:08

While the answer unquestionably being Euler's $\Gamma$, I still wondered what could be a further intuitive explnation of why it is so.

I think, it is somehow more understandable for the closely related Beta function and in view of the sine-involving formula mentioned in the answer by neuguy above.

Look at $\sin(\pi z)$. Its zeros are precisely all integers. That's why it is periodic - it has to return to zero at each integer, and exactly in the same way as at any other integer.

In fact there is a formula (I think by Euler)$$\cdots(1-\frac z{-3})(1-\frac z{-2})(1-\frac z{-1})z(1-\frac z1)(1-\frac z2)(1-\frac z3)\cdots=\frac1\pi\sin(\pi z)$$reflecting precisely that.

Now suppose we want to find out what will happen if we will exclude $0$, $1$, ..., $n$ from the set of zeros. The resulting function will remain zero at all other integers, while in the interval $-1<z<n+1$ it will "bump up" to the extent we have freed it from being zero. And it turns out that the precise measure of this "bump" is given by the binomial coefficients.

Namely, let$$F_n(z):=\cdots(1-\frac z{-3})(1-\frac z{-2})(1-\frac z{-1})(1-\frac z{n+1})(1-\frac z{n+2})(1-\frac z{n+3})\cdots=\frac{\frac1\pi\sin(\pi z)}{z(1-\frac z1)(1-\frac z2)\cdots(1-\frac zn)},$$then it turns out that $F_n(z)=\binom nz$.

For example:

\begin{array}{rcl} z & F_4(z) & \textrm{(numerically)}\\ \vdots&\vdots&\vdots\\ -2 & 0 & 0. \\ -1.75 & -\frac{4096 \sqrt{2}}{168245 \pi } & -0.0109593 \\ -1.5 & -\frac{256}{3465 \pi } & -0.0235173 \\ -1.25 & -\frac{4096 \sqrt{2}}{69615 \pi } & -0.0264864 \\ -1 & 0 & 0. \\ -0.75 & \frac{4096 \sqrt{2}}{21945 \pi } & 0.0840213 \\ -0.5 & \frac{256}{315 \pi } & 0.25869 \\ -0.25 & \frac{4096 \sqrt{2}}{3315 \pi } & 0.556214 \\ 0 & 1 & 1. \\ 0.25 & \frac{4096 \sqrt{2}}{1155 \pi } & 1.59641 \\ 0.5 & \frac{256}{35 \pi } & 2.32821 \\ 0.75 & \frac{4096 \sqrt{2}}{585 \pi } & 3.15188 \\ 1 & 4 & 4. \\ 1.25 & \frac{4096 \sqrt{2}}{385 \pi } & 4.78922 \\ 1.5 & \frac{256}{15 \pi } & 5.43249 \\ 1.75 & \frac{4096 \sqrt{2}}{315 \pi } & 5.85349 \\ 2 & 6 & 6. \\ 2.25 & \frac{4096 \sqrt{2}}{315 \pi } & 5.85349 \\ 2.5 & \frac{256}{15 \pi } & 5.43249 \\ 2.75 & \frac{4096 \sqrt{2}}{385 \pi } & 4.78922 \\ 3 & 4 & 4. \\ 3.25 & \frac{4096 \sqrt{2}}{585 \pi } & 3.15188 \\ 3.5 & \frac{256}{35 \pi } & 2.32821 \\ 3.75 & \frac{4096 \sqrt{2}}{1155 \pi } & 1.59641 \\ 4 & 1 & 1. \\ 4.25 & \frac{4096 \sqrt{2}}{3315 \pi } & 0.556214 \\ 4.5 & \frac{256}{315 \pi } & 0.25869 \\ 4.75 & \frac{4096 \sqrt{2}}{21945 \pi } & 0.0840213 \\ 5 & 0 & 0. \\ 5.25 & -\frac{4096 \sqrt{2}}{69615 \pi } & -0.0264864 \\ 5.5 & -\frac{256}{3465 \pi } & -0.0235173 \\ 5.75 & -\frac{4096 \sqrt{2}}{168245 \pi } & -0.0109593 \\ 6 & 0 & 0. \\ 6.25 & \frac{4096 \sqrt{2}}{348075 \pi } & 0.00529727 \\ 6.5 & \frac{256}{15015 \pi } & 0.00542706 \\ 6.75 & \frac{4096 \sqrt{2}}{648945 \pi } & 0.0028413 \\ 7 & 0 & 0. \\ \vdots & \vdots & \vdots \end{array}

The way all this relates to factorials and $\Gamma$ should be clear - one has$$\binom nz=\frac{n!}{z!(n-z)!},\ \Gamma(x)=\frac{x!}x$$and$$\mathrm B(x,y)=\frac{\Gamma(x)\Gamma(y)}{\Gamma(x+y)}.$$In other words, $1/\Gamma(z)$ has zeros precisely at nonpositive integers, so $1/\Gamma(k-z)$ has zeros precisely at $k$, $k+1$, $k+2$, ..., so if we want to combine these for a function with zeros at all integers except $0$, $1$, ..., $n$ we should take $\frac1{\Gamma(1+z)\Gamma(n+1-z)}$ which turns out to be $\frac1{n!}\binom nz$.

share|cite|improve this answer
Nice! I've never seen this before! (By the way, I should mention that this question was asked in 2013.) – Akiva Weinberger Feb 23 '15 at 7:44
I also attempted a more basic explanation here, by the way. – Akiva Weinberger Feb 23 '15 at 7:45
When I was young, I was asking myself the same question. I started looking for some formula equating $n!$ without directly involving a product of factors so that it could possibly be generalized to fractional numbers. One day I opened a table of definite integrals and noticed a candidate: $\int_0^\infty x^ne^{-x}dx=n!$. – Yves Daoust 2 days ago

A first idea that comes to mind to define the factorial of a fractional number is interpolation: knowing the values at two successive integers, the values between these should be intermediate (looking at the "curve", you see that it is growing - very fast - but smoothly).

For instance, you could estimate that $3.1! = 3! + 0.1\times(4!-3!)=7.8$.

enter image description here

This does not look very accurate. By considering at the values of $\ln n!$, you see a trend much closer to a straight line.

enter image description here

So for better "accuracy", you can imagine that the curve is a exponential and do the interpolation on the logarithms: $\ln 3.1!=\ln 3!+0.1(\ln 4!-\ln 3!)\implies 3.1!=6.8921\cdots$

You can also increase the number of points use for interpolation, with the Lagrangian formula that computes a polynomial of a higher degree.

Anyway, this is quite empirical and does not lead to a satisfactory definition with interesting properties. Mathematicians have solved this differently: they found identities (such as the evaluation of integral $\int_0^\infty x^ne^{-x}dx=n!$) that can be shown to equal $n!$ when $n$ is an integer, and keep making sense when $n$ is not.

So they started using this as a definition of the factorial

$$n!=\int_0^\infty x^ne^{-x}dx.$$

With this formula, you get $3.1!=6.812622863\cdots$

Extension to negative values is yet a different story. If you consider the recursive definition of the factorial, $(n+1)!=(n+1)n!$, which allows to compute larger and larger values, you can reverse it as $(n-1)!=\dfrac{n!}n$. Going backwards, you get to the negatives. Then, you will have a surprise for negative integers...

share|cite|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.