Math intuition for AI
For engineers
The vectors, matrices, probability, logarithms and derivatives behind models, read as pictures and code rather than proofs
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
What is the dot product of a = [2, 3] and b = [4, 1]?
Check yourself · 2 of 5
A fair six-sided die is rolled. What is the expected value of the roll?
Check yourself · 3 of 5
A model gives the correct token a probability of 1.0. What is the cross-entropy loss for that example?
Check yourself · 4 of 5
What is the derivative of f(x) = x^2 at x = 5?
Check yourself · 5 of 5
An engineer only calls a hosted model's API to add summarisation to an app. Which math is most useful to learn first?
Topics
- Vectors, matrices and their shapes4 min read · Dot products as similarity, matrix multiplication as one network layer, and the shape rules that make or break code
- Probability distributions and expected value5 min read · Distributions, expectations, conditional probability and Bayes' rule, plus softmax turning raw scores into a distribution
- Logarithms, entropy and cross-entropy5 min read · Why models work in log probabilities, what entropy and KL divergence measure, and how perplexity follows from cross-entropy
- Derivatives, gradients and composed functions5 min read · Slope as sensitivity, partial derivatives stacked into a gradient vector, and chaining them through functions inside functions
- How much math an engineer needs4 min read · What to learn for using, fine-tuning or researching models, what you can skip, and using AI tutors and visual tools to fill gaps
Start here
- Mathematics for Machine Learning (Deisenroth, Faisal, Ong) (opens in a new tab)BookFree
The free book that covers linear algebra, calculus and probability in the order machine learning needs them.
- 3Blue1Brown: Essence of linear algebra (opens in a new tab)VideoFree
Vectors, dot products and matrix multiplication drawn as geometry, the fastest way to build intuition.
- 3Blue1Brown: Essence of calculus (opens in a new tab)VideoFree
Derivatives and the chain rule as pictures of change, without heavy algebra.
Helps to know first
110 questions · last verified 2026-12