Field Notes
Ideas & Learning

A Math Roadmap for Machine Learning

Linear algebra, calculus, and probability, and the order to learn them.

3 min read

Great goal! Let me put together a solid roadmap for you. Let me quickly check a couple of resources to make sure my recommendations are current.Happy to lay out a roadmap for you. The good news is that ML/DL rests on just three core areas of math, and you don't need to master all of it before starting — you can learn the math and the ML side by side.

The three pillars of math you need ​

Linear algebra is the single most important one. Neural networks are essentially chains of matrix operations, so you need to be comfortable with vectors, matrices, matrix multiplication, dot products, the idea of linear transformations, eigenvalues/eigenvectors, and things like SVD and PCA.

Calculus (especially multivariable/differential) is what powers learning itself. Gradient descent and backpropagation are just calculus in action, so you need derivatives, partial derivatives, gradients, the chain rule, and a basic feel for optimization.

Probability and statistics let you reason about uncertainty and data. You need random variables, common distributions (Gaussian, Bernoulli, binomial), expectation and variance, Bayes' theorem, maximum likelihood estimation, and basic hypothesis testing.

A little bit of programming math helps too — nothing heavy, just being able to translate these ideas into Python with NumPy.

A suggested learning roadmap ​

Phase 1 — Build visual intuition (2–4 weeks). Before any formulas, watch 3Blue1Brown's Essence of Linear Algebra and Essence of Calculus series on YouTube. These build the geometric intuition that makes everything else click later. Don't worry about doing exercises yet; just absorb the mental pictures (eigenvectors as stretching/rotating space, derivatives as rates of change, etc.).

Phase 2 — Learn the core math properly (2–3 months). Now go deeper with a structured course. The most popular option for your exact goal is DeepLearning.AI's Mathematics for Machine Learning and Data Science specialization (Coursera, taught by Luis Serrano) — it's beginner-friendly and covers calculus, linear algebra, statistics, and probability, and it ties every concept back to Python code. A more rigorous alternative is Imperial College London's Mathematics for Machine Learning specialization, which covers linear algebra, multivariate calculus, and PCA, and is of intermediate difficulty requiring Python and NumPy. Either one works; pick the DeepLearning.AI one if you want gentler, the Imperial one if you want more depth.

Phase 3 — Start ML while reinforcing math (ongoing). You don't need to finish all the math first. Once you have the basics, begin Andrew Ng's Machine Learning Specialization (DeepLearning.AI/Coursera). It reintroduces the needed math in context, which reinforces Phase 2.

Phase 4 — Move into deep learning. After classic ML, do Andrew Ng's Deep Learning Specialization, and/or fast.ai's Practical Deep Learning for Coders (free) if you prefer a top-down, code-first approach. By this point the math from earlier phases will make backpropagation and the architectures feel natural rather than mysterious.

Videos (free, YouTube):

  • 3Blue1Brown — Essence of Linear Algebra, Essence of Calculus, and his Neural Networks series. The best intuition-builders available.
  • StatQuest with Josh Starmer — excellent, friendly explanations of statistics and ML concepts.
  • MIT OpenCourseWare 18.06 Linear Algebra by Gilbert Strang — a classic full university course, free.

Books:

  • Mathematics for Machine Learning by Deisenroth, Faisal, and Ong — free PDF online (mml-book.github.io), and it's specifically scoped to exactly the math ML needs, nothing extra.
  • Introduction to Linear Algebra by Gilbert Strang — the standard companion to the MIT course.
  • Deep Learning by Goodfellow, Bengio, and Courville — free online; Part I is a solid math refresher, though it's more of a reference than a starting point.

Online courses (public/free options):

  • Khan Academy — free linear algebra, multivariable calculus, and statistics/probability tracks. Great for filling specific gaps.
  • The DeepLearning.AI and Imperial College specializations mentioned above (Coursera — auditable for free, or paid for certificates).

A practical tip ​

The most common mistake is trying to master all the math first and burning out before ever touching ML. Instead, aim for "good enough to move forward," start building things early, and circle back to deepen the math whenever you hit something you don't understand. Learning the math in the context of a real model you're trying to understand is far more motivating and sticks better.

If you tell me your current math background (e.g. how comfortable you are with high-school algebra and calculus) and how much time per week you can commit, I can turn this into a more specific week-by-week plan.