Getting an answer is half the job. Knowing it's right is the other half. This review collects the slips that Module 1 warned about, from 4 + 3 × 2 to 10e-4, and shows how to catch each one with a quick check. Then a mixed set of problems draws on every lesson, and the module's formulas are gathered on one sheet, each with its Python line, ready for Module 2. Last, a map of a model that learns shows where each formula does its work.
What you'll be able to do
Spot the common slips of Module 1 with five quick sense checks
Find and fix slips in code that runs without an error but gives a wrong answer
Mix problems from every lesson of the module, choosing the right method for each
Use the module's formula sheet: each formula, what it says, and its Python line
Quick check
Have a guess before you start. One of these four is wrong. Which?
2³ = 8
3/4 = 0.75
−3 − 4 = −7
20% of 50 = 1,000
Show the answer
20% of 50 = 1,000
20% of 50 is 0.2 × 50 = 10. The 1,000 comes from multiplying by the 20 in front of the % sign, and it's bigger than the 50 it's a part of.
Find the slip
Purpose. Most slips in Module 1 come in a few kinds, and each has a quick check:
Size. Is the answer about the right size? 20% of 50 must be less than 50.
Sign. Should it be positive or negative? A number squared can't be negative.
Order. Did the steps run in the right order? Brackets, then powers, then × and ÷, then + and −.
Reverse it. Undo the step and see if you get back. If 3/8 = 0.375, then 0.375 × 8 should be 3.
Easy numbers. Try the same steps with numbers you can do in your head.
Below are ten worked lines of math, written as Python. Four have a slip. Every one of them would run without an error, which is what makes them dangerous.
Try it now
How the checks catch them. Each slip above breaks a quick check, with no calculator needed. 2/5 is less than 1/2, but adding 1/3 to 1/2 must give more than 1/2: a size check. A 20% rise from 120 is 144, not 150: a reverse check. 4 + 3 × 2 = 14 fails the order check, since × goes first. And 10e-4 prints as 0.001, three places after the point, not four: reading the result back catches it.
The next slip is one you met in lesson 10. Predict before you run.
Quick check
Someone wanted (−5)² twice. What does this print?
x = -5print(-5 ** 2, x ** 2)
25 -25
-25 -25
25 25
-25 25
Show the answer
-25 25
runs before a leading minus, so -5 2 is −(5²) = −25. But x already holds −5, so x ** 2 squares the whole −5: 25.
Slips that run. The most dangerous slips raise no error. Python works out -5 ** 2 as −25 and 10e-4 as 0.001 without a word: it does what you typed, not what you meant. A sense check is the only thing that catches them, so build the habit of asking "is this the right size, and the right sign?" after every result.
Two more slips from the module live in how people read numbers, not in code. Roots don't split over a sum. And a decimal's size isn't set by how many digits it has. The next two checks are about these.
Quick check
A learner writes √9 + √16 = √25 = 5. What's the slip?
√9 is 4.5, half of 9
Nothing: the sum really is 5
Roots don't split over a sum: 3 + 4 = 7
√16 is 8, not 4, so it's 11
Show the answer
Roots don't split over a sum: 3 + 4 = 7
Take each root first: √9 = 3 and √16 = 4, so the sum is 7. √(9 + 16) = 5 is a different calculation.
Quick check
A learner says 0.45 is bigger than 0.5. What's the slip?
Decimals can't be compared without Python
0.5 has fewer digits, so it is smaller
There's no slip: 0.45 is the bigger one
Comparing 45 with 5, not lining up places
Show the answer
Comparing 45 with 5, not lining up places
Line up the places: 0.5 is 0.50, and 50 hundredths beats 45 hundredths.
Drill
The training set is too big
This code should split 2,000 examples in the ratio 8:1:1, but the training set comes out bigger than the whole dataset. Find the one slip and fix it.
n = 2000
portion = n / 3
train = portion * 8
val = portion * 1
test = n - train - val
print(train, val, test)
In the lesson, your code is checked as you write it.
In your own words
Which of the five sense checks would have caught the most slips in this part, and why?
Write a sentence or two, then compare it with a good answer in the lesson.
Mixed practice
Purpose. Practice that mixes topics makes skills last longer than practice on one topic at a time. Each mixed problem makes you decide first what kind of problem it is, which is exactly what real work asks of you.
The ladder below draws on every lesson of Module 1, in mixed order. Before you work each one, name the lesson it comes from. If one stops you, the steps show the way, and the formula sheet in the last part has every rule in one place.
Worked example
Worked example: check an answer by reversing it
Work out a percentage change and a fraction as a decimal, then check each by undoing it.
import math
old = 120
new = 150
pct = (new - old) / old * 100print(pct)
print(math.isclose(old * (1 + pct / 100), new))
share = 3 / 8print(math.isclose(share * 8, 3))
It runs right here in your browser, with nothing to install.
A 25% rise on 120 should land back on 150, and it does: 120 × 1.25 = 150. The fraction check undoes the division: 0.375 × 8 should give back 3. Both use math.isclose, because a reversed float can land a hair away from the start. If a reverse check fails, the slip is in the step you just undid.
Quick check
What does this print?
print(7 // 2, -7 // 2, 7 % 2)
3.5 -3.5 1
3 -3 1
3 -4 1
3 -4 0
Show the answer
3 -4 1
// rounds down: 7 // 2 is 3, and −7 // 2 rounds down past −3.5 to −4. 7 % 2 is the 1 left over.
Play computer. The four lines below are a model's first calculation in small: a prediction from a weight and a bias, its miss against the target, the miss squared, and how far off it was either way. Each line has a trap this module warned about: × before +, a decimal that keeps its .0, a sign, and a negative number squared. The last line changes miss, so its new value replaces the old one. Work out every value in your head before you type it, the way Python would print it.
Drill
A negative squared error
This code works out three squared errors and their average, but one squared error comes out negative, which a square can never be. Find the one slip and fix it.
The first is the multiply law: 3 + 4 = 7. The second is lesson 11's row: 3.4e-4 and 0.00034 are the same number.
Where Module 1 lives in a model. Every row of this sheet has a job inside a model that learns. Numbers turn a trail sign into something a model can compute with. Batches are a division with a remainder. A layer is order of operations, w × x + b. The loss is a signed miss, squared. Accuracy is a fraction, read as a percentage. Chances multiply like fractions. The split is a ratio. A learning rate is written in e-notation, and a model's memory, billions of numbers at 4 bytes each, is counted in powers of ten. The map below lights all nine places. The lines you traced in mixed practice sit on its forward row: a layer's prediction, then its loss.
Coming up in Module 2. Algebra uses letters for numbers you don't know yet. It leans on this sheet all the time. Order of operations reads every expression. Fractions and negatives come back when you solve for x. Powers return in formulas like area = side². And the percentage-change formula becomes your first Python function, written with def, in lesson 14.
In your own words
Pick the formula on the sheet you're most likely to slip on. What check would you use to catch the slip?
Write a sentence or two, then compare it with a good answer in the lesson.
31Formulas with fractions: clear them firstFreeClearing denominators, cross-multiplying, a letter in the bottom, and reciprocal formulas like 1/R = 1/R₁ + 1/R₂.35 min
37Inverse functions, lines and scalingFreeUndoing a function by making x the subject, domains that allow it, line forms, and unscaling predictions.40 min
38Sequences and sums: find n, a, d and rFreeEvery letter of the arithmetic and geometric formulas as the subject, and an average's window from its decay.40 min
40Review: rearrange anything (algebra)FreeBroken rearrangements to fix, mixed practice from the whole algebra block, a strategy chart, and its formula sheet.35 min
41Coordinates and distanceFreePoints as (x, y), Pythagoras, distance in any number of coordinates, and nearest neighbors.42 min
42Angles, degrees and radiansFreeMeasuring a turn, converting units, arcs, and the angle between two arrows.36 min
43Sine and cosineFreeAcross and up: right triangles, the unit circle, and directions and rotations.42 min
44Waves: height, speed and shiftFreeAmplitude, period and phase, sampling a wave, and position codes in transformers.37 min
68Vector equations: rearranging with arrowsFreeSolving for a vector or a scale, recovering a gradient from two weight snapshots, and an angle from a dot product.40 min
87Counting: choices, orders and groupsFreeThe counting principle, factorials, ordered picks and groups, and why attention's cost grows with the square of the length.43 min
88Probability: from counts to chancesFreeEqually likely outcomes, the complement, distributions, seeded simulation, and a next-word model.43 min
89Combining events: and, or, independentFreeThe or rule, independence, probability trees, drawing with and without replacement, and chains of steps.42 min
100Maximum likelihoodFreeLikelihoods as products, log-likelihoods as sums, grid search, underflow, and the negative log-likelihood loss.45 min
101Linear regression: the best lineFreeResiduals, least squares by formula, three roads to one line, the matrix form, and train versus test error.45 min
109One neuron, start to finishFreeWeighted sum, activation, loss, slopes and update, by hand and in code, and what one straight line can and can't split.45 min
111Training a small networkFreeThe backward pass in matrix form, gradient checks, a full training loop, and reading loss curves.45 min
112The same network in PyTorchFreenn.Sequential with the NumPy weights loaded, the same loss and slopes, then SGD and mini-batches.45 min
113Attention as matrix mathFreeScaled dot-product scores, the causal mask, a row-by-row softmax, and blending value vectors.45 min
114Residual connections and layer normFreeAdding the input back and why its slope keeps learning alive, layer norm by hand, and add and norm.40 min
115A transformer block, start to finishFreeA sentence through embeddings, attention, add and norm, a small network and next-word scores, every shape named.45 min
117Final test: transpose any formulaFreeSlips to fix from every topic, mixed practice of every kind of rearranging, the strategy chart and the full sheet.45 min
Learn the math behind AI from arithmetic up: numbers, algebra, vectors and matrices, calculus, probability and statistics, each shown as numbers moving and checked in Python, ending with a network you build and train from the formulas.
See the course →
Never trained an AI? Teach a small one to write, right in your browser. It takes about 20 seconds and needs no account. Teach it to write