on this page

The Math Inside the Machine: How Intelligence Emerges from Eleven Simple Operations

book

A pop-science book explaining that the math inside ChatGPT is the same math you learned between kindergarten and calculus

period: 2026-present
tech:
Artificial IntelligenceLarge Language ModelsMathematicsTransformersMachine Learning

You already know the math inside ChatGPT. You just don’t know you know it.

Available on Amazon: Paperback ($19.99) | Kindle ($9.99)

Overview

A Napoleonic revelation in the land of Ra. An escape from The Plague. A beachside think tank, gaming the apocalypse. A dying genius, guards at his door, and one unfinished question. These events don’t seem connected to each other, let alone your last chatbot query, but they are.

Inside every AI system that appears to think is a machine built from eleven operations, the same ones you learned between kindergarten and calculus. This book explains not just what the math means and how it works, but how the course of human history wandered its way to this moment.

The Eleven Operations

OperationGrade LevelTransformer Role
CountingK-2Tokenization
Addition1-3Residual connections
Multiplication3-5Embeddings, attention scores
Number Representation6-8Precision, quantization
Exponentiation6-8Softmax
Averaging7-9Attention output
Logarithms9-11Cross-entropy loss
Comparison2-4 / AdvancedReward modeling, RLHF
Trigonometry10-11Positional encoding
Derivatives11-12+Backpropagation
IterationThroughoutTraining, generation

Stories from History

Each chapter weaves mathematical explanation with historical narrative:

  • Fourier before a skeptical Lagrange — presenting his radical claim that any pattern can be built from waves
  • Shannon’s statue and shadow — the birth of information theory at Bell Labs
  • Newton and Leibniz’s bitter priority war — a dispute whose modern echo has spawned its own memes
  • The Y2K bug — how counting constraints cost hundreds of billions globally
  • The Pentium FDIV bug — when Intel’s chip lied about division
  • Galton’s ox — the 1906 country fair that demonstrated the wisdom of crowds

Two Ways to Read

Not in the mood for math? This book is built for two kinds of reading:

  1. Follow every equation — find rigor enough to tackle the original papers afterward
  2. Let the stories carry you — each chapter is structured so you’ll know when it’s safe to skim

The Payoff

By the final chapter, you’ll trace a word through the transformer itself. You’ll see the system as engineers do. The black box becomes glass, even if the wonder of emergence remains.

You’ll be left with one last question: which is more unbelievable — the superhuman technology we are building, or the fragile history that brought us here?

Purchase

on this page