BRAGA

02 Writing02-02 Notes02-02-115

Power of a product

Published 16 Apr 20266 min read
Contents
  1. 01Deep Breakdown
  2. 02Flowchart
  3. 03Real-world use
  4. 04The formula, piece by piece
  5. 05The formula in words
  6. 06Critical Concepts
  7. 07Step-by-step calculation (tiny example)
  8. 08Code examples
(ab)m=ambm(ab)^m = a^m b^m
(1)

Deep Breakdown

What it tells me (Situation Awareness): When a product of two (or more) factors is raised to a power, you can distribute the exponent across each factor. (ab)m=ambm(ab)^m = a^m b^m. This is how exponentiation distributes over multiplication — the same way multiplication distributes over addition. It comes up when working with compound rates (e.g., total rate = rate_A × rate_B, then raise both to a power), scaling transformations in feature engineering, and simplifying expressions in log-space.

Flowchart

Start: (ab)^mExpand: ab * ab* ... (m times)Rearrange:(a*a*...*a) *(b*b*...*b)Count a's: mcopies - a^mCount b's: mcopies - b^mResult: a^m *b^m

Real-world use

Where it is used

Decomposing compound probability expressions, distributing scale factors in transformations, and simplifying expressions where a product is repeatedly squared or cubed (e.g., in Mahalanobis distance or covariance matrix scaling).

Problem it solves

Without this rule, computing (ab)m(ab)^m for large mm requires expanding the full product. The rule lets you compute ama^m and bmb^m independently and multiply — useful when aa and bb are each simpler to evaluate alone.

How it solves the problem

By rearranging multiplication (which is associative and commutative): (ab)m=ab⋅ab⋯ab⏟m=a⋯a⏟m⋅b⋯b⏟m=ambm(ab)^m = \underbrace{ab \cdot ab \cdots ab}_{m} = \underbrace{a \cdots a}_{m} \cdot \underbrace{b \cdots b}_{m} = a^m b^m.

Example in a business

An e-commerce revenue model: daily revenue = price × volume. If both price and volume grow by factor rr per month, after tt months total revenue scales as (r⋅r)t=r2t(r \cdot r)^t = r^{2t}. Using the power-of-a-product rule: (pricegrowth×volumegrowth)t=pricegrowtht×volumegrowtht(price_growth \times volume_growth)^t = price_growth^t \times volume_growth^t — you can audit each factor's contribution separately before combining.

The formula, piece by piece

  • aa: first factor in the product
  • bb: second factor in the product
  • mm: the exponent applied to the entire product
  • (ab)m(ab)^m: the product abab raised to power mm
  • ambma^m b^m: each factor raised to power mm individually
  • Generalizes: (abc)m=ambmcm(abc)^m = a^m b^m c^m for any number of factors Full rule: (ab)m=ambm(ab)^m = a^m b^m for any real aa, bb, and mm

The formula in words

"If you raise a product to a power, you can raise each factor to that power separately and then multiply." (2⋅3)4=24⋅34=16⋅81=1296(2 \cdot 3)^4 = 2^4 \cdot 3^4 = 16 \cdot 81 = 1296 Verify directly: 64=12966^4 = 1296. Same result.

Critical Concepts

  • Only distributes over multiplication, not addition. (a+b)m≠am+bm(a + b)^m \neq a^m + b^m. This is one of the most common algebra errors. The binomial theorem handles (a+b)m(a+b)^m.
  • Works for any number of factors: (abcd)m=ambmcmdm(abcd)^m = a^m b^m c^m d^m.
  • Works for negative and fractional exponents: (ab)−1=a−1b−1=1a⋅1b=1ab(ab)^{-1} = a^{-1} b^{-1} = \frac{1}{a} \cdot \frac{1}{b} = \frac{1}{ab}.
  • Inverse direction: ambm=(ab)ma^m b^m = (ab)^m — you can collapse separate powers into one combined base when exponents match.
  • Useful for standardization: scaling a vector x\mathbf{x} by scalar cc — ∥cx∥2=c2∥x∥2\lVert c\mathbf{x} \rVert^2 = c^2 \lVert \mathbf{x} \rVert^2 comes from this rule.

Step-by-step calculation (tiny example)

Step 1: Identify the product and the exponent Expression: (2⋅3)4(2 \cdot 3)^4. Product = 2⋅32 \cdot 3, exponent = 44.

Step 2: Distribute the exponent to each factor (2⋅3)4=24⋅34(2 \cdot 3)^4 = 2^4 \cdot 3^4.

Step 3: Evaluate and verify 24=162^4 = 16, 34=813^4 = 81, product =16×81=1296= 16 \times 81 = 1296. Direct check: 64=12966^4 = 1296. Confirmed.

Code examples

Beginner example (Python)

python
# Power of a product: (a*b)^m = a^m * b^m
a = 2
b = 3
m = 4
result_product_first = (a * b) ** m   # compute product, then power
result_distribute = (a**m) * (b**m)   # distribute exponent first
print(f"a={a}, b={b}, m={m}")
print(f"(a*b)^m = ({a}*{b})^{m} = {result_product_first}")
print(f"a^m * b^m = {a}^{m} * {b}^{m} = {a**m} * {b**m} = {result_distribute}")
print(f"Match: {result_product_first == result_distribute}")   # Common mistake demo: (a+b)^m != a^m + b^m
print(f"\nCommon mistake: (a+b)^m vs a^m + b^m")
print(f" ({a}+{b})^{m} = {(a+b)**m}")
print(f" {a}^{m} + {b}^{m} = {a**m + b**m} <-- WRONG, not the same!")

Beginner example (R)

r
# Power of a product: (a*b)^m = a^m * b^m
a <- 2
b <- 3
m <- 4
result_product_first <- (a * b)^m
result_distribute <- (a^m) * (b^m)
cat(sprintf("a=%d, b=%d, m=%d\n", a, b, m))
cat(sprintf("(a*b)^m = (%d*%d)^%d = %d\n", a, b, m, result_product_first))
cat(sprintf("a^m * b^m = %d^%d * %d^%d = %d\n", a, m, b, m, result_distribute))
cat(sprintf("Match: %s\n", result_product_first == result_distribute))
cat(sprintf("\nCommon mistake: (%d+%d)^%d = %d vs %d^%d + %d^%d = %d (not equal!)\n", a, b, m, (a+b)^m, a, m, b, m, a^m + b^m))

Professional example (Python)

python
import numpy as np
import pandas as pd

# Scenario: L2 norm scaling — how norm changes when features are scaled
# || c * x ||^2 = c^2 * || x ||^2 (power of a product rule)
np.random.seed(42)
FEATURE_DIM = 5
num_samples = 100
X = np.random.randn(num_samples, FEATURE_DIM)   # raw feature matrix
scales = [0.5, 1.0, 2.0, 5.0, 10.0]
results = []
for c in scales:
    X_scaled = c * X
    norm_sq_direct = np.sum((X_scaled)**2, axis=1).mean()   # ||c*x||^2
    norm_sq_rule = (c**2) * np.sum(X**2, axis=1).mean()     # c^2 * ||x||^2
    results.append({
        "scale_c": c,
        "norm_sq_direct": norm_sq_direct,
        "norm_sq_rule": norm_sq_rule,
        "match": np.isclose(norm_sq_direct, norm_sq_rule),
    })
df = pd.DataFrame(results)
print("L2 Norm Scaling: ||c * x||^2 = c^2 * ||x||^2")
print("(Power of a product rule: (c * x_i)^2 = c^2 * x_i^2)")
print()
print(df.to_string(index=False))
print(f"\nAll match: {df['match'].all()}")

Professional example (R)

r
# L2 norm scaling: ||c*x||^2 = c^2 * ||x||^2
set.seed(42)
FEATURE_DIM <- 5
num_samples <- 100
X <- matrix(rnorm(num_samples * FEATURE_DIM), nrow = num_samples)
scales <- c(0.5, 1, 2, 5, 10)
results <- lapply(scales, function(c) {
  X_scaled <- c * X
  norm_sq_direct <- mean(rowSums(X_scaled^2))
  norm_sq_rule <- c^2 * mean(rowSums(X^2))
  data.frame(scale_c = c, norm_sq_direct = norm_sq_direct, norm_sq_rule = norm_sq_rule,
             match = abs(norm_sq_direct - norm_sq_rule) < 1e-10)
})
df <- do.call(rbind, results)
cat("L2 Norm Scaling: ||c*x||^2 = c^2 * ||x||^2\n")
print(df)
cat(sprintf("\nAll match: %s\n", all(df$match)))

Source: MRAF

#algebra#powers-roots-and-inequalities#powers-and-exponents

Keyboard shortcuts

Single keys, ignored while typing in a field or with Cmd, Ctrl or Alt held.

0
Home
1 2 3 4
Work, Writing, Tools, About
j / k
Next / previous section on this page
n / p
Next / previous project or essay
u
Up one level
l
Deutsch
t
Light or dark theme
?
This list
Esc
Close