Why Maths & Statistics for AI?
The foundation underneath three closely related AI careers
Frameworks like PyTorch and TensorFlow will happily let you train a model without understanding a single equation behind it — right up until something breaks, a result looks wrong, or you need to explain why a model is behaving the way it is. That's the gap this roadmap fills, and it's the same gap underneath a few closely related roles. A Data Scientist leans hardest on statistics and probability, since experiment design and inference are the daily job. A Machine Learning Engineer leans more on linear algebra and optimization, the math that explains how a model actually learns. A Research Scientist needs the deepest grasp of all of it, since inventing new methods means being fluent in the math well past what any library abstracts away. Whichever direction you lean toward, the roadmap below covers the shared mathematical foundation all three roles are built on.
Quick intro — why does AI need so much math?
A quick primer before you start the roadmap. Opens in a small player, no need to leave the page.
The Maths & Statistics for AI Roadmap
Work through these in order. Each step has a short lesson, official docs, and a repo to practice in.
Linear Algebra
Vectors, matrices, eigenvalues and eigenvectors, and matrix decompositions like SVD — the language every model's weights are written in.
Calculus
Derivatives, partial derivatives, the chain rule, and gradients — the machinery that makes backpropagation possible.
Probability Theory
Random variables, common distributions, conditional probability, and Bayes' theorem — how models reason under uncertainty.
Statistics
Descriptive and inferential statistics, hypothesis testing, confidence intervals, and sampling — how you go from data to conclusions.
Optimization
Gradient descent and its variants, convex optimization, and constrained optimization with Lagrange multipliers.
Information Theory
Entropy, cross-entropy, and KL divergence — the math behind most loss functions used to train classifiers and language models.
Discrete Mathematics
Combinatorics, graph theory, and set theory — the toolkit behind algorithms, embeddings, and structured data.
Numerical Computing
Floating-point precision, numerical stability, and doing linear algebra fast and correctly with NumPy.
Applied Math for Machine Learning
Bringing it all together — loss functions, regularization, and the matrix calculus that makes backpropagation work.
GitHub Projects
Real, buildable projects to put on your own GitHub
Computational Linear Algebra
Work through fast.ai's free notebook textbook to implement SVD, PCA, and other decompositions from scratch.
Implement ML Algorithms from Scratch
Rebuild classic ML algorithms in plain Python with the underlying math explained line by line, no black boxes.
Probabilistic ML in Practice
Run the companion code for Kevin Murphy's Probabilistic Machine Learning books to see probability theory applied directly.
Numerical Computing Deep Dive
Read through NumPy's own source and docs to understand how vectorized linear algebra is implemented efficiently.
Track complete
Nine steps from vectors to backpropagation. Implement an algorithm from scratch and push the notebook to GitHub so it's visible to employers, then keep going — the math behind AI is learned by deriving it yourself at least once, not just reading about it.
Where next?
Keep exploring by domain or drill into a single skill