Monday, July 27, 2020

Zero to the zeroth power

The question of the number zero raised to the zeroth power comes up often enough that finally I wanted to put my response to it on the blog for future reference. In short: \[ 0^0 = 1.\] This might not seem like such a big deal, but in the broader scheme the point is: 

We should not teach that mathematics is full of things that can go wrong and that one has to be "careful". We should teach that mathematics can be trusted even if some of it looks weird at first. 

It's the former approach that tends to depict mathematics as some incomprehensible wizardry, not the latter. 

I wouldn't have written this post if everyone already agreed on the status of $0^0$, but it seems that the idea that $0^0=1$ is still the minority view even in the teacher community. In a poll among mathematics teachers last year, about 85% of the responders chose the answer "0^0 is undefined" over the alternative "0^0 = 1".

But let's first review what the problem is, so we know what we're debunking. On one hand it's generally agreed that $x^0 = 1$, at least when $x>0$. This might itself require an explanation, but is rarely disputed. For instance, $10^3$ is $1000$, which is 10 times as much as $10^2$, which is 10 times as much as $10^1$, so it makes sense that $10^0 = 1$ and that $10^{-1}=1/10$ and so on. 

On the other hand $0^x = 0$, again at least if we assume that $x>0$. For instance, $0^3 = 0\cdot 0 \cdot 0 = 0$ and $0^{1/3} = \sqrt[3]{0} = 0$. 

So if $0^0$ is to have a specific value, there will be a clash between the two rules $x^0=1$ and $0^x=0$. One of them suggests that $0^0$ should be 1, the other that it should be zero. 

Moreover, this clash manifests itself in the exercises of the typical calculus course, where we're asked to compute things like \[ \lim_{x\to 0+} (\sin x)^{1/\log x} = e \approx 2.72.\] This limit has the form of something raised to a power, where both the base and the exponent tend to zero. Many textbooks make a big deal out of the fact that this doesn't determine the limit, listing $0^0$ as an "indeterminate form" along with truly meaningless expressions like $0/0$ and $\infty - \infty$. This has led to a widespread belief that $0^0$ can't consistently be assigned a value. 

Probably algebra has a part in this too: We're taught that \[ \frac{x^5}{x^2} = x^3,\] just subtract one exponent from the other. And lo and behold, \[ \frac{x^2}{x^2} = x^0 = 1,\] except there's a problem when $x=0$, because then there's a zero in the denominator of the left hand side. So it seems that whenever $0^0$ shows up, there's something fishy going on. 

It's just that that's not true. "Indeterminate forms" aren't really a thing, they're basically just lists of common beginner's mistakes. Or if we're a bit cynical, lists of ways an examiner might try to trick you on a test. We can't make $0^0$ agree with a limit of $x^y$ at $x=y=0$, but that's not a conundrum, that's a discontinuity. Discontinuities exist. There was never a theorem that everything is continuous in the first place. And denominators that might be zero is a different matter altogether. If that's the issue, the equation $x^5/x^2 = x^3$ is just as problematic.

In reality, zero to the zeroth power is virtually omnipresent, and the pattern is the same every time: We want $x^0$ to be equal to 1 always. And we want $0$ to a power to have the exceptional value 1 precisely when the exponent is zero.

Fundamentally this is because $0^n$ answers the question "If you put an apple on a table and then $n$ times perform the operation of removing all the apples from the table, how many apples are then on the table?" (answer: If you never removed it, it's still there, otherwise it's gone). If we trace mathematics down to its logical foundations, this is the sort of thing we encounter. Everything else, like $e^{i\sqrt{\pi}}$ and so on, is built on top of that. Therefore not only is it "often useful" to let $0^0=1$. It's also completely safe and the only option that doesn't leave us with a mess of exceptions. 

Famous examples where we can't really avoid $0^0$ include Taylor series like
\[e^x = \sum_{n=0}^\infty \frac{x^n}{n!},\] and the binomial theorem \[ (x+y)^n = \sum_{k=0}^n\binom{n}{k}x^ky^{n-k}.\] In both cases we want the factor $x^0$ to be 1 if $x=0$, otherwise we get the wrong thing.

More generally, $x^0 = 1$ is a building block of polynomials and power series, which play a major role in algebra, analysis, and discrete mathematics. Powers of zero on the other hand occur naturally only when the exponent is a nonnegative integer. Therefore there's no issue of continuity in the exponent, and $x^0=1$ takes precedence over $0^n=0$.  

I recently stumbled upon something involving so-called Stirling numbers, that count ways of partitioning $n$ objects into a given number of nonempty subsets. For instance, the number of partitions of $1, 2, \dots, n$ into 3 nonempty subsets is given by the formula \[\frac{3^n - 3\cdot 2^n + 3}6,\] or so it would seem. Here if we plug in $n=1, 2, 3, 4$, we get the numbers $0, 0, 1, 6$, which makes sense: We don't distinguish the three parts (hence the division by 6), but we do require them to be nonempty, which means $n$ must be at least 3 before it's possible at all.

But if we set $n=0$ we get the nonsense value $1/6$ which isn't even an integer. At this point I hear you asking why any sane person would consider partitioning an empty set into nonempty parts. Can I really complain about a nonsense answer to that? The problem was that this occurred inside a loop where my computer program added together some stuff that I didn't look at case by case myself. 

Or rather, that would have been the problem. But luckily I knew what the real formula is. It's not the one above, but rather \[ \frac{3^n - 3\cdot 2^n + 3\cdot 1^n - 0^n}6.\] Not only does this produce the correct value also when $n=0$, but it reveals the pattern that explains what the formula for any given number of parts will look like, as well as why it's true (if you don't see it, don't worry).  

Notice that the formula involving $0^n$ is the one that lets you sleep at night. It's if you would use the other one, or (imagine the horror!) if your computer algebra system wouldn't recognise that $0^0=1$, that you'd have to worry that something might go wrong.

But can we be certain that $0^0=1$ makes sense every time?  

A "foundational" answer (already hinted at) is yes, because arithmetic is built from just a few basic principles, one of which is that an empty product is equal to 1 (there are numerous ways of formulating the details). Since the more sophisticated stuff already rests logically on that basis, a fundamental thing like $0^0$ can't possibly jump up and bite us from behind. 

More philosophically, we can compare mathematics to things like, say, traffic regulations, English grammar, or a toolkit for the household. Those things are man-made and there's no fundamental reason they must work. If we're not careful they won't, and if something weird occurs, we might actually want to fix it with a patchwork of exceptions.  

Mathematics is not like that. It's not a mish-mash of compromises and conventions. It works whether or not we understand why. It doesn't break if we do something that wasn't intended, and it can be explored: If you establish a formula, it will give me the right answer even if I plug in some numbers that you never thought of. Like zero to the zeroth power.


That was it really, but for reference, I'd like to return briefly to debunking mode and specifically comment a Numberphile video that I've seen links to several times. I love Numberphile, but they don't tend to get things right as often as some of my other favourites like Mathologer, Vi Hart, 3blue1brown and Up and Atom.

Matt Parker explains the clash of $x^0$ versus $0^x$ about 7 minutes into the video, but then goes on to discuss not $x^y$, but $x^x$, as $x$ approaches zero.

I guess what annoys me is how the idea that something is "controversial" seems to gain support every time someone is confused, regardless of what the confusion is about. Presenting "$0^0$ undefined" as some sort of grown up middle-of-the-road alternative reminds me of things like "Teaching the Controversy". 

The discussion of $x^x$ is already beside the point, as it won't display anything worse than the discontinuity already demonstrated. But it's also wrong, which oddly enough just seems to make people more willing to agree with the conclusion.

Let me just point to the irony in using $x^x$ for complex $x$ in order to argue that there's no unique correct value for $x=0$. Parker states that $\lim x^x = 1$ as $x\to 0$ also from the negative side. But there we definitely do have an issue. For instance, there are two equally valid candidates for $(-1/2)^{-1/2}$ (the one with some status of default is the one with negative imaginary part, $-i\cdot \sqrt{2}$). And as we approach zero it just gets worse. 

It's true that we can choose default values in such a way that the stated limit from the negative side is correct, but in that case the limit will be 1 along any curve approaching zero in the complex plane. To the extent that it matters, that would seem to support $0^0=1$. 

It's also true that we could find a weird region in the complex plane that includes an interval of the real line and spirals wildly towards zero, so that if we extend $x^x$ analytically from the particular real interval to that region, the function will go haywire as we approach zero. But then it will do so also for some positive real numbers, for instance picking the negative square root of $1/2$ as the value of $(1/2)^{1/2}$, or worse.   

In any case, no, the fact that subtleties of complex analysis can be confusing doesn't mean there's a problem with $0^0$.









No comments:

Post a Comment