Learning Objectives
By the end of this section, you will be able to:
- Define a power function and tell it apart from an exponential function .
- Recognize the qualitative shape of for any real exponent — including negative and fractional — at a single glance.
- Use the log-log trick to turn any power law into a straight line and read off the exponent.
- Apply scaling laws to real phenomena: the square–cube law in biology, Kepler's third law, the inverse-square law of gravity and light, and Kleiber's law of metabolism.
- Preview the power rule and compute the slope of a power function at any point.
- Implement these ideas in Python: plot the family, and fit an unknown exponent from data.
The Big Picture: One Knob, A Whole Universe
"If you can change one number and watch the entire shape of the world change with it, you have found a power function."
A power function is a function with exactly one moving part: an exponent. Write it as , and everything you care about — whether the curve grows or shrinks, how fast, what it does near zero, what it does at infinity, whether doubling the input doubles the output or makes it eight times bigger — is decided by the single number . The coefficient just stretches the picture vertically.
The mental model
Think of as a shape dial and as a volume knob. Sliding morphs the curve through every shape that nature seems to prefer: lines, parabolas, cubes, square roots, hyperbolas. Sliding only changes the loudness.
Why this one family keeps reappearing
When a system has no preferred scale — when zooming in by a factor of 10 just rescales the picture rather than revealing new structure — the laws that govern it are power laws. That is why the same algebra describes phenomena that look unrelated:
🌍 Physics
- Gravity:
- Light intensity:
- Stefan–Boltzmann:
- Kinetic energy:
🐘 Biology
- Kleiber:
- Heart rate:
- Lifespan:
- Bone strength:
🪐 Astronomy
- Kepler 3rd:
- Black-body flux:
- Galaxy luminosity vs mass:
🏙️ Cities, networks, data
- Zipf's law for word frequency:
- Pareto wealth distribution
- Neural-network scaling laws: loss ∝ params^(−α)
Mathematical Definition
A power function is any function of the form
where is a real constant (the coefficient) and is a real constant (the exponent). The input is the only variable.
Power function vs exponential function — never confuse these
Both involve raising-to-a-power, but the variable lives in different places:
| Function | Form | Variable is | Constant is |
|---|---|---|---|
| Power | f(x) = k · x^n | the base x | the exponent n |
| Exponential | f(x) = a^x | the exponent x | the base a |
The classic trap
is a power function (variable base). is an exponential function (variable exponent). They look almost identical on paper. They behave nothing alike for large : , but . Exponentials beat any power function eventually.
The Power Function Explorer
Before any algebra, build the intuition with your hand. Drag the slider through the whole range. Watch the curve morph continuously between every shape we'll catalogue below. Try the preset buttons. Drag and notice how the orange tangent rotates — that's the derivative we'll meet at the end of the section.
Power Function Explorer — f(x) = k · xn
drag the sliders. drag x₀ to inspect the slope.Three things to notice
- Every curve with passes through . Reason: for any . This is the pivot of the family.
- For the curve hugs the x-axis near zero. For it shoots straight up to infinity at zero — that's a vertical asymptote.
- The tangent slope at equals exactly . You can read off the exponent by measuring slope at .
A Tour Through the Family
Now let's name what you just saw on the explorer. With for simplicity, every value of the dial lands somewhere on this map:
| Exponent n | Function | Shape | Behavior near 0 | Behavior at ∞ |
|---|---|---|---|---|
| n = 0 | f(x) = 1 | horizontal line | y = 1 | y = 1 |
| 0 < n < 1 (e.g., 1/2) | f(x) = √x | concave-down root | approaches 0 vertically | grows, but slowly |
| n = 1 | f(x) = x | straight line, slope 1 | passes through origin | linear growth |
| n = 2 | f(x) = x² | parabola (concave up) | flat at origin | fast growth, ×4 per ×2 of x |
| n = 3 | f(x) = x³ | cubic | very flat at origin | very fast growth, ×8 per ×2 of x |
| n = -1 | f(x) = 1/x | hyperbola, two branches | vertical asymptote | approaches 0 horizontally |
| n = -2 | f(x) = 1/x² | tall hyperbola, both branches positive | vertical asymptote | approaches 0 faster |
The three regimes you should always recognize
n > 1 — accelerating growth
The function grows faster than its input. Doubling more than doubles .
Real example: kinetic energy . Double the speed, quadruple the energy. That's why a 60-mph crash is 4× worse than a 30-mph one.
0 < n < 1 — diminishing returns
The function grows, but each new unit of gives less than the last.
Real example: perceived loudness sound pressure. Crank a stereo from 10 W to 100 W and it sounds only about 4× louder, not 10×.
n < 0 — decay with a wall
The function decreases as grows, and explodes near zero. There is a vertical asymptote at .
Real example: light from a bulb falls off as . Step twice as far away and it's 4× dimmer.
Symmetry: Even, Odd, and Neither
When is an integer, the parity of controls the symmetry of the graph:
- n even (n = 2, 4, 6, …): the graph is symmetric about the y-axis. . Negative inputs produce the same output as their positives.
- n odd (n = 1, 3, 5, …): the graph is symmetric about the origin. . A rotation by 180° leaves the graph unchanged.
- n not an integer (e.g., n = 0.5): the function isn't even defined for negative in the real numbers, because isn't real. Restrict the domain to .
A trick for parity
Why does n even give ? Because , and is for even , for odd. The sign collapses for even, flips for odd. That single line of algebra explains every symmetry you saw.
Worked Example: f(x) = 2x³
Let's put one specific power function under the microscope. Take — a cubic with vertical stretch . We'll evaluate it, compute its slope at three points using the power rule, and verify every number against an explicit table.
▸ Click to expand the full hand calculation
Step 1 — Evaluate the function
Plug each into . By hand:
f(1) = 2 · (1)³ = 2 · 1 = 2
f(2) = 2 · (2)³ = 2 · 8 = 16
f(3) = 2 · (3)³ = 2 · 27 = 54
Step 2 — Find the derivative
The power rule (we'll prove it from first principles in Chapter 4) says . Combine with the constant multiple rule:
Step 3 — Evaluate the slope at each point
f'(1) = 6 · (1)² = 6 · 1 = 6
f'(2) = 6 · (2)² = 6 · 4 = 24
f'(3) = 6 · (3)² = 6 · 9 = 54
Step 4 — Put it in a table
| x | f(x) = 2x³ | f'(x) = 6x² | Interpretation |
|---|---|---|---|
| 0.5 | 0.25 | 1.5 | shallow slope — curve is nearly flat |
| 1 | 2 | 6 | moderate slope — curve picking up speed |
| 2 | 16 | 24 | steep slope — curve rising fast |
| 3 | 54 | 54 | slope equals value (coincidence at x = 3) |
Step 5 — Sanity-check with a numerical limit
At , the slope should be 24. Let's verify via a small secant. Take :
f(2) = 16
[f(2.001) − f(2)] / 0.001 ≈ 0.024012 / 0.001 = 24.012
The secant slope 24.012 is within 0.05% of the true derivative 24. That gap closes to zero as — the same limit we'll build the entire theory of derivatives from in Chapter 4.
Take-away: the same exponent that defines also dictates its slope. Power functions are the simplest functions whose derivative stays inside the same family — differentiate and you get , still a power function.
The Log-Log Trick — How Scientists Discover Hidden Power Laws
Suppose you measure a quantity at several values of and suspect a power law relation , but you don't know . The whole experiment looks like a curved blob on a regular plot. There is a beautiful trick — old, simple, and used everywhere from astrophysics to ML scaling laws — that turns the curve into a straight line.
The derivation in three lines
Start from the hypothesis. Take the logarithm of both sides. Use the identity and :
Now substitute , , :
That is a straight line with slope and intercept . Plotting your data on log-log axes turns the "is this a power law?" question into the much easier "does this look like a straight line?".
The Log-Log Trick — power laws become straight lines
slide n. watch the right plot stay perfectly straight.Reading a log-log plot
- Slope = exponent of the power law.
- Intercept = log of the coefficient. Exponentiate to recover .
- If the cloud is straight, your hypothesis is supported. If it's curved, the law isn't a pure power — perhaps an exponential, perhaps a power law with a cutoff.
Scaling Laws in the Wild
Power functions describe nature's favorite kind of relationship: when one quantity is a fixed-power function of another. Here are four you'll meet again.
1. Kepler's third law — orbital period vs distance
For any planet orbiting the Sun, when is in years and is the semi-major axis in astronomical units. Equivalently:
| Planet | a (AU) | Predicted T = a^(3/2) | Actual T (years) |
|---|---|---|---|
| Mercury | 0.387 | 0.2408 | 0.241 |
| Earth | 1.000 | 1.0000 | 1.000 |
| Mars | 1.524 | 1.8814 | 1.881 |
| Jupiter | 5.203 | 11.8681 | 11.86 |
| Neptune | 30.07 | 164.892 | 164.79 |
Kepler arrived at this empirically in 1619 — a century before Newton showed it falls out of gravity being . Two power laws nested inside each other.
2. The inverse-square law — light, gravity, radio
A point source spreads its energy over the surface of a sphere of radius . Surface area is , so intensity must be :
| Distance r (m) | Relative intensity 1/r² |
|---|---|
| 1 | 1.0000 |
| 2 | 0.2500 |
| 3 | 0.1111 |
| 5 | 0.0400 |
| 10 | 0.0100 |
Step twice as far from the source, get one quarter the brightness. Step ten times farther, get one hundredth. That single number explains why the night sky is dark and why your phone's flashlight is useless past a few meters.
3. Kleiber's law — metabolism vs body mass
Across mammals from mice to elephants, the resting metabolic rate scales as:
| Animal | Mass M (kg) | Relative metabolism M^(0.75) |
|---|---|---|
| Shrew | 0.02 | 0.053 |
| Rabbit | 1 | 1.00 |
| Human | 70 | 24.20 |
| Elephant | 4000 | 502.97 |
An elephant is 200,000× heavier than a rabbit but burns only ~500× more energy per second. Cells in big animals work slower, and that single 3/4 exponent is the reason a mouse's heart races at 600 bpm while an elephant's plods at 30.
4. Neural-network scaling laws
A 21st-century example: empirically, the loss of a well-trained transformer language model decreases as a power of the number of parameters:
with . Doubling parameters knocks the loss down by a fixed factor — the same algebra Kepler used for planets, applied to GPT-class models.
The Square–Cube Law — A Power Function Battle
Two power functions, fighting each other. Take a sphere of radius :
- surface area grows like :
- volume grows like :
The ratio surface-to-volume is what really matters for heat loss, oxygen exchange, and structural load. Divide:
That "3/r" is itself a power function with . So as creatures get bigger, their surface-to-volume ratio shrinks like . Slide the radius and watch the numbers.
Square–Cube Law — why mice can't be elephants
drag radius r. volume races ahead of surface area.Notice: doubling r doubles the ratio's denominator, so SA/V is cut in half. Big animals keep heat in (small SA/V). Small animals lose heat fast (huge SA/V). Same math.
Consequences of one little exponent
- Mice can't be elephants. Surface area per kilogram drops with size, so a giant mouse would overheat — its metabolism (per cell) wouldn't change but its ability to shed heat would collapse.
- Elephants can't be mice. Bone cross-section scales like length2, but body weight like length3. Scale a mouse up 1000× and its leg bones would shatter under its own weight.
- Why insects have no lungs. Their tiny size gives them enormous surface-to-volume ratio. Oxygen diffuses through the body wall fast enough; no pump needed.
Calculus Preview: The Power Rule
Every power function has an absurdly clean derivative. We'll prove it carefully in Chapter 4 using limits, but you can already use it:
Combined with the constant-multiple rule (which we'll also justify):
Why does this make sense?
Look back at the explorer with the tangent on. At , the slope is . So:
- For at , slope = 2.
- For at , slope = 3.
- For at , slope = −1.
Higher exponent ⇒ steeper at the pivot. That is exactly what your eye sees in the interactive plot.
Why it generalizes
The power rule holds for every real — positive, negative, fractional, irrational. The proof for integer uses the binomial theorem; for uses implicit differentiation; and for general real uses the trick . We'll do all three in Chapter 4.
Python: Plotting the Family
Time to translate the math into code. The following script draws six members of the power-function family on a single axis. Read along with the side-by-side cards on the left — every line is annotated, including every NumPy function and its arguments.
Python: Discovering an Exponent from Data
Now the inverse problem: given a cloud of measurements, what power law generated them? The log-log trick makes this a one-line linear fit. We'll use synthetic data so you can verify the fit recovers the truth.
Run it locally and you'll see:
recovered n = 1.5000 (true value: 1.5000) recovered k = 2.0000 (true value: 2.0000)
Common Pitfalls
Power ≠ Exponential
The number-one freshman mistake. is a power function; is an exponential. Their growth rates diverge wildly — for large the exponential always wins.
Negative bases with fractional exponents are not real
is not a real number. If isn't an integer, restrict the domain to (or accept complex outputs).
The point x = 0 is special for negative n
with is undefined at . The function has a vertical asymptote there. Don't evaluate it at zero; don't fit it near zero without thinking.
np.power vs `**` in Python
For pure arrays, both np.power(x, n) and x**n compute element-wise powers. They differ in two places: np.power handles broadcasting more flexibly and gives clearer errors for invalid combinations like np.power(-2, 0.5), which returns nan with a warning. Use whichever reads more clearly — but prefer np.power when the exponent is a NumPy array too.
Summary
Power functions are the "one knob" family. The single exponent controls everything about the shape and is the reason this family describes phenomena from planets to mice to language models.
Key formulas
| Formula | Meaning |
|---|---|
| f(x) = k · x^n | General power function |
| log y = log k + n · log x | Log-log linearization |
| d/dx (x^n) = n · x^(n-1) | Power rule (preview) |
| A/V = 3/r | Square–cube law for a sphere |
| T² = a³ | Kepler's third law |
| I ∝ 1/r² | Inverse-square law |
Key takeaways
- A power function is : variable base, constant exponent. Not the same as an exponential.
- The exponent alone decides whether you get growth, decay, a root, a line, or a hyperbola.
- Every curve in the family pivots through .
- Even integer ⇒ y-axis symmetry. Odd integer ⇒ origin symmetry.
- The log-log trick turns any power law into a straight line of slope . This is how exponents are measured in experiments.
- Scaling laws govern biology (Kleiber), physics (inverse-square), astronomy (Kepler), and modern ML (neural scaling laws).
- The power rule will carry us through all of differential calculus.
Coming Next: Now that you can read the shape of any power function at a glance, we'll meet a different beast — exponential functions — where the variable lives in the exponent and growth becomes truly explosive.