# Why does 0! = 1? [duplicate]

Possible Duplicate:
Prove $0! = 1$ from first principles

Why does 0! = 1?

All I know of factorial is that x! is equal to the product of all the numbers that come before it. The product of 0 and anything is 0, and seems like it would be reasonable to assume that 0! = 0. I'm perplexed as to why I have to account for this condition in my factorial function (Trying to learn Haskell). Thanks.

-
This can be answered by a simple google search. – Eric♦ Mar 6 '11 at 19:05

3
– Rahul Narain Mar 6 '11 at 19:07
Dear Orbit, please refer to the question linked to above on this website. – Akhil Mathew Mar 6 '11 at 19:41

## marked as duplicate by Rasmus, Jonas Meyer, Akhil MathewMar 6 '11 at 19:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

## 5 Answers

Mostly it is based on convention, when one wants to define the quantity $\binom{n}{0} = \frac{n!}{n! 0!}$ for example. An intuitive way to look at it is $n!$ counts the number of ways to arrange $n$ distinct objects in a line, and there is only one way to arrange nothing.

-

Same question here as I have for Eric, why 1 way to arrange nothing, instead of 0 ways? – Orbit Mar 6 '11 at 19:12
Can you give a argument as to why it -should- be 0 ways? – Mitch Mar 8 '11 at 18:46
+1 This is a nice answer, it seems the factorial operation was created exactly to count the number of ways to arrange $n$ objects in a line. – Gustavo Bandeira Nov 25 '12 at 2:13

It has many reasons.

For example, we can have a power series: $e^x = \sum_{n} x^n/n!$ and we would like the first term to be $1$.

Also, how many permutations are there of $0$ numbers? Well, one.

-

In a combinatorial sense, $n!$ refers to the number of ways of permuting $n$ objects. There is exactly one way to permute 0 objects, that is doing nothing, so $0!=1$.

There are plenty of resources that already answer this question. Also see:

http://mathforum.org/library/drmath/view/57905.html

http://wiki.answers.com/Q/Why_is_zero_factorial_equal_to_one

http://en.wikipedia.org/wiki/Factorial#Definition

-

Intending on marking as accepted, because I'm no mathematician and this response makes sense to a commoner. However, I'm still curious why there is 1 way to permute 0 things, instead of 0 ways. – Orbit Mar 6 '11 at 19:10
If you want to do nothing, there is a way to do it, you just don't do it.  But if you say there are 0 ways to do nothing, then you are implying that it is impossible to do nothing, which is of course not the case.  This is how I look at it. – fdart17 Mar 6 '11 at 19:37

We know that $\binom{n}{n}$ and $\binom{n}{0}= 1$. Thus $0! = 1$.

-

3
The theorem that $\binom{n}{k} = \frac{n!}{k!(n-k)!}$ already assumes $0!$ is defined to be $1$. Otherwise this would be restricted to $0 <k < n$. A reason that we do define $0!$ to be $1$ is so that we can cover those edge cases with the same formula, instead of having to treat them separately. We treat binomial coefficients like $\binom{5}{6}$ separately already; the theorem assumes $0 \leq k \leq n$. – Carl Mummert Mar 6 '11 at 19:33

It's because $n! = \prod_{0<k\le n} k.$ ($n!$ is the product of all numbers $1, 2,\dots n$) For $n = 0$ there isn't any number greater then 0 and lesser or equal to $n$, so the product is empty; the empty product is defined by convention as 1.

-
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 27, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": true}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9546290636062622, "perplexity_flag": "head"}