The Math Forum

Ask Dr. Math - Questions and Answers from our Archives
Associated Topics || Dr. Math Home || Search Dr. Math

x Factorial and the Gamma Function

Date: 05/29/98 at 18:41:32
From: Ms. Curtis Basham's Math Class
Subject: y=x!

Our class was running a warm-up where the teacher forgot the function 
cards, and we were making up our own functions when Nick Gilbertson 
stumped the class. We were giving him values for x and he gave us 
values back. Nick got perplexed when we gave him zero and negative 
integers. We eventually discovered that his function was:

    y = x! 

Our teacher was so excited, and we guessed at what might be going on 
when x = 0, x = -1, and so on. Using calculators, we received error 
messages for negative integers but not for zero. Using the computer we 
graphed y = x! and saw its unique graph.  

Our questions: What is going on at x = -1, -2, -3, ... ? What is the 
rule for factorial when x = 0? Zero times anything is zero, so why is  
0! not zero? How do you calculate 0.5! rather than read it off a 
graph? What about when x = -3.5?


Ms. Curtis Basham's 8th grade class

Date: 05/30/98 at 15:48:49
From: Doctor Pete
Subject: Re: y=x!


I'm really glad you asked this question. Clearly, you're all familiar 
with the factorial function, y = F[x] = x!, which is defined for 
positive integers. What I'll present to you is something very, very 
few people ever learn or understand, but I think it is truly 

The usual definition of the factorial function is:

   x! = x(x-1)! = x(x-1)(x-2)...(2)(1)

But, as you noticed, this doesn't make sense when x = 0. You may be 
inclined to say 0! = 0, based on the above definition. However, you 
simply can't use this definition to make any meaning of 0!. Rather, 
you need another way to define x!, one that isn't limited to positive 

To get around this problem, mathematicians introduce a new function, 
which is called the gamma function. It's written with the capital 
Greek letter gamma, but since I can't type Greek letters in e-mail, 
I'll use the letter G. It is defined for every number except the 
negative integers, and it also satisfies these properties:

   (A) G[1] = 1
   (B) G[x+1] = x * G[x],  for any number x
   (C) G[x] = (x-1)! ,     when x is a positive integer
   (D) G[1/2] = Sqrt[Pi],  that is, G[1/2] is the square root of Pi.

Now, I haven't really said what G[x] is in terms of x. In order for me 
to describe G[x] as a function of x, I would have to discuss calculus, 
in particular, things called improper integrals. You'll probably learn 
about these in senior high school mathematics courses. But the basic 
idea behind the gamma function is this: We want a function which 
generalizes the factorial function, so that property (B) is satisfied 
for as many numbers x as possible. So in particular, we have:

   (1/2)! = G[3/2] = (1/2) * G[1/2] = Sqrt[Pi]/2

We also want G to be "smooth," that is, if you were to graph G[x] as a 
function of x, you would find that G is a smooth line that passes 
through the points (x, (x-1)!) for every positive integer x. One can 
prove that G is the only such function that does this; that is, it is 
the unique generalization of the factorial function with these 

Finally, there is an easy way to "see" why 0! = 1.  Consider:

   (n+k)! / n! = (n+k)(n+k-1)(n+k-2)...(n+2)(n+1)

Then let n = 0:

   k! / 0! = (k)(k-1)(k-2)...(2)(1) = k!

It follows that for this to be true, 0! = 1.

---Note to the Teacher:---


I'm really glad your students are learning about the factorial 
function. It is an excellent introduction to arithmetical functions, 
concepts like domain, empty sums (which have natural meaning as 0), 
and empty products (which, contrary to many people's intuition, is 
actually 1, the multiplicative identity). Unfortunately, while a 
discussion of the gamma function is beyond the scope of an 8th grade 
class, it is nevertheless fascinating and stimulating to show the 
means by which functions can be often be generalized to cover a larger 
domain, and further this generalization can be made unique - this is 
analytic continuation. In particular:

   G[z] = Integral[t^(z-1) Exp[-t] dt, {t, 0, Infinity}]

is defined for all complex number z with Re[z] > 0, and from using the 
relation G[z] = G[z+1]/z, this definition can be extended into the 
left half-plane, except when z = 0, -1, -2, ... .  Alternatively, 
there are definitions of G using infinite products, limits, and 
identities involving trigonometric functions.

As calculators become more sophisticated and available to younger 
minds, students will be introduced to strange and new concepts at 
earlier and earlier ages. We'll have a lot of explaining to do!

-Doctor Pete,  The Math Forum
Check out our web site!   
Associated Topics:
High School Functions
High School Number Theory
Middle School Factorials

Search the Dr. Math Library:

Find items containing (put spaces between keywords):
Click only once for faster results:

[ Choose "whole words" when searching for a word like age.]

all keywords, in any order at least one, that exact phrase
parts of words whole words

Submit your own question to Dr. Math

[Privacy Policy] [Terms of Use]

Math Forum Home || Math Library || Quick Reference || Math Forum Search

Ask Dr. MathTM
© 1994- The Math Forum at NCTM. All rights reserved.