The Mathematics of Large Language Models
A Readable Guide to LLMs, Transformers, Diffusion, Neural Networks, and Generative AI
Usually printed in 3 - 5 business days
See what artificial intelligence can do. Understand why it works.
Most explanations of artificial intelligence stop just before the mathematics becomes interesting. They either avoid equations entirely or present them as if the reader already speaks the language.
The Mathematics of Large Language Models takes a different approach.
Across sixteen chapters, the book introduces the mathematical ideas behind neural networks, optimization, generalization, attention, transformers, large language models, diffusion models, neural operators, and uncertainty quantification.
Each chapter begins with the human story behind an important breakthrough: the observation, experiment, competition result, or unexpected connection that changed how researchers thought about machine learning. The mathematics then arrives in context, connected to the problem it was created to solve.
Every equation is followed by two clear explanations:
What It Does explains the purpose of the formula in plain language.
Reading the Formula walks through the notation symbol by symbol, showing what each part contributes and why the equation is written the way it is.
This book does not remove the mathematics and replace it with vague analogies. It preserves the real ideas while making them approachable enough to follow.
No advanced degree is required. All you need is curiosity, patience, and a willingness to spend time with an equation.
Move beyond surface-level explanations and discover the mathematics that makes modern AI possible.
About the Author
Jason Karpeles is a data scientist, predictive-analytics innovator, and former top-five worldwide Kaggle competitor with thirty years of experience in forecasting, applied economics, statistical modeling, and machine learning.
He has developed industry-first predictive systems, earned 14 Kaggle medals and 50 top-three competition finishes, and won first place in a 2026 National Science Foundation supported data harmonization competition hosted by Penn State.
He holds an MA in Economics from New York University, an MBA from Duke University, and a BA in Economics from the University of California, Davis.
Details
- Publication Date
- Jul 28, 2026
- Language
- English
- Category
- Science & Medicine
- Copyright
- All Rights Reserved - Standard Copyright License
- Contributors
- By (author): Jason Karpeles
Specifications
- Pages
- 534
- Binding Type
- Hardcover Case Wrap
- Interior Color
- Black & White
- Dimensions
- US Letter (8.5 x 11 in / 216 x 279 mm)
Keywords
artificial intelligence mathematicsmathematics of artificial intelligenceAI mathematicslarge language model mathematicsLLM mathematicsmathematics of large language modelsmachine learning mathematicsdeep learning mathematicsneural network mathematicsgenerative AI mathematicsmathematical foundations of AImathematical foundations of machine learningAI equations explainedmachine learning equations explaineddeep learning equations explainedAI formulas explainedunderstanding AI equationsreadable mathematicsapplied mathematics for AIlinear algebra for AIprobability for machine learninginformation theory for AIoptimization for machine learninggradient descentstochastic gradient descentbackpropagationneural networksuniversal approximation theoremnetwork approximationnetwork expressivityoptimization and training dynamics