While moving my laptop the other day, I ended up mashing the keyboard a little, and by pure chance managed to do a google search for i!.

Curiously, Google's calculator dutifully informed me that $i!$ was, in fact, $0.498015668 - 0.154949828i$.

Why is this?

I know what a factorial is, so what does it actually mean to take the factorial of a complex number? Also, are those parts of the complex answer rational or irrational? Do complex factorials give rise to any interesting geometric shapes/curves on the complex plane?

Michael Hardy
  • 1
  • 30
  • 276
  • 565
  • 783
  • 6
  • 6
  • 16
    Google "Gamma Function" – Pedro Sep 25 '12 at 12:39
  • 1
    This should give you a jumping off point: http://www.wolframalpha.com/input/?i=i%21 – Austin Mohr Sep 25 '12 at 12:40
  • 2
    Strictly speaking, under the usual definition the factorial is only defined for natural arguments, so you will have to use a generalized definition for $i!$. – akkkk Sep 25 '12 at 12:43
  • 9
    $\Gamma(i+1)$ of course. – i. m. soloveichik Sep 25 '12 at 12:44
  • 2
    I changed the "number theory" tag to "complex analysis". – Michael Hardy Sep 25 '12 at 15:14
  • If you assume that $(N+t)!\approx N!N^t$, where $n$ is much larger than $t$; and if you assume that $(1+\epsilon)^t\approx1+t\epsilon$, where $\epsilon\approx0$ and $t$ is relatively small (these can be formalized, or rewritten without the $\approx$ sign, but I don't feel like it), then you can use these to calculate $i!$. (In particular, you assume that they're still true even when $t$ isn't an integer or even real.) – Akiva Weinberger Feb 24 '15 at 05:01
  • (About that second approximate-equality: $1.00001^5\approx1.00005$, for example. Check this with a calculator.) – Akiva Weinberger Feb 24 '15 at 05:02

3 Answers3


It is sort of an abuse of what is meant by factorial. The usual definition of $$n! = \prod_{k=1}^n k$$ obviously cannot apply because you can sit and count integers until the end of time and beyond and you'll never find $i$.

However, we can generalise what we mean by factorial by using a property of the gamma function, which is defined to be $$\Gamma(z) = \int_0^{\infty} e^{-t}t^{z-1}\, dt$$ This has the useful property that, for any $n \in \mathbb{N}$, $$\Gamma(n) = (n-1)!$$ which has an easy proof by induction on $n$. It also has lots of nice analytical properties which make it a good choice for an extension of the factorial function.

Anyway, since the gamma function can be defined (after analytic continuation; see LVK's comment) on the entire complex plane, minus the non-positive integers, for a general $z \in \mathbb{C} - \{ -1, -2, \cdots \}$ we can put $$z! \overset{\text{def}}{=} \Gamma(z+1)$$ For this reason we get $$i! = \Gamma(i+1) = \int_0^{\infty} e^{-t}t^{i}\, dt \approx 0.498015668−0.154949828i$$

See also here and here.

Clive Newstead
  • 62,292
  • 4
  • 91
  • 158
  • 1
    The result comes just from numerical computation? Can it be expressed in terms of elementary functions or well known constants? – leonbloy Sep 25 '12 at 13:41
  • 1
    @leonbloy: Yes it's computed numerically. If there is a nice expression for it then neither I nor Google nor Wolfram Alpha knows what it is ;) – Clive Newstead Sep 25 '12 at 13:44
  • This is interesting stuff, but I have a follow-up: is factorial the only case where a function which only works on a certain set of numbers has been 'abused' and turned into a different function which also works across a bigger set? Or is factorial a bit unique here? – growse Sep 25 '12 at 15:19
  • 3
    @growse Riemann zeta-function is another example where original definition works only in some range of numbers, but can be profitably extended. "Abused" really means "extended" here. –  Sep 25 '12 at 15:21
  • No need to exclude $0$ from $z!=\Gamma(z+1)$, by the way. –  Sep 25 '12 at 15:21
  • @LVK: Sorted, thanks. – Clive Newstead Sep 25 '12 at 15:24
  • @growse: Loads. There's no real 'abuse' (despite what I said), it's just an extension of a function. The problem with extensions is that they're not unique, and so if you want to extend a function whose domain is fairly restricted (like $\mathbb{N}$ inside $\mathbb{C}$), you need a fairly good justification to do so. The second link at the end of the post helps to explain this justification here. – Clive Newstead Sep 25 '12 at 15:26
  • The definition of $\Gamma$ via the integral works only when $\mathrm{Re}z>0$, otherwise we have an issue with convergence at $t=0$. (Consider $z=-1/2$, for example). One needs another extension step (analytic continuation) to define $\Gamma$ on the plane minus nonpositive integers. (However, for the purposes of finding $i!$ the integral is enough.) –  Sep 25 '12 at 16:05
  • @LVK: Woops! I don't want to get bogged down in details in the answer, so I've referred to your comment instead $-$ thanks for that. – Clive Newstead Sep 25 '12 at 16:26
  • @CliveNewstead What numerical technique could one use to solve the above integral? Can one use Riemann Sums, or can Riemann sums only be used for real valued integrals? – mathamphetamines Jan 23 '16 at 20:58
  • @growse: "is factorial the only case where a function which only works on a certain set of numbers has been 'abused' and turned into a different function which also works across a bigger set?" This is getting a bit off-topic, but the history of math is full of functions being generalized / extended, often with very fruitful results. For example, addition was first defined for whole numbers, then extended to incorporate fractions, zero, negative numbers, vectors, complex numbers, etc. Similarly with multiplication, exponentiation, and many others. – LarsH Jun 29 '20 at 13:01

$$i!=\Gamma(i+1)=\int_0^{\infty}e^{-x} x^{i}dx$$ where $\Gamma(n) $ represents the Gamma Function

Note $$x^i=e^{i\ln x}=\cos(\ln x)+i\sin(\ln x)$$

  • 14,295
  • 2
  • 33
  • 72
  • 14
    How is that helpful? – Pedro Sep 25 '12 at 13:07
  • 3
    @PeterTamaroff: The OP asked, "what does it actually mean to take the factorial of a complex number?" And this answer helpfully but tersely says that one way to extend factorial is using the gamma function, and tells what the gamma function is. – LarsH Sep 25 '12 at 15:53
  • 3
    @LarsH Are you sure? It only see an equation with an integral, but no explanation of what that really means. It is not even mentioned that $\Gamma$ is the [Gamma function](http://en.wikipedia.org/wiki/Gamma_function), for example. – Pedro Sep 25 '12 at 16:11
  • An explanation to go with the equations would certainly be due to make this a good answer. – mikebabcock Sep 25 '12 at 17:35
  • 1
    @PeterTamaroff: "only an equation with an integral"? Are you implying that equations are not helpful?? The answer (even before the edit) showed the Greek letter gamma with function notation, which is information answering the OP's question. You asked "How is that helpful?", not "How is that maximally helpful?" Arguably, the equation defining the gamma function is just as helpful as the English phrase "Gamma function", if not more so. The latter is useful in searching; the former explains what function Google was evaluating. – LarsH Sep 25 '12 at 17:57
  • 6
    @LarsH I'm implying that if someone asks "How/why is $i!=\text{bleh}$"? then it is probably because they know nothing about the Gamma function and thus answering $$i! = \Gamma \left( {i + 1} \right) = \int\limits_0^\infty {{x^i}{e^{ - x}}dx} $$ is pretty useless. Let alone that the OP is not supposed to know $\Gamma$ is the Greek letter gamma. Lately we seem to think leaving short "smart" answers that a few can understand (and will probably upvote) will help the OP, and that is not the case. Compare to Clive N.'s answer. – Pedro Sep 25 '12 at 18:03
  • @PeterTamaroff: I agree that sometimes short, pithy answers are intended more to show off the answerer's knowledge than to help the OP. I don't think this is clearly such an answer, nor is it unhelpful. "Compare to Clive N.'s" - of course Clive's is *more* helpful. So? Copy `Γ()` into a Yahoo! search box and you get the gamma function as the 3rd result. So arguably this answer is as helpful as your initial comment, only more so. You might assume the OP doesn't know Γ is the Greek letter gamma, but you could easily be wrong, since he knows factorial, complex numbers, irrationals. – LarsH Sep 25 '12 at 18:47
  • @LarsH Whatever floats your boat, man. We cannot agree on this one, it seems. I told the OP to google it for I was on my phone so it was utterly tedious to write down an answer, if you're concerned. – Pedro Sep 25 '12 at 18:56

To answer your last question,

Do complex factorials give rise to any interesting geometric shapes/curves on the complex plane?

There are a couple of Gamma fractals shown on Wolfram's reference article for Gamma under "Neat Examples":

  • DensityPlot[ Arg[Nest[Gamma, x + I y, 3]], {x, -1.25, -0.6}, {y, -0.25, 0.25}] // Quiet
  • ArrayPlot[ Table[c = N[cr + I ci]; Length @NestWhileList[ If[Abs[#] > 20., Indeterminate, Gamma[#/c]] &, c, (# =!= Indeterminate) &, 1, 20], {ci, -2.5, 2.5, 5/100}, {cr, -2, 2, 4/100}]] // Quiet

See also Christopher Olah's blog post, Gamma Fractals, and from there, Bidimensional zoom in on the Z=Gamma(Z) iteration with display of the arguments, both of which have some nice images.

  • 1,099
  • 11
  • 27