Mathematics Foundations

A track of P2 · Mathematics for ML.

Numbers in machines, functions and their graphs, vectors, matrices, probability into softmax, and gradients — each with an interactive lab, none deeper than models need.

Inside a language model, the word "king" is nothing but a list of a few hundred numbers. Nudge a handful of them and the word drifts toward "queen"; nudge others and it drifts toward "castle". Everything a model appears to know about language is stored this way — as numbers you could write on paper. Which raises the question this track exists to answer: what are those numbers, what is legitimate to do with them, and how does a machine tell that some of them need changing?

Eight short modules, each ending in a lab you can poke. The order is deliberate: numbers first, because everything a model does is arithmetic on stored numbers; then functions and their graphs, so "a rule that turns one number into another" becomes something you can see; then vectors and matrices, the containers all model data lives in — a word like "king" is exactly one vector, and a matrix is the machine that moves it. Probability and softmax follow, showing how raw scores become choices, and gradients close the core path: the downhill slope that learning follows when the model discovers its numbers were wrong.

A final module on sine and cosine may look like an odd guest at this party. It sets up one lovely trick — position fingerprints, a way to stamp "this word came third" into the numbers themselves — that returns, unchanged, inside the Transformer. By the end of the track every ingredient of that machine has been in your hands at least once.

Nothing goes deeper than a model actually needs, and no step assumes more than comfortable school arithmetic. Every module ends in an interactive console where you change a number and watch the picture respond — the labs are the point; the text just walks you to them. If you can read a graph and multiply two numbers, you have every prerequisite this track asks for.

Numberswhat a computer holdsFunctionsrules drawn as graphsVectorsand the matrices moving themProbabilityscores into softmaxGradientsdownhill toward better
Eight modules in five moves, each idea drawn before it is written.