Phase 1 of 7 · 16 topics
Math foundations
The language of ML. You will see matrices as movements of space, gradients as directions, and loss functions as probabilities.
Maths is the grammar of ML. You can memorise sentences (formulas), but you only speak fluently when you know the grammar. Linear algebra describes the data. Calculus describes how things change. Probability describes how sure you are.
Core resources for this phase
-
Video
3Blue1Brown: Essence of Linear Algebra Free
The best visual start to linear algebra. Watch the chapters in order.
-
Video
3Blue1Brown: Essence of Calculus Free
Derivatives and the chain rule, shown with pictures.
-
Book
Mathematics for Machine Learning (Deisenroth, Faisal, Ong) Free
The main written text for this phase. Chapters 2 to 7.
-
Video
Probability and statistics in very plain English. One idea per video.
Topics, in order
-
1.1 Vectors, span and basis
- Watch
-
Read
Mathematics for Machine Learning, Ch 2 (vector spaces, linear independence, basis)
Deisenroth, Faisal, Ong · free
-
1.2 Matrices as transformations; matrix multiplication
-
Watch
3Blue1Brown
Worth it: Grid lines bending and stretching on screen: the clearest anyone has ever shown what a matrix does. If you watch one video for linear algebra, make it this one.
-
Read
Mathematics for Machine Learning, Ch 2 (matrices, linear mappings)
Deisenroth, Faisal, Ong · free
-
Watch
-
1.3 Determinants
-
Watch
Essence of Linear Algebra, Ch 6: The determinant
3Blue1Brown
Worth it: Areas growing, shrinking and flipping as the matrix moves space. After this the determinant stops being a formula and becomes a picture.
-
Read
Mathematics for Machine Learning, Ch 4 (determinant and trace)
Deisenroth, Faisal, Ong · free
-
Watch
-
1.4 Inverse, rank and solving Ax = b
- Watch
-
Watch
18.06 lecture: Elimination with matrices
Gilbert Strang (MIT)
-
Read
Mathematics for Machine Learning, Ch 2 (solving linear systems, basis and rank)
Deisenroth, Faisal, Ong · free
-
1.5 Dot product, projection and orthogonality
- Watch
-
Watch
18.06 lecture: Projections onto subspaces
Gilbert Strang (MIT)
-
Read
Mathematics for Machine Learning, Ch 3 (inner products, orthogonality, projections)
Deisenroth, Faisal, Ong · free
-
1.6 Eigenvalues and eigenvectors
-
Watch
Essence of Linear Algebra, Ch 14: Eigenvectors and eigenvalues
3Blue1Brown
Worth it: Watching vectors get knocked off their lines while the eigenvectors stay put is the moment eigenvectors make sense. Worth it before PCA.
-
Interactive
Eigenvectors and Eigenvalues, explained visually
Setosa · drag the vectors yourself
-
Read
Mathematics for Machine Learning, Ch 4 (eigenvalues, eigendecomposition)
Deisenroth, Faisal, Ong · free
-
Watch
-
1.7 SVD, and the maths behind PCA
-
Watch
Principal Component Analysis (PCA), Step-by-Step
StatQuest (Josh Starmer)
-
Watch
Singular Value Decomposition (SVD): Overview
Steve Brunton
-
Interactive
Principal Component Analysis, explained visually
Setosa · drag the points yourself
Worth it: Drag the data points and watch the principal directions swing round to follow them. PCA clicks in a couple of minutes.
-
Read
Mathematics for Machine Learning, Ch 4 (SVD) and Ch 10 (PCA)
Deisenroth, Faisal, Ong · free
-
Watch
-
1.8 Derivatives and the chain rule
- Watch
- Watch
-
Read
Mathematics for Machine Learning, Ch 5 (differentiation, the chain rule)
Deisenroth, Faisal, Ong · free
-
1.9 Partial derivatives, gradients and Jacobians
-
Watch
Gradient and directional derivatives
Khan Academy
-
Read
Mathematics for Machine Learning, Ch 5 (partial derivatives, gradients, Jacobians)
Deisenroth, Faisal, Ong · free
-
Read
The Matrix Calculus You Need for Deep Learning
Terence Parr and Jeremy Howard · free
-
Watch
-
1.10 Gradient descent and the learning rate
- Watch
-
Watch
Gradient Descent, Step-by-Step
StatQuest (Josh Starmer)
-
Read
Mathematics for Machine Learning, Ch 7 (optimisation with gradient descent)
Deisenroth, Faisal, Ong · free
-
1.11 Random variables, distributions, expectation and variance
-
Watch
The Normal Distribution, Clearly Explained
StatQuest (Josh Starmer)
-
Interactive
Seeing Theory: Probability Distributions
Brown University · interactive
Worth it: Roll dice, draw samples and watch histograms and averages settle, live. Probability you can play with instead of only read.
-
Read
Mathematics for Machine Learning, Ch 6 (probability and distributions)
Deisenroth, Faisal, Ong · free
-
Watch
-
1.12 Conditional probability and Bayes’ rule
-
Watch
Bayes' theorem, the geometry of changing beliefs
3Blue1Brown
Worth it: Shows Bayes' rule as areas of a square and as counts of people. After it, the classic medical-test puzzle feels obvious instead of strange.
-
Watch
3Blue1Brown
-
Interactive
Conditional probability, explained visually
Setosa · interactive
-
Read
Mathematics for Machine Learning, Ch 6 (sum rule, product rule, Bayes' theorem)
Deisenroth, Faisal, Ong · free
-
Watch
-
1.13 Maximum likelihood estimation
-
Watch
Maximum Likelihood, clearly explained
StatQuest (Josh Starmer)
-
Read
Mathematics for Machine Learning, Ch 8 (parameter estimation: MLE and MAP)
Deisenroth, Faisal, Ong · free
-
Read
Understanding Deep Learning, Ch 5 (loss functions from maximum likelihood)
Simon Prince · free
-
Watch
-
1.14 Statistics: sampling, confidence intervals, hypothesis tests
-
Watch
Confidence Intervals, Clearly Explained
StatQuest (Josh Starmer)
-
Watch
p-values: What they are and how to interpret them
StatQuest (Josh Starmer)
-
Watch
But what is the Central Limit Theorem?
3Blue1Brown
-
Interactive
Seeing Theory: Frequentist Inference
Brown University · interactive
-
Watch
-
1.15 Entropy, cross-entropy and KL divergence
-
Watch
Entropy (for data science) Clearly Explained
StatQuest (Josh Starmer)
- Watch
-
Read
Chris Olah · illustrated
Worth it: Pictures that turn entropy, cross-entropy and KL into areas you can see. The best explanation of why the formulas look the way they do.
-
Watch
-
1.16 Convex optimisation: constraints, Lagrange multipliers and duality
-
Watch
EE364A Convex Optimization, lecture 1
Stephen Boyd (Stanford)
-
Read
Mathematics for Machine Learning, Ch 7 (Lagrange multipliers, convex optimisation)
Deisenroth, Faisal, Ong · free
-
Read
Boyd and Vandenberghe · free
-
Watch
Go deeper (optional)
-
Course
MIT 18.06 Linear Algebra (Gilbert Strang) Free
The classic university course, for extra depth.
-
Course
Harvard Stat 110: Probability (Joe Blitzstein) Free
Probability done properly, with a free book.
-
Course
Khan Academy: Multivariable calculus Free
Partial derivatives and gradients, slowly and step by step.
-
Interactive
Seeing Theory (Brown University) Free
See probability ideas move. Good when a formula feels abstract.