# Zero Factorial Mystery

**URL:** <https://boards.straightdope.com/t/zero-factorial-mystery/7908>\
**Category:** Factual Questions\
**Created:** [March 1, 2000, 5:53am UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908 "2000-03-01T05:53:00Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![jeturgeon](https://avatars.discourse-cdn.com/v4/letter/j/74df32/32.png) [@jeturgeon](https://boards.straightdope.com/u/jeturgeon)\
**Post date:** [March 1, 2000, 5:53am UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/1 "2000-03-01T05:53:00Z")

</div>

Can someone pleeeease explain this for me. Throughout all of my math classes, mostly Algebra, I was always told that zero factorial (0!) is equal to 1. Now I understand how 3! is the same as 6, and 5! is the same as 120, and so forth, but I cannot figure out the 0! mystery. Any help would be appreciated.

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [April 13, 2012, 8:11pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/2 "2012-04-13T20:11:37Z")

</div>

> [@jeturgeon](#):
>
> Can someone pleeeease explain this for me. Throughout all of my math classes, mostly Algebra, I was always told that zero factorial (0!) is equal to 1. Now I understand how 3! is the same as 6, and 5! is the same as 120, and so forth, but I cannot figure out the 0! mystery. Any help would be appreciated.

First, take the definition of the factorial function:

n! = n × (n − 1) × (n − 2) × ⋯ × 1

If you agree with this, then you should agree that 1! = 1; we simply substitute 1 for n in the above definition.

The definition says what the factorial of n is, so we should be able to find out what it is when applied to (n − 1):

(n − 1)! = (n − 1) × ((n − 1) − 1) × ((n − 1) − 2) × ⋯ × 1

So simplifying we get

(n − 1)! = (n − 1) × (n − 2) × ⋯ × 1

Since the right-hand side of this equation already appears in our definition of n!, we can substitute the left-hand side there:

n! = n × (n − 1)!

So now let’s evaluate this slightly modified definition for n = 1:

1! = 1 × (1 − 1)!

Subtracting, we get

1! = 1 × 0!

And since we already established that 1! = 1, we can make a substitution in the left-hand side of this equation:

1 = 1 × 0!

And now we can divide both sides by 1 to cancel out the 1 on the right-hand side:

1 ÷ 1 = (1 × 0!) ÷ 1

So simplifying,

1 = 0!

---

<div class="post-metadata">

**Author:** ![CalMeacham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/calmeacham/32/35_2.png) [@CalMeacham](https://boards.straightdope.com/u/CalMeacham)\
**Post date:** [April 13, 2012, 8:52pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/3 "2012-04-13T20:52:02Z")

</div>

It also turns out that many infinite series and sequences that include the term **n!** can be extrapolated down to \*\* n = 0 \*\* if **n! = 1**.

But the biggest reason is that the factorial function follows the Gamma function. Gamma(n) is equal to (n - 1)!, and Gamma (1) = 1

> **[Gamma function](https://en.wikipedia.org/wiki/Gamma_function)**
>
> In mathematics, the gamma function (represented by Γ, the capital letter gamma from the Greek alphabet) is one commonly used extension of the factorial function to complex numbers. The gamma function is defined for all complex numbers except the non-positive integers. For every positive integer n, Derived by Daniel Bernoulli, for complex numbers with a positive real part, the gamma function is defined via a convergent improper integral:

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [April 13, 2012, 8:57pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/4 "2012-04-13T20:57:49Z")

</div>

> [@CalMeacham](#):
>
> It also turns out that many infinite series and sequences that include the term **n!** can be extrapolated down to \*\* n = 0 \*\* if **n! = 1**.

If n! = 1 you’ve got a very interesting and very simple (but not very useful) definition of the factorial function. 😃

---

<div class="post-metadata">

**Author:** ![aldiboronti](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@aldiboronti](https://boards.straightdope.com/u/aldiboronti)\
**Post date:** [April 13, 2012, 9:00pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/5 "2012-04-13T21:00:17Z")

</div>

> [@psychonaut](#):
>
> First, take the definition of the factorial function:
> 
> n! = n × (n − 1) × (n − 2) × ⋯ × 1

Here’s what I find paradoxical. As the above is, as you say, the definition of the factorial function, let us put in 0 for n to find 0!.

0! = 0 x (0 - 1) x (0 - 2) x — x 1

This simplifies to 0! = 0

What am I missing here?

Edit: Have I been whooshed?

---

<div class="post-metadata">

**Author:** ![Thudlow\_Boink](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/thudlow_boink/32/320_2.png) [@Thudlow\_Boink](https://boards.straightdope.com/u/Thudlow_Boink)\
**Post date:** [April 13, 2012, 9:07pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/6 "2012-04-13T21:07:21Z")

</div>

> [@jeturgeon](#):
>
> Can someone pleeeease explain this for me. Throughout all of my math classes, mostly Algebra, I was always told that zero factorial (0!) is equal to 1. Now I understand how 3! is the same as 6, and 5! is the same as 120, and so forth, but I cannot figure out the 0! mystery. Any help would be appreciated.

One thing to keep in mind is that factorials are about multiplication, and with multiplication, the “starting point” or “do-nothing default” is 1, not 0.

There are many useful rules and relationships that only work consistently if we define 0! to be 1, not 0. For example, n! / n = (n-1)!

> [@psychonaut](#):
>
> First, take the definition of the factorial function:
> 
> n! = n × (n − 1) × (n − 2) × ⋯ × 1

> [@aldiboronti](#):
>
> Here’s what I find paradoxical. As the above is, as you say, the definition of the factorial function, let us put in 0 for n to find 0!.
> 
> 0! = 0 x (0 - 1) x (0 - 2) x — x 1
> 
> This simplifies to 0! = 0
> 
> What am I missing here?

Well, yeah, **psychonaut** ’s definition doesn’t apply when n = 0. It basically says to multiply together all the whole numbers from n down to 1—but “n down to 1” doesn’t make sense when you start with 0.

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [April 13, 2012, 9:08pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/7 "2012-04-13T21:08:11Z")

</div>

> [@jeturgeon](#):
>
> Can someone pleeeease explain this for me. Throughout all of my math classes, mostly Algebra, I was always told that zero factorial (0!) is equal to 1. Now I understand how 3! is the same as 6, and 5! is the same as 120, and so forth, but I cannot figure out the 0! mystery. Any help would be appreciated.

Psychonaut answered it, but to give a bit more perspective: it’s similar to the question “what happens when you multiply no numbers together?”

This sounds like an absurd question, but it’s actually quite reasonable. 2[sup]3[/sup]=2_2_2=8, 2[sup]2[/sup]=2\*2=4, 2[sup]1[/sup]=2, 2[sup]0[/sup]=?.

As with 0!, the answer here is 1. It’s the only way to make sense of x[sup]0[/sup], for one thing, and also plays nicely with lots of other math. You can convince yourself of it with a similar argument to the factorial one:  
x[sup]n[/sup] = x \* x[sup]n-1[/sup]  
x[sup]1[/sup] = x \* x[sup]0[/sup]  
x[sup]0[/sup] = x[sup]1[/sup] / x = x / x = 1 (assuming x != 0)

---

<div class="post-metadata">

**Author:** ![Evil\_Economist](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@Evil\_Economist](https://boards.straightdope.com/u/Evil_Economist)\
**Post date:** [April 13, 2012, 9:10pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/8 "2012-04-13T21:10:06Z")

</div>

> [@aldiboronti](#):
>
> Here’s what I find paradoxical. As the above is, as you say, the definition of the factorial function, let us put in 0 for n to find 0!.
> 
> 0! = 0 x (0 - 1) x (0 - 2) x — x 1
> 
> This simplifies to 0! = 0
> 
> What am I missing here?
> 
> Edit: Have I been whooshed?

I think that when he says “… x 1”, that implies that it only holds for n\>=1 (e.g., 1! isn’t equal to 1 X 0 X -1 X-2…), which would simplify to 1! = 1 x 1.

Edit…I bet the OP is thrilled that’s he’s finally getting a response, even though it took a while

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [April 13, 2012, 9:12pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/9 "2012-04-13T21:12:02Z")

</div>

> [@Thudlow\_Boink](#):
>
> Well, yeah, **psychonaut** ’s definition doesn’t apply when n = 0. It basically says to multiply together all the whole numbers from n down to 1—but “n down to 1” doesn’t make sense when you start with 0.

Sure it does. The product of zero numbers is one—it’s known as the [empty product](https://en.wikipedia.org/wiki/Empty_product).

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [April 13, 2012, 9:13pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/10 "2012-04-13T21:13:11Z")

</div>

> [@Evil\_Economist](#):
>
> Edit…I bet the OP is thrilled that’s he’s finally getting a response, even though it took a while

Yeah. He’s still active here so I figured he might appreciate the information despite the delay. 🙂

---

<div class="post-metadata">

**Author:** ![Evil\_Economist](https://avatars.discourse-cdn.com/v4/letter/e/c89c15/32.png) [@Evil\_Economist](https://boards.straightdope.com/u/Evil_Economist)\
**Post date:** [April 13, 2012, 9:15pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/11 "2012-04-13T21:15:16Z")

</div>

> [@psychonaut](#):
>
> Sure it does. The product of zero numbers is one—it’s known as the [empty product](https://en.wikipedia.org/wiki/Empty_product).

YEah, but that’s not in your definition; you had:

“n! = n × (n − 1) × (n − 2) × ⋯ × 1”

Which doesn’t define n! for n\<1. So, you should probably have:

n! = n × (n − 1) × (n − 2) × ⋯ × 1, 0! = 1

Edit: missed your response above my post

---

<div class="post-metadata">

**Author:** ![tracer](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tracer/32/20578_2.png) [@tracer](https://boards.straightdope.com/u/tracer)\
**Post date:** [April 13, 2012, 9:18pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/12 "2012-04-13T21:18:54Z")

</div>

So then, what’s (-1)! ?

Heck, for that matter, what’s 0.5! ?

---

<div class="post-metadata">

**Author:** ![Dr.Strangelove](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/dr.strangelove/32/6613_2.png) [@Dr.Strangelove](https://boards.straightdope.com/u/Dr.Strangelove)\
**Post date:** [April 13, 2012, 9:23pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/13 "2012-04-13T21:23:38Z")

</div>

> [@tracer](#):
>
> So then, what’s (-1)! ?
> 
> Heck, for that matter, what’s 0.5! ?

-1! is undefined. 0.5! is about 0.8862, and comes from the definition of the [Gamma function](http://en.wikipedia.org/wiki/Gamma_function).

ETA: 0.8862 is sqrt(pi)/2

---

<div class="post-metadata">

**Author:** ![psychonaut](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/psychonaut/32/4655_2.png) [@psychonaut](https://boards.straightdope.com/u/psychonaut)\
**Post date:** [April 13, 2012, 9:35pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/14 "2012-04-13T21:35:11Z")

</div>

> [@Evil\_Economist](#):
>
> YEah, but that’s not in your definition; you had:
> 
> “n! = n × (n − 1) × (n − 2) × ⋯ × 1”
> 
> Which doesn’t define n! for n\<1.

You’re perhaps interpreting the notation too literally; by your reading it doesn’t properly define n! for n = 1 or n = 2 either, since in the first case you end up multiplying by −1 and in both cases by 0. I could have instead written something like

n! = ∏ {i | i ∈ ℤ[sup]+[/sup] ∧ i ≤ n}

but I couldn’t be sure the OP would understand that notation. It looks like his experience was with high school-level algebra, so I used high school algebra-level notation.

---

<div class="post-metadata">

**Author:** ![Trinopus](https://avatars.discourse-cdn.com/v4/letter/t/2bfe46/32.png) [@Trinopus](https://boards.straightdope.com/u/Trinopus)\
**Post date:** [April 13, 2012, 10:25pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/15 "2012-04-13T22:25:45Z")

</div>

In practical terms, n! is the number of ways of arranging n items in a row.

You can arrange 3 items in a row six different ways. Two items in two ways. One item in only one way.

And zero items? Only one way!

---

<div class="post-metadata">

**Author:** ![Frylock](https://avatars.discourse-cdn.com/v4/letter/f/ce7236/32.png) [@Frylock](https://boards.straightdope.com/u/Frylock)\
**Post date:** [April 13, 2012, 10:55pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/16 "2012-04-13T22:55:42Z")

</div>

**Psychonaut** , how did this zombie happen?

---

<div class="post-metadata">

**Author:** ![Hari\_Seldon](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/hari_seldon/32/5173_2.png) [@Hari\_Seldon](https://boards.straightdope.com/u/Hari_Seldon)\
**Post date:** [April 13, 2012, 11:10pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/17 "2012-04-13T23:10:46Z")

</div>

> [@Trinopus](#):
>
> In practical terms, n! is the number of ways of arranging n items in a row.
> 
> You can arrange 3 items in a row six different ways. Two items in two ways. One item in only one way.
> 
> And zero items? Only one way!

This is certainly correct, but it can be put into a broader context. Here is the nerd’s eye view: Generally, if S and T are two sets of number, assumed disjoint (no elements in common), then the product of all the numbers in S times the product of all the numbers in T is the same as the product of all the numbers is S \cup T (the union of S and T). Let S be empty and you conclude the product over the empty set has to be 1. Incidentally, if S and T have common elements, the product of all the numbers in S \cup T times the product of all the numbers in S \cap T (the intersection) is the product of all the numbers in S times the product of all the numbers in T. If this formula is to remain valid when S and T are disjoint, then again the empty product is 1. The fact that the Gamma function agrees with this is nice, but the combinatorial explanation is decisive. By the way, combinatorially, 0^0 is also 1 and in no way undefined.

The same argument with sum replacing product should convince you that the empty sum is 0.

---

<div class="post-metadata">

**Author:** ![Joey\_P](https://avatars.discourse-cdn.com/v4/letter/j/919ad9/32.png) [@Joey\_P](https://boards.straightdope.com/u/Joey_P)\
**Post date:** [April 13, 2012, 11:21pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/18 "2012-04-13T23:21:29Z")

</div>

> [@Frylock](#):
>
> **Psychonaut** , how did this zombie happen?

He was showing his work. He works really slow.

---

<div class="post-metadata">

**Author:** ![Tangent](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/tangent/32/3098_2.png) [@Tangent](https://boards.straightdope.com/u/Tangent)\
**Post date:** [April 13, 2012, 11:41pm UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/19 "2012-04-13T23:41:55Z")

</div>

> [@Evil\_Economist](#):
>
> Edit…I bet the OP is thrilled that’s he’s finally getting a response, even though it took a while

Surely this is some kind of record! An OP with no responses, revived TWELVE years later?

---

<div class="post-metadata">

**Author:** ![CalMeacham](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/calmeacham/32/35_2.png) [@CalMeacham](https://boards.straightdope.com/u/CalMeacham)\
**Post date:** [April 14, 2012, 12:44am UTC](https://boards.straightdope.com/t/zero-factorial-mystery/7908/20 "2012-04-14T00:44:23Z")

</div>

> [@psychonaut](#):
>
> If n! = 1 you’ve got a very interesting and very simple (but not very useful) definition of the factorial function. 😃

I was in a hurry. It’s obviously 0! or n = 0.  
But you knew that.

[Next page](https://boards.straightdope.com/t/zero-factorial-mystery/7908.md?page=2)
