Exponents and Roots for ML
An exponent counts repeated multiplication and a root undoes it. Together they set the scale of everything from parameter counts to learning-rate schedules.
Why Does This Exist?
Exponents are how ML talks about scale. A million parameters is . A batch dimension of 1024 is . Halving a learning rate every ten epochs is exponential decay. And roots run the film backwards: standard deviation is the square root of variance, RMS normalisation divides by a root, and every distance is a root of summed squares.
Three combining rules plus the root-as-fractional-power idea cover nearly every computation you will meet. The deep end of powers of two, why big-O expressions are full of them, belongs to computational complexity for ML. The partner operation that asks "which power?" instead of "what power gives?" is the logarithm.
The one idea you need first. Multiplication is repeated addition: is three fours. Exponentiation repeats multiplication instead: is four twos multiplied, .
Think of It Like This
Folding a strip of paper
Fold a paper strip once: 2 layers. Twice: 4. Three times: 8. Each fold doubles the last count, so ten folds give layers, a stack thicker than your fist from a single sheet.
The root is unfolding. Handed a stack of 144 sheets and told each fold doubled it, you ask how many doublings: is the wrong question phrased backwards, it asks the side of a square, but unfolding asks , which has no whole answer. Roots and logarithms split the backwards questions between them: roots undo the squaring, logarithms undo the repeated doubling.
Where it stops: paper refuses after about seven folds, while numbers keep doubling forever. The analogy shows the growth; only the arithmetic shows how violent it gets by fold 30, past a billion.
How It Actually Works
The definition: multiplies copies of , so . Three laws do the combining. Multiplying powers of the same base adds exponents: , so . Raising a power multiplies exponents: , so , one million. Dividing subtracts: . Two edge cases finish the system: for any nonzero , and , so .
A root is a fractional power. The square root asks which number squared gives : because . The cube root is . Roots inherit every power law, which is why .
Worked example: powers of two and a memory budget
Build from : . That is why 1024, not 1000, sits under every batch size and embedding dimension.
Now a budget: one million parameters at 4 bytes each. bytes, about MB. At 2 bytes (half precision) it halves to MB. Exponent notation turns the budget into one multiplication instead of counting zeros.
Code
print(2**10) # -> 1024print(2**3 * 2**4) # -> 128print(144**0.5) # -> 12.0
params: int = 10**6print(params * 4) # -> 4000000The third line uses the fractional-power form of the root, the one worth internalising. The last line counts bytes for a million-parameter model in full precision: four million, or 4 MB.
Watch Out For
Distributing a power over a sum
is not . With : the left side is , the right side is . The missing is the cross term, and it is exactly what variance expansions and quadratic features are made of.
Expand by hand on small numbers whenever a derivation squares a sum. If a loss decomposition drops the cross term without justification, the math is wrong.
The square root of a square is the absolute value
is , not . For : and , the sign is gone. Code that "simplifies" a root of a square introduces a sign flip on every negative input, and norms rely on this behaviour deliberately.
Keep the absolute value in any hand-derived simplification. When a distance comes out negative, this is the first line to check.
The Quick Version
- multiplies copies; same-base powers combine by adding, multiplying or subtracting exponents.
- and ; is why computing loves powers of two.
- Roots are fractional powers: , and they obey the same laws.
- keeps a cross term; dropping it silently breaks derivations.
- ; the sign does not survive the round trip.