How can $0!=1$ if the definition of factorial is $n!=n\times (n-1)!$ Its a pretty basic question.
If the definition of factorial is $n!= n\times(n-1)!$, then how can $0!=1$ since
if we feed $0$ into the equation we get $0!=0\times (-1)!$?
This comes after a Numberphile video where they explained that you can write $4!=\frac{5!}5$ then you can say that $0!=\frac{1!}1$ which equals $1$.
They also say that there is one way to arrange nothing but I would say there are $0$ ways to arrange nothing since there is nothing to arrange.
 A: As to why there is one way to arrange zero objects, I once read a very nice explanation: To count the number of ways to arrange something, you take a picture of every possible layout of the items, and then you count the number of distinct pictures. For zero items, there is going to be no items in the arrangements, but you will still have one single picture of nothing, representing a single arrangement.
A: $$
0! = \prod_{j \in \varnothing} j = e^{\sum_{j \in \varnothing}\log j} = e^0 = 1
$$
A: Note: I sympathize with your question because this used to bother me as well. It seemed absurd that some authors of textbooks could get by with letting $0!=1$ because it was "convenient to define it to be so" (can't remember exactly which book that came out of). First note that the title of your question does not make a great deal of sense in the context of definitions because $0!$ is actually defined to be equal to $1$. Here are two common definitions for the factorial:
$$
n!=\prod_{k=1}^n k
$$
and
$$
n!=
\begin{cases}
1 & \text{if $n=0$},\\
(n-1)!\cdot n & \text{if $n>0$}.
\end{cases}
$$
Thus, you truly cannot prove that $0!=1$. It doesn't make any sense. However, there may be some intuition to be had via combinatorics. 
Some intuition via combinatorics: You may have seen the notation $\binom{n}{r}=\frac{n!}{r!(n-r)!}$ at some point. When $r\leq n$, the notation $\binom{n}{r}$ represents the number of ways to select $r$ objects out of $n$ objects regardless of their ordering. Now, suppose $r=n$. What does this mean? It means you are selecting all objects at one time, and the number of ways you can do this is
$$\require{cancel}
\binom{n}{r} = \frac{n!}{n!(n-n)!} = \frac{\cancel{n!}}{\cancel{n!}\cdot 0!} = \frac{1}{0!} = 1.
$$
Hence, $0!=1$. 
This is not a proof--just some possible intuition.
A: The equation $n! = n \cdot (n-1)!$ only holds for $n \geq 1$, so you're not allowed to plug in $n=0$ like you did in the question.
Try plugging in $n=1$ instead. We get:
$$1! = 1 \cdot 0!$$
Hence
$$1! = 0!$$
So if you agree that $1!$ equals $1$, then:
$$1 = 0!$$
A: We simply define 0! to be 1.  Also, this definition plays nice with the Gamma function.
A: 
If we feed $0$ into the equation we get $0!=0\times(-1)!$

And? What seems to be the problem? $(-1)!~$ is $~\pm\infty,~$ or, to put it more rigorously, it is 
undefined. More to the point, $~\displaystyle\lim_{x\to0}x\cdot(x-1)!~=~\lim_{x\to0}x\cdot\Gamma(x)~=~1$.
A: A nice definition of $n!$ is the number of bijections from $\{1,2,\dots,n\}$ to itself. Thus $0!$ is the number of bijections from the empty set to itself. There is one such map, which can be thought of as an empty product of sorts.
A: Because we first get to 0
by 1! = 1*0!,
and this gives
0! = 1.
When we try to get to -1!,
we get
0! = 0*(-1)!
which, naively,
says that
$(-1)! = \infty$.
This actually means that
(-n)! is not defined
for integer n < 0.
Look at the gamma function
to see how factorial
is defined for
non-integer values.
Also look at the
reflection formula.
