Euler's Number (e) — Why AI Uses 2.71828
Euler's Number: e ≈ 2.71828
What it is, where it comes from, and why it appears everywhere in AI.
What is e?
A mathematical constant (like π). The base of natural growth.
e = 2.71828182845904523536...
Irrational (never ends, never repeats)Where It Comes From — Compound Interest
Question: What happens if you compound $1 at 100% interest continuously?
Compound once (n=1): (1 + 1/1)¹ = 2.000
Compound twice (n=2): (1 + 1/2)² = 2.250
Compound 4 times (n=4): (1 + 1/4)⁴ = 2.441
Compound 12 times (n=12): (1 + 1/12)¹² = 2.613
Compound 365 times: (1 + 1/365)³⁶⁵ = 2.715
Compound ∞ times: → e = 2.71828...
e = lim(n→∞) (1 + 1/n)ⁿStep by Step: n=2 (compound twice)
Split 100% into 2 equal parts → 50% each period
Start: $1.00
After 6 months: $1.00 × 1.50 = $1.50 (50% of $1.00)
After 12 months: $1.50 × 1.50 = $2.25 (50% of $1.50!)
Extra $0.25 = interest earned ON interest
This is compounding!
n=1: 100% of $1.00 = $2.00
n=2: 50% twice, but second 50% applies to $1.50 = $2.25Why It Converges (Doesn't Go to Infinity)
Extra gain from each additional split DECREASES:
n=1 → n=2: +$0.250
n=2 → n=4: +$0.191 ← less
n=4 → n=12: +$0.172 ← even less
n=12 → n=365: +$0.102 ← smaller
n=365 → n=∞: +$0.003 ← tiny
More splits help, but each additional split helps LESS.
Total converges to e = 2.71828, never reaches 3.The MAGIC Property of e
eˣ is the only function whose derivative equals itself:
f(x) = eˣ
f'(x) = eˣ ← same!
No other base does this:
f(x) = 2ˣ → f'(x) = 0.693 × 2ˣ (not itself)
f(x) = 3ˣ → f'(x) = 1.099 × 3ˣ (not itself)
f(x) = eˣ → f'(x) = 1.000 × eˣ (exactly itself!)
e is the unique base where value = slope at every point.Where e is Used in AI
FormulaNameWhy e?1/(1+e^(-x))SigmoidSmooth 0→1, clean derivativeeˣⁱ / ΣeˣʲSoftmaxScores → probabilities (always positive)-ln(ŷ)Cross-entropy lossNatural penalty for wrong predictionse^(-x²/2)Normal distributionBell curve shapelr₀ × e^(-decay×t)Learning rate decaySmooth decay, never zeroSoftmax Example
Scores: [2.0, 1.0, 0.1]
e^2.0 = 7.389
e^1.0 = 2.718
e^0.1 = 1.105
Sum = 11.212
Probabilities:
7.389/11.212 = 0.659 (66%)
2.718/11.212 = 0.242 (24%)
1.105/11.212 = 0.099 (10%)
Sum = 1.000 ✓
Why e^x?
- Always positive (valid probability)
- Amplifies differences (sharp predictions)
- Clean derivative for backpropagationWhy e Makes AI Math Clean
With e: d/dx(eˣ) = eˣ (simple!)
With 2: d/dx(2ˣ) = 0.693 × 2ˣ (ugly constant)
With ln: d/dx(ln x) = 1/x (simple!)
With log₂: d/dx(log₂x) = 1/(x·0.693) (ugly!)
Since AI = gradient descent = millions of derivatives,
using e eliminates ugly constants everywhere.Summary
Why e exists: Natural limit of continuous compounding
Why it's special: d/dx(eˣ) = eˣ (derivative = itself)
Why AI uses it:
1. Clean derivatives → fast backpropagation
2. Always positive → valid for probabilities
3. Amplifies differences → sharp predictions
4. Natural growth/decay modeling