The Gamma function or the Factorial function is just what its name says. An extension of the factorial to real numbers. Thust the basic property that we would require from this function is that it match with the factorial for positive integers. By some strange convention the gamma function(I'll use g here instead of gamma) is defined so that g(n)=(n-1)! . The second major property that we expect from a factorial is a recursion relation of the kind (n+1)! = (n+1)*n!. Because of the above convention the gamma function must satisfy g(x+1)=xg(x)

There are a number of ways of defining the gamma function, all equivalent though. The standard modern definition is to define it as
g(x) = integral from 0 to inf (e-t tx-1)
This improper integral converges for x>0.
Integrating this by parts, its easy to show that g(x) satisifies the above recursion relation. Then since its obvious that g(1)=1, the recursion relation allows us to show that g(n)=(n-1)! for integer n.
An interesting property that g has is that
g(1/2) = sqrt(pi)

The initial definition of g by Euler was in the form of an infinite product,but that is not very useful except perhaps for proving the relation

Various substitutions into the above integral yield different forms of the definition. For negative values of x the above improper integral does not converge, so we need to look at an analytic continuation. The easiest way to define this is using the recursion relation. Since we have g(x-1) = (g(x))/x-1 we can use the values of g in (0,1) for the values of g in (-1,0). This process may now be extended indefinitely. For negative integers and 0 it is true that
lim(x->-n) 1/g(x) = 0.

The gamma function is useful for evaluating various definite integrals involving exponents and is related to the beta function by means of