Mathematics for Machine Learning
From vectors to attention: build the real mathematical foundations behind machine learning in a computational lab, not a video series - drag a slider and watch entropy, gradients, and attention weights actually change.
12 modules, in order
- 0OrientationNo calculus, linear algebra, or statistics required going in - just curiosity and a willingness to drag a slider before worrying about the formula underneath it.
- 1Thinking in Vectors45mA vector is not a list of numbers, it's an arrow with a direction - and comparing two arrows' directions is how machines decide whether two things are similar.
- 2Transforming Data50mA matrix is a machine that transforms every point in space the same way - once you see that, y = Wx + b in a neural network layer stops being mysterious.
- 3Finding the Important Directions55mGiven a cloud of correlated data, which direction actually matters most? Eigenvectors and eigenvalues answer that, and the answer reappears everywhere from PCA to attention.
- 4Mathematics of Change50mThe derivative and its multivariable cousin, the gradient, are the entire mechanism behind how a model learns anything at all.
- 5How Models Learn45mGradient descent turns the gradient into an algorithm: start somewhere, take a step downhill, repeat - and this module shows exactly what happens when the learning-rate dial is set wrong.
- 6Reasoning Under Uncertainty45mA model's "87% confidence" is a probability statement - this module builds what that actually promises (and doesn't) from the simplest possible example, a biased coin.
- 7Learning From Data45mIf you drew a different sample of the same size, how different would the average likely be? The Central Limit Theorem is why sample averages can be trusted at all.
- 8Probability Meets Machine Learning45mFitting a model to data is choosing the parameters that make the observed data most plausible - maximum likelihood estimation, the reason common loss functions look the way they do.
- 9Information and Loss45mBuilt up piece by piece from "how surprising is an outcome" to cross-entropy loss, the exact formula behind almost every classifier you've ever used.
- 10The Mathematics of a Neural Network55mEvery previous module fuses into one working system: a real neuron's forward pass, loss, and backward pass, small enough to compute by hand.
- 11The Math Behind Attention45mThe reward module - the dot product, softmax, and everything before it come together in scaled dot-product attention, the core computation behind every large language model.
4 sections, 13 real pages
Learn2 pagesCourse structure, reference material, and where you left off
- Skill Diagnostic
- Cheat Sheet
Foundation Bridge (optional)3 pages
- A: Algebra for ML
- B: Graphs and Functions
- C: Mathematical Notation
Practice2 pagesExtra reps, quizzes, and skill tracking
- Practice Library
- Math Detective
Build6 pagesThe real projects and labs you'll actually ship
- Project: Similarity Engine
- Project: PCA Explorer
- Project: Gradient Descent
- Project: Probability Simulator
- Project: Neural Network
- Capstone
- See a vector as a direction, not just a list of numbers, and use that to measure similarity
- Watch a matrix transform space and recognize it as a neural network layer
- Find the directions that matter most in correlated data with PCA
- Compute a gradient and use it to train a model with gradient descent
- Reason honestly about probability, sampling, and confidence
- Derive why cross-entropy loss looks the way it does, from maximum likelihood
- Build a real neuron's forward and backward pass by hand
- Compute scaled dot-product attention, the mechanism behind every transformer
5 real projects
- Orientation plus 11 sequential modules, each with a real computational lab (real math, not precomputed animations)
- A Foundation Bridge (optional): algebra, graphs, and notation for anyone rusty on the prerequisites
- A non-gating Skill Diagnostic that links weak areas straight to the relevant Foundation lesson
- A 35-task Practice Library and Math Detective (investigate a flawed ML claim, two-phase grading)
- 5 projects plus a capstone that synthesizes the whole course into one small ML system
- Animated guided tours, progressive hints, and Socratic quiz follow-ups on the modules that need them most
A vector's direction, not its raw numbers, is what most ML similarity measures actually compare.
"Training a model" is almost always "repeatedly asking a gradient which way is uphill, and stepping the other way."
Cross-entropy loss, used to train most classifiers, is the same formula this course builds up from scratch.
Scaled dot-product attention, the core of every transformer, is the same dot product from Module 1.
PCA, dimensionality reduction, and part of how attention works all come back to the same eigenvector question.
The math fluency to read a paper, a training curve, or a model architecture and actually reason about it, whether you're headed into ML engineering, data science, or research. Not a certification, no job guarantee.
Ready to start? Self-paced, start whenever you are.
Get access