Garrett Thomas's "Mathematics for Machine Learning" Notes — What They Are & How to Use Them

If you've found your way to the free "Mathematics for Machine Learning" lecture notes by Garrett Thomas — written as a supplement to UC Berkeley's CS189 (Machine Learning) — you've found a genuinely excellent resource. This page explains what it is, who it's really for, and what to do if you open it and find it's moving faster than you can follow.

What the notes are

Garrett Thomas's Mathematics for Machine Learning is a free, tightly written PDF that walks through the linear algebra, calculus, probability, and optimisation that show up across a machine learning curriculum — norms, eigendecompositions, gradients, convexity, probability distributions, and more. It's dense in the best sense: precise definitions, clean notation, no filler. You can read it in an afternoon and reference it for years.

Read the notes on GitHub →

math4ml.co is an independent site and is not affiliated with, endorsed by, or connected to Garrett Thomas, UC Berkeley, or the CS189 course. The name overlap with "math4ml" is coincidental — this page links to the original notes because they're genuinely useful, not because of any partnership.

Who it's for

The notes were written as a refresher for CS189 students — people who had already taken a linear algebra course, a calculus sequence, and probably a probability class, and just needed the relevant pieces collected in one place before diving into ML. That's the intended reader: someone who once knew this material and needs it reactivated and connected to ML notation, not someone meeting it for the first time.

You're ready for it if…

If most of that sounds right, the notes will serve you well as written — dive in.

If you're not quite ready yet: start from zero here

If parts of that checklist gave you pause, that's completely normal — the notes simply weren't written to teach those ideas from the ground up, and no amount of re-reading a terse proof substitutes for building the intuition first. Mathematics for Machine Learning (math4ml.co) is an interactive, from-zero course built for exactly that gap: plain-language explanations, draggable figures you can manipulate to build intuition, and unlimited auto-graded practice, all connected explicitly back to where the idea shows up in ML.

Try it free, no card needed: the Foundations course (24 lessons, free forever) rebuilds the basics from scratch. Or jump straight into two full sample lessons from later courses: "The Gradient" and "Eigenvectors & Eigenvalues" — the same two ideas that anchor much of the math4ml notes, taught interactively.

Start Foundations free → Try "The Gradient" → Try "Eigenvectors & Eigenvalues" →

Using them together

The two resources pair naturally. A sensible order: work through the relevant math4ml.co lessons first — linear algebra and calculus, then probability — until the notation and intuition feel solid, ideally alongside whichever ML course or book prompted you to look this up. Once a topic clicks, open the corresponding section of Garrett Thomas's notes as a compact, precise reference to consolidate it and see the "textbook-terse" version of what you just learned interactively. Many learners will end up going back and forth: math4ml.co to build understanding, the notes to review fast before an exam or interview.

In short: the notes are an outstanding refresher for people who've seen this math before. If you haven't, or it's faded, build it from zero first — then the notes become the fast reference they were designed to be.

About · Terms · Privacy