Sub topic 5
Raising a Product to a Power
This chapter assumes you can multiply and divide integers and fractions, follow the order of operations, and use variables. It also assumes you know the product rule (a^m · a^n = a^(m+n)) and the power-of-a-power rule ((a^m)^n = a^(mn)) from earlier chapters. Here you will learn the rule for a power applied to a product, why it holds, where it stops holding, and how to combine it with the other rules.
The rule
When a product is raised to a power, each factor is raised to that power:
(ab)^n = a^n · b^n
In this chapter n is a positive integer unless stated otherwise. The negative and zero cases come later.
Numbers show the pattern. (2 · 5)^2 means 10^2, which is 100. Raising each factor separately gives 2^2 · 5^2 = 4 · 25 = 100. Both routes give the same value.
Why it works
An exponent counts repeated multiplication, so (ab)^3 means the product ab used as a factor three times:
(ab)^3 = (ab)(ab)(ab)
Multiplication can be reordered (commutativity) and regrouped (associativity). You can therefore collect all the a's and all the b's:
(ab)(ab)(ab) = (a · a · a)(b · b · b) = a^3 · b^3
The same argument works for any positive integer n. Writing ab n times produces n copies of a and n copies of b. Collecting them gives a^n b^n.
This derivation depends on commutativity. That is why the rule holds for ordinary numbers but needs extra care for objects that do not commute, such as matrices. You will not meet those in this tutorial.
from fractions import Fraction
a, b, n = Fraction(3), Fraction(5), 4
print((a * b)**n) # 50625
print(a**n * b**n) # 50625Both lines print 50625, so the rule holds for this choice of numbers. One example is a check, not a proof. The derivation above is the proof.
More than two factors
The rule extends to any number of factors:
(abc)^n = a^n · b^n · c^n
You can see this by grouping: (abc)^n = ((ab)c)^n = (ab)^n c^n = a^n b^n c^n. Applying the two-factor rule twice gives the result, and the same argument works for four factors or more.
Coefficients and powers inside the parentheses
Most expressions you will simplify contain numerical coefficients and variables that already have exponents. Treat every factor inside the parentheses the same way. Apply the outer exponent to each factor, then use the power-of-a-power rule on any factor that already has an exponent.
Take (3x^2)^3. The factors are 3 and x^2.
- Raise the coefficient: 3^3 = 27.
- Raise the variable part: (x^2)^3 = x^(2·3) = x^6.
- Combine: 27x^6.
A frequent slip is to raise only the variable and forget the coefficient, which gives 3x^6. The coefficient is a factor like any other, so it gets the exponent too.
Here is a case with several factors: (3x^2 y)^4.
- 3^4 = 81
- (x^2)^4 = x^8
- y^4, because y means y^1 and (y^1)^4 = y^4
The result is 81x^8 y^4.
A table of the pieces helps while you are learning:
| Factor inside | Exponent applied | Result |
|---|---|---|
| 3 | 3^4 | 81 |
| x^2 | (x^2)^4 | x^8 |
| y | y^4 | y^4 |
Signs and the factor -1
A minus sign in front of a variable acts as a factor of -1. So (-x)^n = (-1)^n · x^n. The sign of the result depends on whether n is even or odd:
- If n is even, (-1)^n = 1, so (-x)^n = x^n.
- If n is odd, (-1)^n = -1, so (-x)^n = -x^n.
Examples:
- (-3x)^2 = (-3)^2 x^2 = 9x^2
- (-3x)^3 = (-3)^3 x^3 = -27x^3
- (-2x^2)^3 = (-2)^3 · (x^2)^3 = -8x^6
Parentheses decide what the exponent applies to. In -3^2 the exponent applies only to the 3, and the minus sign is applied afterward. In (-3)^2 the exponent applies to -3.
print((-3)**2) # 9
print(-3**2) # -9
print((-2)**3) # -8
print(-2**3) # -8Reading the rule backward
The rule works in both directions. When two powers have the same exponent but different bases, you can merge them into one power of a product:
a^n · b^n = (ab)^n
This is useful for mental arithmetic and for tidying expressions.
- 2^5 · 5^5 = (2 · 5)^5 = 10^5 = 100000
- 4^3 · 25^3 = (4 · 25)^3 = 100^3 = 1000000
- x^2 · y^2 = (xy)^2
Compare this with the product rule from earlier. The product rule needs the same base and combines exponents: a^m · a^n = a^(m+n). The rule in this chapter needs the same exponent and combines bases: a^n · b^n = (ab)^n.
Zero and negative exponents
The rule also holds when n is zero or negative, provided every base involved is nonzero. In those cases the exponent definitions apply: a^0 = 1 and a^(-n) = 1/a^n.
For a negative exponent:
(ab)^(-n) = 1/(ab)^n = 1/(a^n b^n) = (1/a^n)(1/b^n) = a^(-n) · b^(-n)
The restriction matters. a^(-n) is undefined when a = 0, because it would mean dividing by zero. If the exponent is negative, neither a nor b may be zero.
For a zero exponent, if a and b are both nonzero then (ab)^0 = 1 and a^0 · b^0 = 1 · 1 = 1. Both sides agree. If a is 0, then a^0 is not defined by the rule, so the right-hand side has no meaning.
from fractions import Fraction
from itertools import product
values = [Fraction(k) for k in (-3, -2, -1, 1, 2, 5)]
for a, b in product(values, repeat=2):
for n in range(-3, 4):
assert (a * b)**n == a**n * b**n
print("rule holds for every tested case")The script tests every pair of nonzero values from the list with exponents from -3 to 3, including 0. It uses exact fractions, so rounding cannot hide a failure. A test like this does not prove the rule, but it quickly catches a mistaken rewrite.
Worked examples
Example 1: a negative exponent inside
Simplify (2x^3 y^(-2))^2.
- Raise each factor to the power 2: 2^2 · (x^3)^2 · (y^(-2))^2.
- Evaluate: 4 · x^6 · y^(-4).
- Rewrite the negative exponent as a reciprocal: 4x^6 / y^4.
The answer is 4x^6 y^(-4), or equivalently 4x^6 / y^4. Many instructors prefer the second form because it has no negative exponents.
Check by substituting x = 3 and y = 2:
- Original: (2 · 27 / 4)^2 = (27/2)^2 = 729/4
- Simplified: 4 · 729 / 16 = 729/4
from fractions import Fraction
x, y = Fraction(3), Fraction(2)
original = (2 * x**3 * y**-2)**2
simplified = 4 * x**6 * y**-4
print(original, simplified, original == simplified) # 729/4 729/4 TrueExample 2: a sign and two groups
Simplify (-2a^2 b)^3 · (ab^3)^2.
- First group: (-2)^3 · (a^2)^3 · b^3 = -8a^6 b^3.
- Second group: a^2 · (b^3)^2 = a^2 b^6.
- Multiply, using the product rule for each base: -8 · a^(6+2) · b^(3+6) = -8a^8 b^9.
This example uses three rules together: power of a product, power of a power, and the product rule. Work in that order. Remove the outer powers first, then combine like bases.
from fractions import Fraction
a, b = Fraction(3), Fraction(2)
original = (-2 * a**2 * b)**3 * (a * b**3)**2
simplified = -8 * a**8 * b**9
print(original == simplified) # TrueExample 3: reading backward
Evaluate 8^4 · (1/2)^4 without a calculator.
The exponents match, so merge the bases: (8 · 1/2)^4 = 4^4 = 256.
Where the rule stops: sums
The rule applies only when the base is a product. It does not apply to a sum or difference:
(a + b)^n ≠ a^n + b^n (in general)
A numerical check shows the failure:
print((2 + 3)**2) # 25
print(2**2 + 3**2) # 13The values differ. Expanding (a + b)^2 gives a^2 + 2ab + b^2. The middle term 2ab is the part that the incorrect rewrite loses.
Before you apply the rule, check what sits directly inside the parentheses. A product, such as 3x or xy^2, allows the rule. A plus or minus sign at the top level of the parentheses does not.
| Expression | Can you split the power? | Why |
|---|---|---|
| (3xy)^2 | Yes | Everything inside is multiplied |
| (3x)^2 · (4y)^2 | Yes, each group separately | Both groups are products |
| (3 + x)^2 | No | The top level is a sum |
| (3x + y)^2 | No | The top level is a sum, even though 3x is a product |
Common errors
- Missing a coefficient: (4x)^2 written as 4x^2. The correct result is 16x^2.
- Adding exponents when you should multiply: (x^2 y)^3 written as x^5 y^3. The exponent 3 multiplies the 2 and gives x^6 y^3.
- Forgetting an implicit exponent: in (xy^2)^3, x has exponent 1, so the result is x^3 y^6.
- Losing a sign: (-2x)^3 written as 8x^3. The correct result is -8x^3.
- Splitting a sum: (x + y)^2 written as x^2 + y^2.
- Confusing the product rule with the rule in this chapter: x^2 · x^3 is x^5 by adding exponents, but (x^2)(y^2) cannot be added at all because the bases differ.
When you suspect a mistake, substitute small numbers into the original and the simplified expression. Use values such as x = 2 and y = 3 and compare. If the two numbers differ, the simplification is wrong. If they match, it is probably right, though one match does not prove it. Using two different sets of values makes a hidden error much less likely.
Summary of the rule
- (ab)^n = a^n b^n: apply the exponent to every factor, including coefficients and signs.
- It extends to any number of factors.
- Read backward, a^n b^n = (ab)^n merges powers that share an exponent.
- It holds for zero and negative exponents when the bases are nonzero.
- It does not apply to sums or differences.
Exercise
Simplify (-3x^2 y^(-1))^3 and write the answer without negative exponents.
Show answer
Raise each factor to the power 3: (-3)^3 · (x^2)^3 · (y^(-1))^3 = -27 · x^6 · y^(-3). Rewriting the negative exponent gives -27x^6 / y^3.
Exercise
Evaluate 2^4 · 5^4 · (1/10)^4 without a calculator.
Show answer
All three powers share the exponent 4, so merge the bases: (2 · 5 · 1/10)^4 = 1^4 = 1.
Exercise
A student simplifies (2x + 3y)^2 as 4x^2 + 9y^2. Explain the error, then find a pair of values for x and y that shows the two expressions are different.
Show answer
The power was distributed over a sum, which the rule does not allow. The correct expansion is 4x^2 + 12xy + 9y^2, so the term 12xy is missing. Try x = 1 and y = 1: the original is (2 + 3)^2 = 25, while the student's answer is 4 + 9 = 13.