logo

Why Factorial 0 is Defined as 0!=1 📂Functions

Why Factorial 0 is Defined as 0!=1

Definition

For the factorial of 0N0 \notin \mathbb{N}, it is defined as follows 0!0!. 0!:=1 0! := 1

Explanation

Why is 0!0! not 00 but 11? Originally, since 0!:=10! := 1 is a definition, there is no need for proof, and the process of understanding why such a definition is valid is close to a request to ‘accept why this definition was made.’ Let’s understand it step by step according to the level.

Middle School Level

For a natural number nn, n!n! can be defined as follows. n!:=n×(n1)××2×1 n! := n \times (n-1) \times \cdots \times 2 \times 1 Simply put, the factorial is not so difficult as it is the product of subtracting 11 from nn, and it is soon understood why this is necessary. (If advancing a bit ahead of the curriculum) You can encounter factorials from middle school through permutations and combinations, and they appear immediately in permutations nPr_{n} P _{r} and binomial coefficients nCr_{n} C_{r}. nPr:=n(n1)(r+1)r=n!(nr)!nCr:=nPrr!=n!r!(nr)! \begin{align*} _{n}P_{r} &:=& n ( n - 1 ) \cdots ( r + 1 ) r &=& {{ n! } \over { (n-r)! }} \\ _{n}C_{r} &:=& {{ _{n}P_{r} } \over { r! }} &=& {{ n! } \over { r! (n-r)! }} \end{align*} To say that r=nr = n means calculating permutations and combinations by picking all nn items out of nn items, nPn=n!/0!_{n} P _{n} = n! / 0! is the same as the number of ways n!n! to arrange nn items in order, and nCn=n!/n!0!_{n} C _{n} = n! / n! 0! should also be the same as the number of ways 11 to pick all nn items. At this point, x=0!x = 0! must be a number that satisfies the following equation formally. {n!x=n!n!n!x=1 \begin{cases} \displaystyle{{ n! } \over { x }} &= n! \\ \displaystyle {{ n! } \over { n! x }} &= 1 \end{cases} There’s no reason it has to be a system of linear equations, but anyway, the solution that simultaneously satisfies both equations is x=1x = 1. Assuming that nPr_{n}P_{r} and nCr_{n}C_{r} are validly defined as factorials, it has shown that it is mathematically neat and convenient to define 0!0! as 11. Even if we may not understand the meaning of factorials in the vast and deep world of mathematics, it seems clear that this is a practical definition for now.

High School Level 1

As high school students, they learn how the power of aa extends to negative numbers when learning about exponential functions. Firstly, the power of 22 for natural numbers logically unfolds as follows. 22=423=824=1625=32 \begin{align*} 2^{2} =& 4 \\ 2^{3} =& 8 \\ 2^{4} =& 16 \\ 2^{5} =& 32 \\ \vdots & \end{align*} As you see, 2x2^{x} increases by 22 times for each line, with xx increasing by 11. This is the concept of exponentiation that can be understood immediately, even for those who are weak in mathematics. On the other hand, generalizing this to all integers is easier to understand by seeing the pattern in books. 22=421=220=121=0.5 \begin{align*} 2^{2} =& 4 \\ 2^{1} =& 2 \\ 2^{0} =& 1 \\ 2^{-1} =& 0.5 \\ \vdots & \end{align*} Again, 2x2^{x} decreases by 22 times for each line, with xx decreasing by 11. This shows a formally plausible pattern, beyond whether the expression 20,212^{0}, 2^{-1} is correct or such a thing is possible. The lesson from the example of 2x2^{x} is that the expression brilliantly shows that when xx increases, it doubles, and when it decreases, it halves.

Now, let’s return to the factorial. n!n! unfolds in the following way by multiplying nn to (n1)!(n-1)!. 1!=12!=1!×23!=2!×34!=3!×4 \begin{align*} 1! =& 1 \\ 2! =& 1! \times 2 \\ 3! =& 2! \times 3 \\ 4! =& 3! \times 4 \\ \vdots & \end{align*} As with the example of the exponential function, let’s ‘flip’ this in a way that ‘makes sense.’ Since n!n! increased by multiplying nn, now it should be divided as nn decreases. 4!=5!÷53!=4!÷42!=3!÷31!=2!÷20!=1!÷1 \begin{align*} \vdots & \\ 4! =& 5! \div 5 \\ 3! =& 4! \div 4 \\ 2! =& 3! \div 3 \\ 1! =& 2! \div 2 \\ 0! =& 1! \div 1 \end{align*} 1!=k=1111! = \prod_{k=1}^{1} 1 So dividing it by 11 to get 1!÷1=0!1! \div 1 = 0! is ’logically’ 11. A notable point here is that such persuasion does not inform at all about how 0!=10! = 1 is useful. It’s pushing this definition purely on mathematical intuition, for its beauty alone.

College Level

When students reach college, they learn about integrals with unbounded range bound, and various specialized textbooks introduce something called a Gamma function.

Gamma function as a generalization of the factorial: For a natural number nNn \in \mathbb{N}, Γ(n)=(n1)!\Gamma (n) = (n-1)! holds.

For the factorial to be a special case of the Gamma function, it must be 0!=10! = 1. The Gamma function is defined as follows Γ(x)=0tx1etdt \Gamma (x) = \int_{0}^{\infty} t^{x-1} e^{-t} dt and by substituting x=1x=1 into it Γ(1)=0t11etdt=0etdt=[et]0=0(1)=1 \begin{align*} \Gamma (1) =& \int_{0}^{\infty} t^{1-1} e^{-t} dt \\ =& \int_{0}^{\infty} e^{-t} dt \\ =& \left[ - e^{-t} \right]_{0}^{\infty} \\ =& - 0 - (-1) = 1 \end{align*} and since 0!=Γ(1)0! = \Gamma (1), to extend n!n! for 00, it makes sense to define it as 0!=10! = 1.

Joke

Originally, in programming, 0!=1 should be true, so 0!=10!=1 is correct.