TExcelTAD
Home › Basic Math & Pre-Algebra › Zero and Negative Exponents

Zero and Negative Exponents

What could 505^0 or 2−32^{-3} possibly mean? You cannot multiply "zero copies" or "minus three copies" of a number. Yet both have one sensible value, and it is the value that keeps the exponent laws working. This lesson shows where those values come from and where programmers use them.

Follow the pattern

Walk down a list of powers of 2. Each step down the exponent divides by 2:

23=822=4÷221=2÷220=1÷22−1=12÷22−2=14÷22−3=18÷2\begin{aligned} 2^3 &= 8 \\ 2^2 &= 4 && \div 2 \\ 2^1 &= 2 && \div 2 \\ 2^0 &= 1 && \div 2 \\ 2^{-1} &= \frac{1}{2} && \div 2 \\ 2^{-2} &= \frac{1}{4} && \div 2 \\ 2^{-3} &= \frac{1}{8} && \div 2 \end{aligned}

Continuing the pattern past 212^1 gives 20=12^0 = 1 and then fractions. Nothing else would keep the "divide by 2 each step" rule.

The two definitions

For any nonzero number aa and whole number nn:

Rule Meaning Examples
a0=1a^0 = 1 anything (nonzero) to the zero power is 1 70=17^0 = 1, (−3)0=1(-3)^0 = 1, 10000=11000^0 = 1
a−n=1ana^{-n} = \frac{1}{a^n} a negative exponent means "one over" 10−2=110010^{-2} = \frac{1}{100}, 3−1=133^{-1} = \frac{1}{3}

Both follow from the quotient law am÷an=am−na^m \div a^n = a^{m-n}:

a3÷a3=1(anything divided by itself)a3÷a3=a3−3=a0(quotient law)so a0=1a2÷a5=a⋅aa⋅a⋅a⋅a⋅a=1a3a2÷a5=a2−5=a−3so a−3=1a3\begin{aligned} a^3 \div a^3 &= 1 && \text{(anything divided by itself)} \\ a^3 \div a^3 &= a^{3-3} = a^0 && \text{(quotient law)} \quad \text{so } a^0 = 1 \\[1ex] a^2 \div a^5 &= \frac{a \cdot a}{a \cdot a \cdot a \cdot a \cdot a} = \frac{1}{a^3} \\ a^2 \div a^5 &= a^{2-5} = a^{-3} && \text{so } a^{-3} = \frac{1}{a^3} \end{aligned}

A negative exponent never makes the number negative. 2−3=182^{-3} = \frac{1}{8} is a small positive number. The minus sign in the exponent means "reciprocal", not "negative".

python · try it yourself
from fractions import Fraction

print("2 ** 0  =", 2 ** 0)
print("2 ** -3 =", 2 ** -3)
print("as a fraction:", Fraction(2) ** -3)
print("10 ** -2 =", 10 ** -2)
print("(2/3) ** -2 =", Fraction(2, 3) ** -2)
print("(-4) ** 0 =", (-4) ** 0)
2 ** 0  = 1
2 ** -3 = 0.125
as a fraction: 1/8
10 ** -2 = 0.01
(2/3) ** -2 = 9/4
(-4) ** 0 = 1

Notice that Python returns a float (0.125) for an integer raised to a negative power, because the result is no longer a whole number. Use Fraction when you want the exact 18\frac{1}{8}.

Note: A fraction to a negative power flips: (ab)−n=(ba)n\left(\frac{a}{b}\right)^{-n} = \left(\frac{b}{a}\right)^n. So (23)−2=(32)2=94\left(\frac{2}{3}\right)^{-2} = \left(\frac{3}{2}\right)^2 = \frac{9}{4}.

What about 000^0?

Zero to a negative power is undefined (0−1=100^{-1} = \frac{1}{0}, division by zero). The case 000^0 is a matter of convention. In counting and in most programming languages it is defined as 1, because that makes formulas like polynomials and the binomial theorem work without special cases:

python · try it yourself
import math

print("0 ** 0       =", 0 ** 0)
print("math.pow(0,0)=", math.pow(0, 0))
try:
    print(0 ** -1)
except ZeroDivisionError as e:
    print("0 ** -1 ->", type(e).__name__ + ":", e)
0 ** 0       = 1
math.pow(0,0)= 1.0
0 ** -1 -> ZeroDivisionError: 0.0 cannot be raised to a negative power

All laws still hold

With these definitions the exponent laws keep working for any integers, positive, zero or negative:

python · try it yourself
from fractions import Fraction

a = Fraction(3)
for m, n in [(4, -4), (-2, 5), (-1, -2), (0, 6)]:
    left = a**m * a**n
    right = a**(m + n)
    print(f"3^{m} * 3^{n} = {left}   3^({m + n}) = {right}")
3^4 * 3^-4 = 1   3^(0) = 1
3^-2 * 3^5 = 27   3^(3) = 27
3^-1 * 3^-2 = 1/27   3^(-3) = 1/27
3^0 * 3^6 = 729   3^(6) = 729

In software

  • Metric prefixes are powers of ten with negative exponents: a millisecond is 10−3 s10^{-3}\ \text{s}, a microsecond 10−6 s10^{-6}\ \text{s}, a nanosecond 10−9 s10^{-9}\ \text{s}. Latency dashboards switch between them constantly.
  • Binary fractions. Floating-point numbers store values as sums of 2−1,2−2,2−3,…2^{-1}, 2^{-2}, 2^{-3}, \ldots That is why 0.5 (2−12^{-1}) and 0.375 (2−2+2−32^{-2} + 2^{-3}) are exact in a float but 0.1 is not; see Floating Point.
  • Decay and discounting. A learning-rate schedule or an "every step multiply by 0.5" fade is ana^n with a<1a < 1; the same value can be written 2−n2^{-n}.
  • Empty products. math.prod([]) returns 1 for the same reason a0=1a^0 = 1: multiplying no numbers at all leaves the starting value 1.

Exercises

Exercise 1: Evaluate

Compute 909^0, 4−14^{-1}, 10−310^{-3}, 2−52^{-5} and (15)−2\left(\frac{1}{5}\right)^{-2}.

Answer

1, 14\frac{1}{4}, 11000=0.001\frac{1}{1000} = 0.001, 132=0.03125\frac{1}{32} = 0.03125, 25.

Solution
90=14−1=141=1410−3=1103=11000=0.0012−5=125=132=0.03125(15)−2=(51)2=25a negative power flips the fraction\begin{aligned} 9^0 &= 1 \\ 4^{-1} &= \frac{1}{4^1} = \frac{1}{4} \\ 10^{-3} &= \frac{1}{10^3} = \frac{1}{1000} = 0.001 \\ 2^{-5} &= \frac{1}{2^5} = \frac{1}{32} = 0.03125 \\ \left(\frac{1}{5}\right)^{-2} &= \left(\frac{5}{1}\right)^2 = 25 && \text{a negative power flips the fraction} \end{aligned}

Exercise 2: Rewrite without negative exponents

Rewrite x−4x^{-4}, 3y−23y^{-2}, and a3b−2a^3b^{-2} using only positive exponents.

Answer

1x4\frac{1}{x^4}, 3y2\frac{3}{y^2}, a3b2\frac{a^3}{b^2}.

Solution

The negative exponent belongs only to the base right under it. In 3y−23y^{-2} the 3 is not raised to anything, so only yy moves to the denominator: 3⋅(1y2)=3y23 \cdot \left(\frac{1}{y^2}\right) = \frac{3}{y^2}. Likewise a3b−2=a3⋅1b2=a3b2a^3b^{-2} = a^3 \cdot \frac{1}{b^2} = \frac{a^3}{b^2}.

Exercise 3: Simplify

Simplify 25⋅2−82^5 \cdot 2^{-8} and give the result as a fraction.

Answer

2−3=182^{-3} = \frac{1}{8}.

Solution
25⋅2−8=25+(−8)=2−3=123=182^5 \cdot 2^{-8} = 2^{5+(-8)} = 2^{-3} = \frac{1}{2^3} = \frac{1}{8}
python · try it yourself
from fractions import Fraction
print(Fraction(2) ** 5 * Fraction(2) ** -8)
1/8

Exercise 4: Time units

A request takes 3.2×10−33.2 \times 10^{-3} seconds. Write it in milliseconds and in microseconds.

Answer

3.2 ms=3200 μs3.2\ \text{ms} = 3200\ \mu\text{s}.

Solution

One millisecond is 10−3 s10^{-3}\ \text{s}, so 3.2×10−3 s=3.2 ms3.2 \times 10^{-3}\ \text{s} = 3.2\ \text{ms}. One microsecond is 10−6 s10^{-6}\ \text{s}, so divide by 10−610^{-6}: 3.2×10−3÷10−6=3.2×10−3+6=3.2×103=3200 μs3.2 \times 10^{-3} \div 10^{-6} = 3.2 \times 10^{-3+6} = 3.2 \times 10^3 = 3200\ \mu\text{s}.

Test yourself

What is 6−26^{-2}?

  1. −36
  2. −12
  3. 136\frac{1}{36}
  4. 112\frac{1}{12}

What is (−12)0(-12)^0?

  1. 1
  2. 0
  3. −1
  4. −12

Which equals (34)−2\left(\frac{3}{4}\right)^{-2}?

  1. −916-\frac{9}{16}
  2. 916\frac{9}{16}
  3. 169\frac{16}{9}
  4. −169-\frac{16}{9}