Download the free Kindle app and start reading Kindle books instantly on your smartphone, tablet, or computer - no Kindle device required.
Read instantly on your browser with Kindle for Web.
Using your mobile phone camera - scan the code below and download the Kindle app.
Follow the author
OK
The Mathematics of Large Language Models: Machine Learning Theory Made Readable: LLMs, Transformers, Diffusion, Neural Networks, Optimization, and ... (The Mathematics of Artificial Intelligence)
Purchase options and add-ons
Revised and updated for September 2026. Now expanded with 46 original diagrams and explanatory figures, 879 displayed equations, and more than 12k mathematical expressions.
Most explanations of artificial intelligence stop just before the mathematics becomes
interesting. This book goes further.
Books about AI usually take one of two approaches. They avoid the equations entirely, or they present them as if you already speak the language. This one does neither. The mathematics is here in full, unsimplified, and so is a way to read it.
It is written for people who want the actual mathematics behind these systems and who keep getting stopped by the notation. That is a real and common place to be stuck, and it is not the same thing as being unable to follow the argument. No advanced degree is assumed. What is assumed is that you are willing to sit with an equation until it opens.
How the mathematics is unpacked
After every equation, two short passages do the work:
What It Does explains, in plain language, what the formula is for.
Reading the Formula walks through the notation symbol by symbol: what each part contributes, what changes when you alter it, and why the equation is written the way it is.
These do not simplify the mathematics. The expression on the page is the one the field uses, at full strength, because a watered-down version would teach you something that is not true. What the two passages give you is a way to climb up to it.
How the book is built
Seventeen chapters, and they are not seventeen separate surveys. A preface lays out the
structure before you start: which chapters stand alone, which ones the rest of the book leans on, and several routes through depending on what you came for. Every chapter then opens by saying what it establishes, what it assumes, and what later chapters build on it. You always know where you are and why you are there.
The stories
Each chapter carries the human story behind the ideas in it: the observation, the failed
experiment, the competition result, the unexpected connection that made researchers rethink how learning works. The mathematics arrives attached to the problem it was invented to solve, which is how it was actually discovered and how it is easiest to hold onto.
What the book covers
Approximation and what a network can represent. Optimization and what training can actually find. Generalization, implicit bias, and double descent. Symmetry and convolution. Recurrence and state-space models. Attention and transformers. Graphs. Latent-variable and adversarial models. Diffusion and optimal transport. Continuous-depth models. Operator learning for scientific problems. Bayesian methods and calibrated uncertainty. Robustness and causality. Scaling laws and in-context learning. And a closing chapter on hallucination: what the mathematics says about what a model cannot know, and when abstaining is the correct answer.
One honest note on fit
If you already read this notation fluently, the explanatory apparatus will be in your way. You
are welcome here, and you should skip it: the results, derivations and citations stand without it. But the scaffolding is the point of this book, and it was built for readers who need it.
If you have ever wanted to move past surface-level explanations and understand the mathematics that makes modern AI work, this book was written for you.
Jason Karpeles is an award winning data scientist and predictive-analytics innovator with thirty years building forecasting and machine-learning models in industry. Jason earned a master’s degree in economics from NYU and an MBA from Duke University. Full biography under About the Author.
- ISBN-13979-8185219508
- Publication dateJuly 7, 2026
- LanguageEnglish
- Dimensions8.5 x 1.33 x 11 inches
- Print length590 pages
Frequently bought together

Customers who viewed this item also viewed
- Optimization: A Bootcamp for Machine Learning, Inverse Problems, and ControlHardcoverFREE Shipping by AmazonGet it as soon as Sunday, Sep 20
- Super Study Guide: Transformers & Large Language ModelsPaperbackFREE Shipping by AmazonGet it as soon as Monday, Sep 21
- Build a Large Language Model (From Scratch)PaperbackFREE Shipping by AmazonGet it as soon as Sunday, Sep 20
- Build a Reasoning Model (From Scratch)PaperbackFREE Shipping by AmazonGet it as soon as Sunday, Sep 20
- Sutskever's List: Foundational ideas of modern AIPaperbackFREE Shipping by AmazonGet it as soon as Monday, Sep 21
- The Mathematics of Artificial Intelligence Agents: A Readable Guide to Decisions, Planning, Memory, Tools, Learning, and CooperationPaperbackFREE Shipping on orders over $35 shipped by AmazonGet it as soon as Monday, Sep 21
Customers also bought or read
- Optimization: A Bootcamp for Machine Learning, Inverse Problems, and Control
Just releasedHardcover$63.86$63.86FREE delivery Sun, Sep 20 - Build a Reasoning Model (From Scratch)#1 Best SellerProgramming Algorithms
Paperback$47.82$47.82FREE delivery Sun, Sep 20 - The Laws of Thought: The Quest for a Mathematical Theory of the Mind
Hardcover$24.82$24.82Delivery Sun, Sep 20 - Domain-Specific Small Language Models: Efficient AI for local deployment
Paperback$41.51$41.51FREE delivery Mon, Sep 21 - Super Study Guide: Transformers & Large Language Models
Paperback$36.66$36.66FREE delivery Mon, Sep 21 - Large Language Models: A Deep Dive: Bridging Theory and Practice
Hardcover$43.61$43.61FREE delivery Sun, Sep 20 - The Proof in the Code: How a Truth Machine Is Transforming Math and AI
Hardcover$24.02$24.02Delivery Sun, Sep 20 - LLM Systems Engineering: Training and Building Large Language Models – Engineering AI Models Through Fine-Tuning, Continued Pretraining, and From-Scratch Development
Paperback$37.00$37.00FREE delivery Mon, Sep 21 - Knowledge Graphs and LLMs in Action: Build AI systems using connected data
Paperback$55.99$55.99FREE delivery Mon, Sep 21 - The Hundred-Page Language Models Book: hands-on with PyTorch (The Hundred-Page Books)
Paperback$46.95$46.95FREE delivery Mon, Sep 21 - 30 Agents Every AI Engineer Must Build: Build production-ready agent systems using proven architectures and patterns
Paperback$41.79$41.79FREE delivery Mon, Sep 21 - Sutskever's List: Foundational ideas of modern AI#1 New ReleaseComputer Vision & Pattern Recognition
Paperback$49.99$49.99FREE delivery Mon, Sep 21 - Reinforcement Learning from Human Feedback: LLM alignment and post-training
Just releasedPaperback$59.99$59.99FREE delivery Mon, Sep 21 - Agentic Coding with Claude Code: The everyday developer's guide to agentic coding with Claude Code
Paperback$36.33$36.33FREE delivery Mon, Sep 21 - Hands-On Large Language Models: Language Understanding and Generation
Paperback$37.68$37.68FREE delivery Mon, Sep 21 - Mathematics of Machine Learning: Master linear algebra, calculus, and probability for machine learning
Paperback$44.30$44.30FREE delivery Mon, Sep 21 - Fluent Python: Clear, Concise, and Effective Programming
Paperback$43.99$43.99FREE delivery Sun, Sep 20 - Modeling Intelligence: The Hidden Mathematical Structures Behind Modern AI
Just releasedPaperback$38.45$38.45FREE delivery Mon, Sep 21 - 50 ML Projects To Understand LLMs: Investigate transformer mechanisms through data analysis, visualization, and experimentation
Paperback$44.99$44.99FREE delivery Mon, Sep 21 - Build a Large Language Model (From Scratch)#1 Best SellerComputer Neural Networks
Paperback$49.24$49.24FREE delivery Sun, Sep 20 - Causal Inference and Discovery in Python: Unlock the secrets of modern causal machine learning with DoWhy, EconML, PyTorch and more
Paperback$26.99$26.99Delivery Mon, Sep 21 - Designing Multi-Agent Systems: Principles, Patterns, and Implementation for AI Agents
Paperback$46.39$46.39FREE delivery Mon, Sep 21 - AI Agents in Action, Second Edition: Intelligent workflows with LLMs, MCP, A2A, and more#1 New ReleaseNatural Language Processing
Paperback$47.48$47.48FREE delivery Mon, Sep 21 - Design Multi-Agent AI Systems Using MCP and A2A: Engineer your own Python-based agentic AI framework with tool use, memory, and multi-agent workflows
Paperback$41.79$41.79FREE delivery Mon, Sep 21 - Hands-On Machine Learning with Scikit-Learn and PyTorch: Concepts, Tools, and Techniques to Build Intelligent Systems
Paperback$77.72$77.72FREE delivery Mon, Sep 21
From the Publisher
Understand The Equations, Understand the Models
Modern AI is built on mathematics
This book makes that mathematics approachable without removing its rigor. Key equations are introduced in context, explained in plain language, and unpacked step by step, from neural networks and optimization to attention, transformers, diffusion, scaling laws, uncertainty, causality, and model reliability. Designed for students, engineers, data scientists, researchers, and independent learners who want more than a surface-level overview.
How Does Attention Work and Why it Matters
From Symbols to Meaning
Attention is the operation at the heart of the transformer. The book first explains what the equation accomplishes, then walks through each term so the mathematics becomes something you can read, reason about, and use.
How Can a LLM Use Less Memory
Powerful Models Within Practical Limits
Quantization reduces the memory needed to store model weights and activations by replacing full-precision values with carefully chosen low-bit approximations. This book develops the mathematics behind that tradeoff, showing how scaling, rounding, clipping, and reconstruction error determine what can be compressed while preserving useful model behavior.
From Foundations to the Frontier of Modern AI
A Connected View of Modern AI
Across 17 chapters, the book connects the major mathematical ideas behind modern AI into one coherent framework. Begin with linear algebra, probability, optimization, and generalization, then move through transformers, generative models, scientific machine learning, uncertainty, scaling laws, causality, and the mathematics of truth and abstention.
Built for Readers Who Want the Real Mathematics
Designed for Serious Learning
This book is for readers who want to understand more than what modern AI systems do. It develops the mathematics explaining how and why they work. The material is especially suited to students, independent learners, engineers, data scientists, researchers, and technical leaders prepared to engage with equations and mathematical reasoning.
Product details
- ASIN : B0H83XXKM8
- Publisher : Independently published
- Publication date : July 7, 2026
- Language : English
- Print length : 590 pages
- ISBN-13 : 979-8185219508
- Item Weight : 3.64 pounds
- Dimensions : 8.5 x 1.33 x 11 inches
- Part of series : The Mathematics of Artificial Intelligence
- Best Sellers Rank: #44,640 in Books (See Top 100 in Books)
- #25 in Scientific Research
- #96 in Mathematics (Books)
- Customer Reviews:
About the author

Jason Karpeles is a data scientist and marketing scientist with 30 years of professional experience spanning analytics, applied economics, and competitive machine learning. He has been a Kaggle member since day one of the platform's existence, and his work there has earned him a one time global ranking of #5 across hundreds of competitions, reflecting both long-term consistency and depth across a wide range of problem types and data domains.
He holds an MBA from Duke University, a Master's degree in Economics from New York University, and a Bachelor's degree in Economics from the University of California, Davis. This combination of business, economic theory, and quantitative training has shaped his approach to data science: grounding technical modeling work in real-world business judgment and economic reasoning rather than treating it as a purely academic exercise.
Over three decades, Jason has built a career at the intersection of marketing science and data science, applying statistical and machine learning methods to problems in customer behavior, forecasting, and decision-making. His Kaggle track record, built across hundreds of competitions since the platform's founding, stands as a public record of that expertise: sustained top-tier performance against a global field of practitioners, on problems ranging from tabular prediction to text and beyond.










![Book cover Claude AI for Beginners Bible: [5 in 1] The Ultimate Guide to Automate Your Work, Save Hours Every Week, and Use AI for Real-World Results](https://m.media-amazon.com/images/I/415+fSJacsL._UX300undefined_.jpg)







