Numbers to the Power of Zero I have been a witness to many a discussion about numbers to the power of zero, but I have never really been sold on any claims or explanations. This is a three part question, the parts are as follows...


*

*Why does $n^{0}=1$ when $n\neq 0$?  How does that get defined?


*What is $0^{0}$?  Is it undefined?  If so, why does it not equal $1$?


*What is the equation that defines exponents?  I can easily write a small program to do it (see below), but what about in equation format?

I just want a little discussion about numbers to the power of zero, for some clarification.

Code for Exponents: (pseudo-code/Ruby)
def int find_exp (int x, int n){
    int total = 1;
    n.times{total*=x}
    return total;
}


To define $x^0$, we just cannot use the definition of repeated factors in multiplication. You have to understand how the laws of exponentiation work. We can define $x^0$ to be: $$x^0 = x^{n - n} = \frac{x^n}{x^n}.$$ Now, let us assume that $x^n = a$. It would then be simplified as $$\frac{x^n}{x^n} = \frac{a}{a} = 1.$$ So that's why $x^0 = 1$ for any number $x$.
Now, you were asking what does $0^0$ mean. Well, let us the example above: $$0^0 = 0^{n - n} = \frac{0}{0}.$$ Here is where it gets confusing. It is more likely to say that $\frac{0}{0}$ equals either $0$ or $1$, but it turns out that $\frac{0}{0}$ has infinitely many solutions. Therefore, it is indeterminate. Because we mathematicians want to define it as some exact value, which is not possible because there are many values, we just say that is undefined.
NOTE: $0^0$ still follows the rule of $x^0 = 1$. So it is correct to say that $x^0 = 1$ for ANY value of $x$. 
I hope this clarify all your doubts.
