Mathematics
The math foundation for understanding the transformer architecture and reading modern AI papers β intuition first.
Chapter 01
Linear Algebra: The Language of Transformers
- Vectors: Lists of Numbers You Can PictureContinue
- Vector Norms: How Long Is That Arrow?Coming soon
- Dot Product & Cosine SimilarityComing soon
- Matrices: A Grid (and a Stack of Vectors)Coming soon
- Matrix Multiplication: A Grid of Dot ProductsComing soon
- MatrixβVector Products as Linear MapsComing soon
- Transpose: Flipping a Matrix Across Its DiagonalComing soon
- Identity & Inverse: Undo Buttons for MatricesComing soon
- Special Structure: Diagonal, Symmetric, and OrthogonalComing soon
- Trigonometry & Rotation (RoPE-prep)Coming soon
- Projections & OrthogonalityComing soon
- Rank & Low-Rank IntuitionComing soon
- Eigen (brief) & SVD: Every Matrix = Rotate β Scale β RotateComing soon
- Tensors, Shapes & BroadcastingComing soon
- einsum: One Notation to Rule Them AllComing soon
- Chapter examComing soon
Chapter 02
Calculus & Backprop
- Functions, Graphs & the Story a Curve TellsComing soon
- Slope: The Rate of Change You Already KnowComing soon
- The DerivativeComing soon
- Differentiation Rules I: Power, Constant & SumComing soon
- Exponentials & LogsComing soon
- Integration PrimerComing soon
- The Chain RuleComing soon
- Product & Quotient RulesComing soon
- Partial DerivativesComing soon
- The GradientComing soon
- Softmax & Cross-Entropy DerivativeComing soon
- The JacobianComing soon
- Computation Graphs & BackpropagationComing soon
- Chapter examComing soon
Chapter 03
Probability & Information Theory
- What Is a Probability?Coming soon
- Random VariablesComing soon
- Bernoulli & CategoricalComing soon
- The GaussianComing soon
- Expectation & VarianceComing soon
- Joint, Marginal & Conditional DistributionsComing soon
- Independence & Light BayesComing soon
- Maximum Likelihood EstimationComing soon
- Softmax as a Probability DistributionComing soon
- EntropyComing soon
- Cross-Entropy: THE LossComing soon
- KL DivergenceComing soon
- RLHF / DPO / GRPO Math (Assembly)Coming soon
- Sampling & DecodingComing soon
- Chapter examComing soon
Chapter 04
Optimization & Numerical Foundations
- The Loss LandscapeComing soon
- Gradient DescentComing soon
- The Learning RateComing soon
- SGD & Mini-BatchesComing soon
- MomentumComing soon
- AdamComing soon
- Convexity (Light) + CurvatureComing soon
- Numerical Stability I: Log-Sum-ExpComing soon
- Online / Streaming SoftmaxComing soon
- Normalization Statistics: LayerNorm / RMSNormComing soon
- Floating Point & Precision (Light)Coming soon
- Chapter examComing soon