17

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...


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

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

  3. 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;
}
Cheese Cake
  • 1,143
  • Umm, I mean $n$ does not equal $0$, programming habit -_- And I am not good in TeX – fr00ty_l00ps Nov 11 '12 at 19:21
  • 9
    Actually, $0^0=1$, too. – Thomas Andrews Nov 11 '12 at 19:22
  • Really? I have always been told that it is undefined... – fr00ty_l00ps Nov 11 '12 at 19:23
  • Think of $n^0 = 1$ as the base step of a recursive definition for $n^x$, much the same way as you have defined "total=1" in your pseudocode. – Shaun Ault Nov 11 '12 at 19:23
  • It is defined, but it is also not continuous. That means it is useless to define it that way in computer programs with real variables, for example, because floating point zero is just a number near zero – Thomas Andrews Nov 11 '12 at 19:24
  • @ShaunAult Ah, true. But what if I set n to n-1, and set total to x? Wouldn't that throw your claim out the window? – fr00ty_l00ps Nov 11 '12 at 19:24
  • 8
    @ThomasAndrews $0^0$ is an indeterminate form. As the limit of $x^x$ from the right, yes it limits to $1$. But as the limit of $0^x$, it tends toward 0. – Shaun Ault Nov 11 '12 at 19:25
  • 10
    Being an indeterminate form does not imply that something is undefined. $0^0$ is defined and equal to $1$. @ShaunAult – Thomas Andrews Nov 11 '12 at 19:26
  • @ThomasAndrews Is there a mathematical way to prove so? – fr00ty_l00ps Nov 11 '12 at 19:26
  • 5
    Sure, you can define your code that way. On the other hand, there are also many other good reasons to define $n^0 = 1$. Notably, it is consistent with $1 = n^p / n^p = n^{p-p} = n^0$. – Shaun Ault Nov 11 '12 at 19:27
  • 1
    No, by definition, being indeterminate means that this expression only makes sense when one takes a limit. By themselves, expressions such as $0/0$, $0 \cdot \infty$, and $0^0$ cannot consistently be defined as a particular real number. – Shaun Ault Nov 11 '12 at 19:29
  • @ShaunAult Then what kind of number is it? o.O – fr00ty_l00ps Nov 11 '12 at 19:31
  • @CodeAdmiral: NaN. Not a real number, but a description of a potential limit. $\lim_{x \to 0^+} x^x$ and $\lim_{x \to 0^+} 0^x$ both have the indeterminate form $0^0$, and yet the former evaluates to $1$ while the latter to $0$. – Shaun Ault Nov 11 '12 at 19:33
  • 1
    @ShaunAult so which is commonly accepted? And what in the heck does "indeterminate form" mean? I am a highschool freshman ^^ – fr00ty_l00ps Nov 11 '12 at 19:34
  • 3
    @ShaunAult: That's basically a misunderstanding. It just mean that you cannot take the limit for $x\to 0$ by blindly substituting $0$ for $x$ into the expression. But if you could always do that, then there wouldn't be any point in having a concept of limit in the first place. The arithmetic meaning of $0^0$ is or ought to be independent of any considerations of limits. – hmakholm left over Monica Nov 11 '12 at 19:36
  • It's related to th concepts of limits (pre-calc and calculus material) If you're interested in learning more: http://en.wikipedia.org/wiki/Indeterminate_form – Shaun Ault Nov 11 '12 at 19:36
  • @ShaunAult Oh, trust me, I can tread water in calc. In church today, I was working the derivative of a circle equation. – fr00ty_l00ps Nov 11 '12 at 19:39
  • 4
    @ShaunAult, the value of the expression $0^0$ is not necessarily the limit of a different expression $x^y$ as $x$ and $y$ tend to zero. The notion of "NaN" is a red herring in any case; it is a value defined by the IEEE 754 floating-point standard, not a concept in mathematics. –  Nov 11 '12 at 20:10
  • 1
    Duplicate of http://math.stackexchange.com/questions/11150/ – Wok Nov 11 '12 at 22:00
  • @ThomasAndres Regarding $0^0$, two conventions are at odds. One is that $x^0$ should be $1$ for all $x$. The other is that $0^x$ should be $0$ for all $x$. Who wins? $0^0$ is just as much undefined as $\frac{0}{0}$ or $0\cdot\infty$. In fact, applying $\ln$ to $0^0$ and trying to apply logarithmic identities yields $0\cdot-\infty$. – 2'5 9'2 Nov 16 '12 at 20:17
  • 1
    This is a duplicate of two questions: $x^0$ $x \neq 0$: http://math.stackexchange.com/questions/9703/how-do-i-explain-2-to-the-power-of-zero-equals-1-to-a-child/564272#564272 $0^0$ not defined: http://math.stackexchange.com/questions/11150/ –  Nov 16 '13 at 23:05
  • @ThomasAndrews $0^0\neq 1$. Because since $0=1-1$, we have $0^0=0^{1-1}=0\div 0=1$? But $0\div 0$ is strictly undefined! What you mean to say is... $$\Large\lim_{n\to 0}n^n=1.$$ – Mr Pie Oct 07 '18 at 23:35
  • 4
    Don't tell me what I mean to say, @user477343. There are elementary reasons $0^0=1.$ There are also convenience reasons to define it that way. Your argument is pointless, because $0^{2-1}=0/0,$ too. So is $0^1$ undefined? – Thomas Andrews Oct 07 '18 at 23:57
  • @ThomasAndrews but... this means I have been taught wrong by every one of my math teachers thus far... – Mr Pie Oct 07 '18 at 23:59
  • 4
    Then you have been taught wrong. $0^0$ is an indeterminate form, which is the equivalent of saying the function $f(x,y)=x^y$ cannot be made continuous at $(0,0),$ and some teachers confuse "indeterminate form" from "undefined." And people doing numeric calculations (like computer programming) will leave $0^0$ undefined because the inputs are actually approximations, and hence, because of the lack of continuity, it wouldn't make sense to define $0^0.$ But mathematically, $0^0=1.$ @user477343 – Thomas Andrews Oct 08 '18 at 00:09
  • @ThomasAndrews okay... thank you for that. I take back what I said :) – Mr Pie Oct 08 '18 at 00:12
  • 1
    In lambda calculus, the exponentiation operator is remarkably trivial, and you get $0^0=1.$ In set theory, too. The only problem with the definition is a teaching problem - the notion that an indeterminate form is not the same as "undefined." But you get even more teaching problems when you get to complex exponentiation - exponentiation is tricky. @user477343 – Thomas Andrews Oct 08 '18 at 00:14
  • 1
    @ShaunAult: Your misconception is a common one. Please see this post explaining the difference between $0^0$ and "$0^0$". One is equal to $1$ under any reasonable definition, while the other is a symbolic expression and not a number. This is completely in line with the comments by Thomas Andrews and Henning Makholm. – user21820 Oct 08 '18 at 08:19
  • Related: https://math.stackexchange.com/questions/11150/zero-to-the-zero-power-is-00-1 – Henry Jan 08 '24 at 07:05

10 Answers10

20

It's basically just a matter of what you define the notation to mean. You can define things to mean whatever you want -- except that if you choose a definition that leads to different results than everyone else's definitions give, then you're responsible for any confusion brought about by your using a familiar notation to mean something nonstandard.

Most commonly we define $x^0$ to mean $1$ for any $x$. What you find in discussions elsewhere are argument that this is a useful definition, not arguments that it is correct. (Definitions are correct because we choose them, not for any other reason. That's why they are definitions).

Some people choose (for certain purposes) to explicitly refrain from defining $0^0$ to mean anything. That choice is (supposedly) useful because then the map $x,y\mapsto x^y$ is continuous in the entire subset of $\mathbb R\times\mathbb R$ it is defined on. But it's an equally valid choice to define $0^0$ to mean $1$ and then just remember that $x,y\mapsto x^y$ is not continuous at $(0,0)$.

  • I agree with most of your answer, except the definition we choose is not $x^0$ in this case, it is another definition which implies the value of $x^0$. See http://math.stackexchange.com/a/11211/2380 – Wok Nov 12 '12 at 17:00
  • 2
    But when considering the lone expression $0^0$ without the context of the function $x^y$, I've always seen the choice to refrain from defining $0^0$ to be firstly about two competing basics of arithmetic: that usually, $x^0=1$, and usually $0^x=0$. These two things are at odds with $0^0$. – 2'5 9'2 Nov 16 '12 at 20:16
  • 2
    @alex.jordan The two statements $P$: "$x^0 = 1$ for all $x$", and $Q$: "$0^x = 0$ for all $x$", are at odds with each other. However, statements can't be "at odds" with a number, so your last sentence makes no sense. Also, if $P$ and $Q$ contradict each other, all that that tells you is that at least one of them is false (why is it necessary to explain this on a math website?). And if you plug in $x=-1$ then it's pretty obvious which one that is. – Mark Feb 24 '17 at 20:47
  • 1
    @Mark. First, you just replied to a comment from 2012. Did you realize that? Second, I don't understand what you are saying. Your statement $Q$ is just plain false. $0^{-1}$ is not $0$, for example. Anyway, the upvotes on my comment indicate you may have misread or misunderstood something I said there (five years ago). People adopt the mathematical intuition that $0$ to a (positive) power should be $0$ and that a number to the $0$ power should be $1$. When they see $0^0$, these two competing intuitions clash (even though one of them shouldn't apply in the first place.) – 2'5 9'2 Feb 24 '17 at 23:46
  • 1
    @alex.jordan Sorry to reply to a very old comment. Your comment "These two things are at odds with $0^0$" says absolutely nothing about $0^0$ unless you make a basic error in logic. The only way the comment could be relevant to $0^0$ is if you assume that when two statements $P,Q$ are at odds, then they must be both wrong (even in situations where it is very obvious that $Q$ is wrong). – Mark Feb 25 '17 at 00:16
  • @Mark: It looks like you're simply trying to criticize, in a rather roundabout and combative way, the exact choice of words Alex made more than 4 years ago, rather than the actual point he was making. Is life really long enough for that? What is your goal in this discussion? – hmakholm left over Monica Feb 25 '17 at 00:32
  • 1
    My apologies for the time-frame and tone in my comment. I didn't intend to criticize the words, only the logic behind them. – Mark Feb 25 '17 at 02:12
12

The invention of numbers was one of the biggest breakthroughs in the history of math. It marked the realization that this sack of pebbles $$\{ \blacktriangle\;\blacktriangle\;\blacktriangle\;\blacktriangle\;\blacktriangle \}$$ this string of knots $$-\bullet-\bullet-\bullet-\bullet-\bullet-$$ and this bone full of tally marks $$/\,/\,/\,/\,/$$ are all incarnations of a single thing, the abstract quantity five. That leap of abstraction has become so prosaic for us that it almost feels weird to do arithmetic by actually counting things. In some cases, though, it can be illuminating to go back to the basics—back to the days when we didn't have numbers, and we did all our arithmetic by counting things. Your question is one of those cases.

In what follows, I'll use a capital letter like $X$ to stand for a finite set of things, like a herd of goats or a pile of beads, and I'll use the symbol $|X|$ to stand for the number of things in the set.


Exponentiation is a tricky operation, as you've clearly noticed, so let's warm up with something simpler. If you have two piles of beads, $A$ and $B$, the simplest thing you can do with them is shove them together to make a bigger pile, which is often written $A \sqcup B$. You should easily be able to convince yourself that, on the level of numbers, $|A \sqcup B| = |A| + |B|$. In other words, the concrete operation of shoving two piles together corresponds to the abstract operation of adding two numbers. Addition of whole numbers is often defined in this way.


Here's a slightly tougher warm-up. If you have a bunch of shirts, $H$, and a bunch of skirts, $K$, you might wonder how many different outfits you can make by pairing a shirt with a skirt. The set of outfits is usually written $H \times K$. You should be able to convince yourself that $|H \times K| = |H| \cdot |K|$. In other words, the concrete operation of counting pairs corresponds to the abstract operation of multiplication. Multiplication of whole numbers is often defined in this way.


Now that we're warmed up, suppose you have a set of paints, $C$, and a bag of beads, $X$. You might wonder how many different ways there are to color each bead with one of the paints. The set of ways to color the beads is usually written $C^X$. If you try a few examples, you'll see that $|C^X| = |C|^{|X|}$. Exponentiation of whole numbers is often defined this way.

Finally, we can get to your question. Suppose you have a bunch of paints, but the bag of beads is empty. Is it possible for you to paint all the beads? Sure: you just don't do anything! In fact, not doing anything is the only way to paint all the beads in the bag, since there are no beads. So, when the set $C$ has a bunch of paints, but the bag $X$ is empty, $|C^X| = 1$. If you define exponentiation by counting colorings, that means $|C|^0 = 1$ for any positive number $|C|$.

To make matters worse, suppose you have no paints and no beads. Happily, you can still paint all the beads: once again, you just don't do anything. Like before, not doing anything is the only way to paint all the beads, so $|C^X| = 1$ even when both $C$ and $X$ are empty. If you define exponentiation by counting colorings, that means $0^0 = 1$.

On the other hand, suppose you don't have any paints, but you do have some beads. In this case, you can't paint all the beads, because you have no paints! There are just no ways to paint all the beads. In other words, when $C$ is empty but $X$ is not, $|C^X| = 0$. If you define exponentiation by counting colorings, that means $0^{|X|} = 0$ for any positive number $|X|$, just like you'd expect.


Here's a bonus. André Nicolas argued that $0^0$ should be $1$ in order to make the binomial theorem true. Even those weird-looking numbers $\binom{n}{k}$ can be defined using finite sets: if you have $N$ toys and $K$ kids, $\binom{N}{K}$ is the set of ways you can pick out enough toys to have one for each kid. (Note that you don't give each toy to a particular kid: you just want the numbers of kids and toys to be the same.) If you get out your set of paints $C$ and another set of paints $D$ and start painting various numbers of kids and handing out toys based on how many colors of kids there are, you should somehow be able to convince yourself that the binomial theorem is true, even when $C$ doesn't have any paints in it. That's why André Nicolas came up with the same rules for zero exponentials as we just did.

Vectornaut
  • 4,860
10

It is for various reasons convenient to define $0^0$ as being equal to $1$. For one thing, consider the Binomial Theorem, or power series. It is useful to be able to write $$(1+x)^n =\sum_{k=0}^n \binom{n}{k}x^k,$$ or $$e^x=\sum_{k=0}^\infty \frac{x^k}{k!}.$$ In each of these equations, if we want the expression on the right to give the correct answer when $x=0$, we need to set $0^0=1$.

André Nicolas
  • 507,029
  • Ah, that makes sense, thanks ^v^ – fr00ty_l00ps Nov 11 '12 at 20:02
  • 1
    Must a theorem be true? Or is it merely convenient for a theorem to be true? – Mark Feb 17 '17 at 15:13
  • Indeed, there would still exist true theorems if we had convened a different definition, but those theorems would be less simple to write. (More mathematicians choose to use definitions and notations that make relevant results more concise and elegant, thus convenient leads to conventional, and breaking convention would require more effort to build upon previous work of others.) – benjimin May 06 '20 at 07:56
6

To 1): We define the exponents of a nonzero integer $a$ such that they satisfy the relation $a^ba^c=a^{b+c}$ for ay integers $b,c$, with $a^1=a$. In order for exponents to be well defined, we thus need $a^0=1$.

To 2): It depends on how you define it. If you define it via the limits $\lim_{x\rightarrow 0} x^0$ or $\lim_{x\rightarrow 0} x^x$, then $0^0=1$. If you define it as $\lim_{x\rightarrow 0} 0^x$, then $0^0=0$.

To 3): Exponents are defined simply by $a^n=\underbrace{a\cdot a\cdot \,...\, \cdot a}_{n}$.

Espen Nielsen
  • 3,863
  • 17
  • 31
  • For 1), so some mathematician once said that $a^{0} = 1$?

    For 2), Which is then correct? Or is it both?

    For 3), I can kinda wrap my head around that, but I have yet to come across that particular way of denoting a range...

    – fr00ty_l00ps Nov 11 '12 at 19:29
  • No, we never define $0^0=0$. Just because it is a limit doesn't mean we define it that way. It is either $1$ or undefined. – Thomas Andrews Nov 11 '12 at 19:33
  • is needed to make the notion of exponent well defined. For 2), there is no "correct" one. It is a matter of definition.
  • – Espen Nielsen Nov 11 '12 at 19:35
  • I thought the other way to think of 0 to the power 0 is like 0 / 0, and therefore is indeterminate – nonopolarity Apr 09 '17 at 10:41