A power is a count of equal factors. Derive the product, quotient and power-of-a-power rules by counting, see why zero, negative and fractional exponents must mean what they do, and read scientific notation such as Python’s 3e-4.
Evaluate a whole-number power by repeated multiplication, and name its base and its exponent.
Derive the product, quotient and power-of-a-power rules by counting factors, and use them to simplify.
Explain why a zero exponent gives 1, a negative exponent gives a reciprocal and an exponent of one half gives a square root.
Write a number in scientific notation and read Python’s e notation, such as 3e-4.
In review. The maths and code on this page are checked by automated tests on every change, but an independent reader has not signed it off yet. Spot a mistake or a confusing step? Tell us.
The question
A training script sets its learning rate to 3e-4, and the memory of a computer is counted in steps of 1,024. Both numbers are powers: \({3 \times 10^{-4}}\) and \(2^{10}\). A whole-number power is easy, because \(2^{10}\) is ten 2s multiplied together. But what can ten to the power minus four mean? Nobody can multiply ten by itself minus four times. This lesson finds the answer by asking one simple rule to keep working.
Intuition
A power is a short way to write a product of equal factors. In \(2^3\) the number 2 is the base, the factor being repeated, and the small raised 3 is the exponent, the number of factors:
\[
2^3 = 2 \times 2 \times 2 = 8 .
\]
Read it as “2 to the power 3”, or “2 cubed”. A power with exponent 2 is read “squared”. You met whole-number powers in M01.1.2; this lesson finds their rules.
Draw each factor as a tile. Then \(2^3\) is a row of three tiles and \(2^4\) is a row of four. To multiply the two powers, put the rows end to end.
M01.4.1-F1
A power counts factors. Multiplying \(2^3\) by \(2^4\) joins a row of three factors to a row of four, so the result has seven: \({2^7 = 128}\), which is indeed \({8 \times 16}\).
That is the whole idea. An exponent is a count, and counts add when rows are joined. Every rule of this lesson is that picture, and the surprising exponents (zero, negative, a half) are what the rules force on us once we ask them to keep working.
Build it up
Step 1. Multiplying adds the exponents. For any base \(b\) and whole numbers \(m\) and \(n\), the product \(b^m\, b^n\) is a row of \(m\) factors followed by a row of \(n\) factors, so it has \({m + n}\) factors:
\[
b^m \, b^n = b^{m+n} .
\]
Step 2. Dividing subtracts them. In \({2^5 \div 2^2}\), each factor below the line cancels one factor above it (\({2 \div 2 = 1}\)). Two pairs cancel and three factors are left, so \({2^5 \div 2^2 = 2^3}\). In general, when \(m\) is larger than \(n\) and \(b\) is not 0,
\[
b^m \div b^n = b^{m-n} .
\]
Step 3. A power of a power multiplies them.\((2^3)^2\) means \(2^3\) taken as a factor twice: two rows of three factors, six in all. In general \((b^m)^n\) is \(n\) rows of \(m\), so
\[
(b^m)^n = b^{mn} .
\]
M01.4.1-F2
Step frames for the other two rules. Left: dividing cancels factors in pairs, so the counts subtract. Right: a power of a power stacks rows of factors, so the counts multiply.
Step 4. Different bases, same exponent. The factors of a product can be regrouped (M01.1.2):
Step 5. Walk down the ladder. Write the powers of 2 in a row. Each step to the right multiplies by 2: \({2^1 = 2}\), \({2^2 = 4}\), \({2^3 = 8}\). So each step to the left must divide by 2. Walk left from \({2^1 = 2}\) and you reach \({2^0 = 1}\), then \({2^{-1} = \tfrac12}\), then \({2^{-2} = \tfrac14}\).
M01.4.1-F3
The ladder of powers of 2. Stepping right multiplies by 2, so stepping left divides by 2. That makes \({2^0 = 1}\) and \({2^{-1} = \frac12}\), and a half step must multiply by \(\sqrt2\).
The ladder has room between its rungs too. Two half steps make one whole step, which multiplies by 2. So a half step multiplies by a number whose square is 2, which is \({\sqrt{2} \approx 1.4142}\). That number is \(2^{1/2}\).
The formal statement
NoteDefinition: a power
For a number \(b\) and a whole number \({n \ge 1}\), the power \(b^n\) is the product of \(n\) factors, each equal to \(b\). The number \(b\) is the base and \(n\) is the exponent.
Counting factors gave three rules, for whole numbers \({m, n \ge 1}\) (with \({b \neq 0}\) and \({m > n}\) wherever we divide):
The definition only covers exponents that count something. Exponents of 0, \({-2}\) or \(\tfrac12\) count nothing, so we are free to choose what they mean. There is exactly one choice that keeps the three rules true, and each step below finds it. Take \(b\) positive from here on.
A zero exponent. Put \({m = n}\) in the quotient rule:
\[
b^n \div b^n = b^{n-n} = b^0 .
\]
The left-hand side is a number divided by itself, which is 1. So the rule forces \({b^0 = 1}\), for every base except 0.
A negative exponent. Ask the product rule to work with \({m = -n}\):
\[
b^{-n} \, b^{n} = b^{-n+n} = b^0 = 1 .
\]
So \({b^{-n}}\) is the number that gives 1 when multiplied by \(b^n\), which is \(\frac{1}{b^n}\):
So \(b^{1/2}\) is a number whose square is \(b\). It is positive, because the same rule makes it the square of \(b^{1/4}\). So it is the square root \(\sqrt{b}\) of M01.1.2. The same argument with \(n\) factors shows that \(b^{1/n}\) is the \(n\)-th root, the positive number whose \(n\)-th power is \(b\). For instance \({8^{1/3} = 2}\), because \({2^3 = 8}\). Then \({b^{m/n} = \left(b^{1/n}\right)^m}\): take the root, then the power.
With these meanings, the three rules hold for all whole and fractional exponents, and a positive base raised to any of them gives a positive number.
Scientific notation. A positive number is in scientific notation when it is written as \({a \times 10^n}\), with \({1 \le a < 10}\) and \(n\) a whole number, positive, negative or zero (a negative number keeps its minus sign in front). So 0.0003 is \({3 \times 10^{-4}}\) and seven billion is \({7 \times 10^9}\). Python and most software write “times ten to the power” as the letter e: the learning rate 3e-4 is \({3 \times 10^{-4}}\), and 7e9 is \({7 \times 10^9}\). Multiplying two such numbers multiplies the front parts and adds the exponents:
Powers of 2 in memory. Everything in a computer’s memory is stored as bits, each 0 or 1 (P01.1.4), so memory is often counted in powers of 2, and these have names of their own. A kibibyte (KiB) is \({2^{10} = 1024}\) bytes, close to a thousand. A mebibyte (MiB) is \(2^{20}\) bytes, which is 1,048,576, and a gibibyte (GiB) is \(2^{30}\) bytes, which is 1,073,741,824.
Go deeper: powers with exponents that are not fractions
What could \(2^{\sqrt2}\) mean, when \(\sqrt2\) is not a fraction (M01.1.1)? Take fractions that come ever closer to \(\sqrt2\), and the powers settle down too: \({2^{1.4} \approx 2.6390}\), \({2^{1.41} \approx 2.6574}\), \({2^{1.414} \approx 2.6647}\) and \({2^{1.4142} \approx 2.6651}\). The value they settle towards is \({2^{\sqrt2} \approx 2.6651}\). Making “settle towards” exact needs limits, which wait for M04. Every rule of this lesson keeps working for such exponents, and the next lesson uses that freely.
Worked example
Work out \(16^{3/4}\) by hand. The 4 under the line asks for a fourth root; the 3 on top asks for a cube. The power-of-a-power rule lets us do them in either order, since \(\tfrac14\) times 3 and 3 times \(\tfrac14\) are both \(\tfrac34\):
Two routes to \(16^{3/4}\). Taking the root first keeps every number small; taking the power first passes through 4096. Both routes land on 8.
Route 1, root first.\(16^{1/4}\) is the positive number whose fourth power is 16. Since \({2^4 = 16}\), it is 2. Then \({2^3 = 8}\).
Route 2, power first. Multiplying 16 by itself three times gives \({16^3 = 4096}\). Its fourth root is the positive number whose fourth power is 4096. Try 8: \({8^2 = 64}\) and \({64^2 = 4096}\), so \({8^4 = 4096}\), and the root is 8.
Both routes give \({16^{3/4} = 8}\). The root-first route never left small numbers, which is the better habit.
A second example: write \(\tfrac18\) as a power of 2. Since \({8 = 2^3}\), the negative exponent rule gives \({\tfrac18 = \tfrac{1}{2^3} = 2^{-3}}\). On the ladder of the figure above, \(\tfrac18\) is three steps to the left of 1.
Code
First a power built from its definition: start with no factors and multiply one in at each pass of a loop.
def power(base, n):"""base multiplied by itself n times, for a whole number n of 0 or more.""" result =1# no factors yet: an empty product is 1for _ inrange(n): # repeat n times (the name _ means we never use the counter) ... result = result * base # ... multiplying in one more factorreturn resultprint(power(2, 3), power(2, 4), power(2, 7)) # 8 16 128print(power(2, 3) * power(2, 4) == power(2, 7)) # the product rule: Trueprint(power(2, 10), power(2, 0)) # 1024, and 1 for no factors at all
8 16 128
True
1024 1
A negative exponent needs one more line, straight from the rule \({b^{-n} = 1 / b^n}\):
def power_any(base, n):"""base to a whole-number power n, which may be negative."""if n >=0:return power(base, n)return1/ power(base, -n) # b to the minus n is 1 over b to the nprint(power_any(2, -1), power_any(2, -3), power_any(10, -4)) # 0.5 0.125 0.0001
0.5 0.125 0.0001
Python has all of this built in. The operator ** and the function pow both raise to a power, for any exponent:
import mathprint(2**10, pow(2, 10)) # 1024 1024print(2**-3, 10**-4) # a negative exponent gives a float: 0.125 0.0001print(16**0.75) # the worked example: 8.0print(2**0.5, math.sqrt(2)) # two ways to the square root of 2print(3e-4) # e notation: 3 times 10 to the -4, printed 0.0003print(2**10, 2**20, 2**30) # bytes in a KiB, a MiB and a GiBprint(2^10) # careful: ^ is not a power in Python
Two lines deserve a comment. The square root prints as 1.4142135623730951, which is \(\sqrt{2}\) to the 16 or so digits a float holds (P01.2.1). And 2 ^ 10 prints 8, not 1024: in Python ^ combines the binary digits of two whole numbers (it is called XOR), and the power is **.
Explore
This module’s interactive, the log ruler, lives in lesson M01.4.4. Its slide rule lays two lengths end to end to multiply two numbers, which is the product rule of this lesson at work: adding exponents multiplies powers.
Pitfalls
M01.4.1-F5
Wrong beside right. Multiplying the exponents counts a grid of \({3 \times 4}\) factors, which is \((2^3)^4\). The product \({2^3 \times 2^4}\) joins the rows, so its exponents add.
“\({2^3 \times 2^4 = 2^{12}}\).”
The exponents of a product add; they multiply only for a power of a power. Count the factors: \({2^3 \times 2^4}\) has \({3 + 4 = 7}\) factors of 2, so it is \({2^7 = 128}\). The number \({2^{12} = 4096}\) is \((2^3)^4\), four rows of three.
“\({2^{-3}}\) is a negative number.”
A negative exponent means a reciprocal, not a minus sign: \({2^{-3} = \tfrac18 = 0.125}\). A positive base raised to any power stays positive. Machine learning is full of numbers such as \({10^{-4}}\) and \({10^{-8}}\), which are small and positive.
“In Python, 2^10 is 1024, and -2 ** 2 is 4.”
The power operator is **; 2 ^ 10 is a different operation and gives 8. And ** is applied before a minus sign on its left, so -2 ** 2 is \({-(2^2) = -4}\). Write (-2) ** 2 for 4.
“The e in 3e-4 is the number e.”
In 3e-4 the letter e only means “times ten to the power”, so 3e-4 is \({3 \times 10^{-4}}\). The number \({e \approx 2.7183}\) of the next lesson has nothing to do with it.
Check yourself
Recall
1. In \(5^3\), which number is the base and which is the exponent, and what is its value?
Show answer
The base is 5 and the exponent is 3. The value is three 5s multiplied together, 125.
2. State the product rule of powers and say why it is true.
Show answer
\({b^m\, b^n = b^{m+n}}\). The product is a row of \(m\) factors of \(b\) followed by \(n\) more, so it has \({m + n}\) factors.
3. Why must \(7^0\) be 1?
Show answer
The quotient rule with equal exponents gives
\[
7^n \div 7^n = 7^{n-n} = 7^0 ,
\]
and a number divided by itself is 1.
4. What is \({10^{-3}}\) as a fraction and as a decimal?
Show answer
\({\frac{1}{10^3} = \frac{1}{1000} = 0.001}\).
5. What does Python’s 2.5e-3 mean?
Show answer
\({2.5 \times 10^{-3} = 0.0025}\).
Exercises
1.★ Write each as a single power, then evaluate it: \({3^2 \times 3^3}\), then \({5^7 \div 5^5}\), then \((2^2)^3\).
Or note that \({\tfrac12 = 2^{-1}}\), so the power-of-a-power rule gives \({(2^{-1})^{-3} = 2^{3}}\), which is 8.
3.★★★ A language model has \({7 \times 10^9}\) weights, each stored in 4 bytes. (a) How many bytes is that, in scientific notation? (b) Show that a gibibyte, \(2^{30}\) bytes, is about \({1.07 \times 10^9}\) bytes, and estimate the size of the weights in gibibytes.
Show solution
(a) Multiply the front parts and keep the power of ten:
\[
7 \times 10^9 \times 4 = 28 \times 10^9 .
\]
In scientific notation the front part must lie between 1 and 10, so write \({28 = 2.8 \times 10^1}\) and add the exponents: the weights take \({2.8 \times 10^{10}}\) bytes.
Scientific notation:\({a \times 10^n}\) with \({1 \le a < 10}\); Python writes 3e-4.
In Python: the power is ** or pow, never ^.
Sources and next steps
Sources. Each was opened and checked against this lesson on 12 November 2026.
Jay Abramson and others, Algebra and Trigonometry 2e, OpenStax. Section 1.2, Exponents and Scientific Notation, states the product, quotient and power rules, the zero and negative exponent rules and the power of a product rule, and defines scientific notation as \({a \times 10^n}\) with \({1 \le \abs{a} < 10}\). Section 1.3, Radicals and Rational Exponents, defines \(a^{1/n}\) as the \(n\)-th root and \(a^{m/n}\) with the root and the power in either order.
Python Software Foundation, Python 3.12 documentation. Section 6.5 of the language reference, The power operator: ** binds more tightly than a minus sign on its left (-1**2 is -1) and an int raised to a negative int gives a float (10**-2 is 0.01). Section 6.9: ^ is the bitwise XOR. The built-in pow(base, exp) is the same as base**exp, and Section 2.4.6, floating-point literals, gives the exponent part e or E with an optional sign.
NIST, Definitions of the SI units: the binary prefixes. Kibi, mebi and gibi are the factors \(2^{10}\), \(2^{20}\) and \(2^{30}\), named for use in data processing and data transmission; a mebibyte is 1 048 576 bytes and a gibibyte 1 073 741 824 bytes.