Posted by
**chris** on
.

what is the factorial of a negative number?

The factorial function has singularities at the negative integers.

You can see this as follows. For integers we define:

(n+1)! = (n+1)n!

and we put 0! = 1

So, from 0! you can compute 1! and from that you can compute 2! etc. etc. So, the factorial function is now defined for all positive integers.

Using the same recursive equation you get:

n! = (n+1)!/(n+1)

And you see that substituting -1 for n is problematic :)

Now, you can define the factorial functon for all numbers, except the negative integers as follows.

n! = Integral from zero to infinity of

x^n Exp(-x)

This integral is well defined for all positive n. It satisfies the recursion equation. n doesn't have to be an integer. E.g.:

(1/2)! = 1/2 sqrt(pi)

You can now use the recursion equation to extend the definition of the factorial function to negative numbers. E.g.:

(-1/2)! = (1/2)!/(1/2) = sqrt(pi)

The factorial for a positive integer is as you understand it, ie, 4!= 1*2*3*4

0! is defined as 1

For positive numbers (not integers), we use the gamma function to extend the idea of factorials to all those numbers.

For negative numbers, whole or not, factorial, and gamma functions are undefined.

The factorial for a positive integer is as you understand it, ie, 4!= 1*2*3*4

0! is defined as 1

For positive numbers (not integers), we use the gamma function to extend the idea of factorials to all those numbers.

For negative numbers, whole or not, factorial, and gamma functions are undefined.

I need to add, using recursion, one can find factorials for negative NON Whole numbers, the result will be finite. For Negative whole numbers, ie, -4, it will yield a undefined term (divide by zero is not allowed).

I need to add, using recursion, one can find factorials for negative NON Whole numbers, the result will be finite. For Negative whole numbers, ie, -4, it will yield a undefined term (divide by zero is not allowed).

I disagree with Bob here. The gamma function is only undefined at zero and the negative numbers. It's an analytical function with singularities (poles) at the negative integers.

The integral Exp(-x)x^(n)dx from zero to infinity which defines the factorial function for positive n, is, of course, not defined for negative n. However, one can analytically continue this function to the entire complex plane.

All one needs to do is to repeatedly use the recursion relation:

(x-1)! = x!/x

If x! has been defined as an analytical function between x = 0 and x = 1, then the above recursion defines a function between -1 and 0.

Hi: Factorials are dedfined for non-integer negatives via the gamma function -- a topic beyond the scope of this post. Check out mathworld for a reasonably straight forward read on the topic. The gamma function accomodates for all complex factorials, i.e., z!, where z = a+bi for a,b in R ... excepting the negative integers whose factorials are at complex infinity.

Regards,

Rich B.