Rearranging slips are quiet. A 5 taken from one side only, a ± that goes missing, a planning answer rounded down: each still gives a number, and the number looks fine. This review plants the ten slips learners really make, shows the quick check that catches each one, mixes problems from all ten algebra lessons of the Transposition subcourse, and ends with a strategy chart and a formula sheet you can use on any formula.
What you'll be able to do
Spot the ten slips of rearranging: one-sided moves, layers in the wrong order, split roots, logs and reciprocals, lost flips and ±, a letter left on both sides, dropped brackets and answers not rounded up
Catch each slip with a quick check: numbers back in, a round trip, a number on each side, or a law tested with easy numbers
Choose the right move for any formula with the strategy chart: count the letter, peel or collect, undo in reverse, write the conditions, check
Mix rearrangements from every algebra lesson of the subcourse, from peeling to combining formulas
Use the subcourse's formula sheet: each formula, its rearranged form, its condition and its Python line
Quick check
Have a guess before you start. A learner makes P the subject of A = P + Prt and writes P = A − Prt. What's wrong?
Nothing: it's finished
P is still on both sides
A sign was lost: P = A + Prt
They should divide by r first
Show the answer
P is still on both sides
P appears twice, so peeling can't free it. Collect and factor: A = P(1 + rt), so P = A/(1 + rt). A finished answer has the letter on one side only.
Find the slip
Purpose. Each rearranging slip breaks a quick check, so knowing the checks is how you catch them:
Put numbers back in. Work the answer out, put it into the original formula, and see if both sides agree.
Round trip. Go forward with a number, then back with your rearranged formula. You should land where you began.
Count the letter. A finished answer has the letter you want on one side only.
Try a number on each side. For an inequality, one value your answer allows must pass, and one it rules out must fail.
Test a law with easy numbers. Unsure whether a root, a log or a fraction splits? Try 6 and 8, or 2 and 3.
Below are two sets of worked lines, written as Python with a comment saying what each should give. Each set has five slips and three right lines.
Try it now
How the checks caught them. Putting the answer back exposes the first two at once: 3 × 6.67 + 5 is about 25, and 2 × 2.5 + 3 is 8, so neither equals what it should. Testing a law with easy numbers settles the next one: 1/(2 + 3) is 0.2, far from 0.83. Counting the letter catches P = A − Prt, since P is on both sides. And 6, 8, 10 is a right triangle you can check by hand: 36 + 64 = 100, so the long side is 10. The second set comes from the later lessons.
How the checks caught them. Putting 0 back into 2(x − 3)² + 1 gives 19 too, so a second answer was lost. Easy numbers settle the log: 2 + 8 = 10, and log₁₀ 10 is exactly 1. Trying x = 3, which the slip allows, fails 5 − 2x > 1, so the sign had to flip. For the circle, a round trip through r = 5, with π = 3.14, gives C = 31.4 and A = 78.5, not 493. And 1.05⁸ ≈ 1.477 is still short of 1.5. Python can run the ± check for you.
Quick check
What does this print?
import math
for x in [3 + math.sqrt(9), 3 - math.sqrt(9)]:
print(x, 2 * (x - 3) ** 2 + 1)
6.0 19.0
0.0 1.0
6.0 19.0
6.0 19.0
0.0 -17.0
6.0 19.0
0.0 19.0
Show the answer
6.0 19.0
0.0 19.0
Both roots put back give 19: (6 − 3)² and (0 − 3)² are both 9. That's why undoing a square keeps the ±.
Slips that hide in code. In code, a rearranging slip raises no error. C ** 2 / 4 * math.pi divides by 4 and then multiplies by π, when the formula divides by 4π. math.sqrt gives only the positive root, so the − answer has to be written by hand. And round goes to the nearest whole number, which can land below a target: a planning answer that says "at least" needs math.ceil, which always rounds up ("at most" needs math.floor). Each runs and prints a confident wrong number.
Quick check
$1,000 grows as 1000 × 1.05ⁿ. A learner says it passes $1,500 after 8 whole years. Which check shows the slip?
Try n = 0: it gives 1,000
Put 8 back: 1000 × 1.05⁸ is 1,500
Check the units: n is in years
Put 8 back: 1000 × 1.05⁸ ≈ 1,477
Show the answer
Put 8 back: 1000 × 1.05⁸ ≈ 1,477
n = ln 1.5 ÷ ln 1.05 ≈ 8.31. After 8 years it's $1,477, still short, so the first whole year past $1,500 is 9: round up.
Drill
The circle's area is far too big
circle_area(C) should give a circle's area from its circumference, A = C²/(4π), from putting r = C/(2π) into A = πr². It runs, but it's ten times too big. Find the one slip and fix it.
import math
defcircle_area(C):
return C ** 2 / 4 * math.pi
C = 2 * math.pi * 5print(circle_area(C), math.pi * 5 ** 2)
In the lesson, your code is checked as you write it.
In your own words
Which quick check caught the most slips in the two sets, and why does it work so well?
Write a sentence or two, then compare it with a good answer in the lesson.
Mixed practice
Purpose. The problems below come from all ten algebra lessons of the subcourse, roughly hardest last. Each one asks you to rearrange, then put the numbers in. Before you start, name the move it needs: peeling, clearing a fraction, collecting the letter, a root, the quadratic formula, logs, an inequality, an inverse, a sequence or combining. The strategy chart after the ladder gives you the order to decide in.
The strategy chart. For any formula and any letter:
Where is the letter, and how many times does it appear?
Twice or more: collect every copy on one side and factor it out. If it's both squared and plain, make it a quadratic, ax² + bx + c = 0.
Once: list the layers around it, in the order they were put on.
Undo them in reverse with the matching opposite:
done to the letter
undone by
+ k, − k
− k, + k
× k, ÷ k
÷ k (k ≠ 0), × k
square, nth power
± square root, nth root
a power bˣ, eˣ
log base b, ln
log base b, ln
b to the power, e to the power
1 ÷ it
1 ÷ it again
Write the conditions: no zero divisors, ± from even roots, logs of positive numbers only, a flipped sign.
Check: numbers back in, a round trip, and units. A whole count rounds the safe way: up for "at least", down for "at most".
Quick check
Step 1 of the chart: a can's surface area is S = 2πr² + 2πrh. Which move frees h, and which frees r?
h: peel; r: a quadratic
h: a quadratic; r: peel
Both: collect and factor
Both: peel in reverse
Show the answer
h: peel; r: a quadratic
h appears once, so peel it: h = (S − 2πr²)/(2πr). r appears squared and plain, so it's a quadratic: 2πr² + 2πhr − S = 0.
Worked example
Worked example: the chart on k = m/(m + 4)
m appears twice (step 1), so clear the fraction, collect and factor (step 2): km + 4k = m gives m(1 − k) = 4k, so m = 4k/(1 − k). The condition is k ≠ 1 (step 5). Step 6 runs the checks in code.
defk_of(m):
return m / (m + 4)
defm_of(k):
if k == 1:
returnNonereturn4 * k / (1 - k)
print(m_of(0.75), k_of(12))
for m in [12, 0.5, -2]:
print(m, m_of(k_of(m)))
print(m_of(1))
It runs right here in your browser, with nothing to install.
Numbers back in: m_of(0.75) is 12.0, and k_of(12) gives back 0.75. The round trips bring 12, 0.5 and −2 home, an ordinary number, a fraction and a negative, so a slip would have to fool all three. The last line is the condition. k = 1 would need m = m + 4, which never happens, so no m gives k = 1, and m_of says so with None instead of dividing by 0.
Quick check
What does this print?
import math
n = 0.9 * (1 - 0.9) / 0.04 ** 2print(round(n), math.ceil(n))
56.25 57
56 57
57 57
56 56
Show the answer
56 57
n ≈ 56.25. round goes to the nearest whole number, 56; math.ceil always rounds up, 57. A test set of 56 misses the error bar, so 57 is the answer.
Drill
The test set comes out one short
test_size(p, E) should give the smallest test set whose error bar √(p(1 − p)/n) is at most E. It returns 56 for p = 0.9 and E = 0.04, and that set's error bar is just over 0.04. Find the one slip and fix it.
import math
deftest_size(p, E):
returnround(p * (1 - p) / E ** 2)
n = test_size(0.9, 0.04)
print(n, math.sqrt(0.9 * 0.1 / n))
In the lesson, your code is checked as you write it.
In your own words
Which problem in the mixed ladder made you stop and think about the move? What in the formula told you which one to use?
Write a sentence or two, then compare it with a good answer in the lesson.
The formula sheet
Purpose. The algebra lessons of the subcourse on one sheet: each formula, the letter made the subject, the condition that goes with it, and its Python line. Lessons 30 to 35:
lesson
formula
rearranged
condition
in Python
30
y = 3(x − 2)/4 + 5
x = 4(y − 5)/3 + 2
none: the divisors are numbers
4 * (y - 5) / 3 + 2
30
v = u − gt
t = (u − v)/g
g ≠ 0
(u - v) / g
31
1/R = 1/R₁ + 1/R₂
R = R₁R₂/(R₁ + R₂)
R₁ + R₂ ≠ 0
R1 * R2 / (R1 + R2)
31
y = a/(b + x)
x = a/y − b
y ≠ 0
a / y - b
32
A = P + Prt
P = A/(1 + rt)
1 + rt ≠ 0
A / (1 + r * t)
33
A = πr²
r = √(A/π)
keep + for a length
math.sqrt(A / math.pi)
33
T = 2π√(l/g)
l = g(T/2π)²
square the whole bracket
g * (T / (2 * math.pi)) ** 2
34
ax² + bx + c = 0
x = (−b ± √(b² − 4ac))/(2a)
a ≠ 0, b² − 4ac ≥ 0
(-b + math.sqrt(b ** 2 - 4 * a * c)) / (2 * a)
35
A = P(1 + r)ⁿ
n = ln(A/P)/ln(1 + r)
A/P > 0, r > −1, r ≠ 0
math.log(A / P) / math.log(1 + r)
35
p = 1/(1 + e^(−z))
z = ln(p/(1 − p))
0 < p < 1
math.log(p / (1 - p))
Quick check
Which row of the sheet fixes the slip P = A − Prt?
Lesson 35: n = ln(A/P)/ln(1 + r)
Lesson 31: x = a/y − b
Lesson 30: t = (u − v)/g
Lesson 32: P = A/(1 + rt)
Show the answer
Lesson 32: P = A/(1 + rt)
P appears twice, so it needs collecting and factoring: A = P(1 + rt), then divide by the bracket.
Each row is also a check: if an answer breaks a row's condition, the slip is in that step.
Quick check
A learning rate starts at 0.1 and is multiplied by 0.9 each step. Which row finds the first step where it's at most 0.01, and what is it?
Lesson 36: t ≥ 21.85, so step 22
Lesson 36: t ≤ 21.85, so step 21
Lesson 36: t ≥ 21.85, so step 21
Lesson 38: n = (uₙ − a)/d + 1
Show the answer
Lesson 36: t ≥ 21.85, so step 22
0.1 × 0.9ᵗ ≤ 0.01 gives t ≥ ln(0.1)/ln(0.9) ≈ 21.85: dividing by ln 0.9, a negative, flips ≤ to ≥. Round up: step 22.
Coming up. The next Foundation module, shapes, angles and waves, opens with distances: √((x₂ − x₁)² + (y₂ − y₁)²), a root of a sum, the very slip from the first set. After it, the subcourse continues with Angles, triangles and waves: rearranging with sin, cos and tan, which adds new rows to the table of opposites: arcsin undoes sin, with its own condition, the principal angle.
In your own words
Pick the row of the sheet whose condition you're most likely to forget. What check would catch it?
Write a sentence or two, then compare it with a good answer in the lesson.
Goes deeper in
lesson 17 made letters the subject with the four moves; lesson 29 found the slips of the whole algebra module.
Formulas: rewriting and checking formulas in more Python.
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.
Learn to make any letter of any formula the subject: layers undone in reverse order, fractions, a letter that appears twice, powers, roots, quadratics, logs, inequalities, trigonometry, vectors, matrices, calculus, probability, statistics and the formulas inside AI models, each checked in Python.
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