Cindy Zhu.
Free guides
Start with AIClaude

Learn machine learning maths in an order that connects

Hey, it's Cindy 🌱 Start with one small calculation, then build up until you can follow a neural-network layer. This guide connects the five stages from the carousel with exact lessons.
btw the waitlist for AI System Club is now open! If you're keen on using AI to automate your content, video editing, job search, business or build AI agents, feel free to sign up (only if you want to hehe). Ps. the waitlist gets first dibs:)

You don't need to understand every branch of mathematics before exploring machine learning. You do need enough of the foundations to know what the model is calculating and what a training update changes. This is a suggested learning route, not a claim that there is one official order.


part 01

Before the first lesson

Check that you can rearrange 2x + 3 = 11, read a coordinate such as (2, 1), and work with fractions and powers. The equation gives x = 4. If the steps feel unfamiliar, use Khan Academy Algebra 1 as a refresher before the later topics.

The linked lessons, Harvard lectures and online Mathematics for Machine Learning book provide public learning material. You can do the original examples here with paper and a calculator. Python is useful when you start coding, but no paid API or GPU is needed for these calculations.

Keep a note with the question you're trying to answer. After each lesson, explain the example without looking at the solution. If you can only repeat the words from the video, work through a smaller example before moving on.


part 02

1. Vectors and matrices: represent and transform numbers

Start with 3Blue1Brown's vectors lesson, then continue through the linear-algebra series to matrix transformations. For a more formal follow-up, use Chapter 2 of Mathematics for Machine Learning.

A vector is an ordered collection of numbers. In the simple two-dimensional picture, the vector (2, 1) can also be drawn as an arrow two units right and one unit up. A matrix can transform that vector into another one.

Work through this: take the matrix with rows (2, 0) and (0, 3). Multiply it by the column vector (2, 1).

First output:  2 × 2 + 0 × 1 = 4
Second output: 0 × 2 + 3 × 1 = 3
Result: (4, 3)

The transformation doubled the horizontal coordinate and tripled the vertical one. Now change the original vector to (1, 2) and calculate the result yourself: it should become (2, 6).

Your checkpoint: describe the transformation in words and calculate a new example. If the multiplication feels arbitrary, draw both arrows on the same coordinate grid.


part 03

2. Calculus: understand how a change travels

Open The paradox of the derivative, then the chain-rule lesson. Chapter 5 of Mathematics for Machine Learning extends this to several variables.

For f(x) = x², the derivative is 2x. At x = 1, a very small change in x produces an output change of approximately twice that size. Going from 1 to 1.01 changes the output from 1 to 1.0201, a difference of 0.0201. The derivative's local estimate is 0.02.

The chain rule connects changes through intermediate steps. Let u = 2x + 1 and y = u². At x = 1, u is 3. The derivative of y with respect to u is 2u = 6, and the derivative of u with respect to x is 2. Multiply them to get dy/dx = 12 at that point.

Your checkpoint: explain which two changes the chain rule combines. Then distinguish a derivative's local estimate from the exact output change over a finite step. Later, a gradient collects partial derivatives for several adjustable inputs.


part 04

3. Probability: update a belief using evidence

Use Harvard Stat 110's lecture index. Lecture 4 covers conditional probability and Bayes' rule. The course home also links learning and practice materials. Begin with events and conditional probability before random variables, expectation and variance.

Here is an original, deliberately small example. Imagine 100 fictional messages. Twenty are sales enquiries. Twelve of those mention pricing. Among the other 80 messages, eight mention pricing.

There are 20 pricing messages in total, and 12 are sales. So the probability of a message being sales given that it mentions pricing is 12/20 = 0.6, or 60% in this made-up dataset.

Bayes' rule expresses the same calculation:

P(sales | pricing) = P(pricing | sales) × P(sales) / P(pricing)
                  = 0.6 × 0.2 / 0.2
                  = 0.6

Notice that “pricing given sales” and “sales given pricing” ask different questions, even though this example happens to give the same number for both. If only four non-sales messages mentioned pricing, the second probability would become 12/16 = 0.75, while the first would stay 12/20 = 0.6.

Your checkpoint: identify the group you're counting within. The denominator is often where the confusion starts. Bayes' rule requires the conditioning event to have nonzero probability.


part 05

4. Optimisation: use the gradient to change a parameter

Open 3Blue1Brown's gradient-descent lesson, with Chapter 7 of Mathematics for Machine Learning as the next reading.

A loss function measures an error you want to reduce. Gradient descent changes the parameters in the direction opposite the gradient, with a learning rate controlling the step size.

Try the simple loss L(w) = (w - 3)². Its derivative is 2(w - 3). At w = 0, the loss is 9 and the derivative is -6.

With a learning rate of 0.1, the update is w_new = 0 - 0.1 × (-6) = 0.6. The new loss is (0.6 - 3)² = 5.76, which is smaller.

Now try a learning rate of 1.1. The update gives w_new = 6.6, and the loss becomes 12.96. The larger step made this example worse. This shows why increasing a learning rate isn't automatically an improvement.

Your checkpoint: calculate one step and compare the loss before and after it. This toy function has a simple minimum; real neural-network training has more complicated behaviour.


part 06

5. Put the pieces into one neural-network layer

Use 3Blue1Brown's neural-network introduction followed by the backpropagation lesson. Follow one small calculation rather than trying to memorise a large architecture.

A layer can be written a = σ(Wx + b). The matrix W combines inputs x, b adds a bias, and the activation function σ transforms the result.

For one original neuron example, use inputs (2, 1), weights (0.5, -1) and bias 0.2. The weighted sum is 0.5 × 2 - 1 × 1 + 0.2 = 0.2. With ReLU activation, which returns the larger of zero and its input, the output is 0.2. If the weighted sum had been -0.2, ReLU would output 0.

Training involves calculating an error and adjusting weights. Backpropagation computes gradients through the calculation using the chain rule; an optimiser uses those gradients to make an update. Those are connected jobs, but they aren't the same operation.

Your checkpoint: point to the input, weights, bias and activation. Then explain which values training adjusts and which value comes from the example being processed.


part 07

Paste this into Claude when a step stops making sense

copy this prompt
Act as a patient maths tutor and help me understand one machine learning calculation.

My current topic: [vectors / derivatives / conditional probability / gradient descent / one neural-network layer]
The exact step I don't understand: [paste it]
My current comfort with algebra: [one sentence]

Use small original numbers. First explain the purpose of the calculation in plain language. Define every symbol, then work through one complete example with no skipped arithmetic. Check the result by a second method when practical.

Give me one similar problem to try, followed by a clearly separated worked answer. Include one common mistake and show how it changes the result. End with a two-sentence explanation connecting this calculation to machine learning.

Don't claim I understand a topic just because I read the explanation. If a prerequisite is missing, teach that exact step before continuing. If I supply a university assessment, help with the concept using a different original example instead of providing its solution.

Your next action is the first vector example. Draw it, calculate it, and explain what changed. You can return to the bigger network picture once the individual operations start making sense.

Keep building from here. Find more practical walkthroughs in my free guide library.
the waitlist is now open

AI System Club is launching soon

Build AI systems with me through recorded lessons you can follow at your own pace. Join the waitlist for first access and the founding price.

btw this list gets first dibs
the moment doors open :)