Index Ai Academy
Phase 0 · ToolsNumbers for code

Powers, roots and powers of ten

About 20 minLooking ahead: some prerequisites aren't done yet

Why this matters

AI numbers span enormous ranges. A model can have 70,000,000,000 parameters, a learning rate can be 0.0003, and a training set can hold 15 trillion tokens. Powers, and powers of ten in particular, are how people write and reason about numbers that size without losing count of the zeros. Roots undo powers, and they turn up in distances, in spread and inside attention itself. This lesson makes all three feel ordinary.

  • Read and write powers as repeated multiplication, with **
  • Write very large and very small numbers in powers of ten and e-notation, like 3e-4
  • Undo a power with a square root, using ** 0.5
  • Work out how many doublings a growth takes, and what it multiplies to
Quick check
Before any explaining, a guess. ** raises a number to a power. What does this print?
print(10 ** 3, 2 ** 10)

A power is repeated multiplication

2 ** 5 means "multiply 2 by itself, five 2s in all": 2 × 2 × 2 × 2 × 2 = 32. The number being multiplied is the base and the count is the exponent. On paper it's written small and raised, 2⁵, and said "two to the fifth". Two exponents have their own names: x ** 2 is "x squared" (the area of a square with side x), and x ** 3 is "x cubed".

print(2 ** 5)
print(7 ** 2, 7 ** 3)
print(5 ** 1, 5 ** 0)    # anything to the power 1 is itself; to the power 0 is 1

Why is 5 ** 0 equal to 1? Count down: 5³ is 125, 5² is 25, 5¹ is 5. Each step divides by 5, so the next step, 5⁰, is 5 ÷ 5 = 1. That pattern holds for any base except 0.

Exponents add when you multiply powers of the same base: 2³ × 2⁴ = 2⁷, because it's three 2s and then four more. That's why 10³ × 10⁶ = 10⁹: a thousand millions is a billion.