Foundations — Extended Euclidean algorithm
Before we can even read the parent note, we need to earn each piece of its vocabulary. We go one symbol at a time, and nothing is used before it is drawn.
0. Two operators we lean on: (add) and (order)
The picture: everything is just which side of the other a point sits on the same line we draw next. We name these now because every later rule ("the remainder satisfies ") is spoken in this language.
1. Whole numbers and the number line
The picture is a number line: evenly spaced ticks stretching left and right forever. Positive numbers step right, negative numbers step left, zero sits in the middle.

Why the topic needs it. Everything in this chapter — remainders, coefficients, gcds — lives on this line. When we later write , that is just "walk 4 steps left of zero". The letters that fill the parent note are all integers; they are all just chosen points on this line.
2. Letters standing for numbers: , , ,
The picture: think of and as two labelled tokens sitting on the number line. In the parent note:
- and are the two numbers we start with (e.g. and ).
- and are the two answers we are hunting for — how many copies of and of to combine.
Why the topic needs it. The whole point is a general recipe that works for any starting pair. Naming the pair lets us state one formula instead of redoing arithmetic for every example.
3. Multiplication as repeated stacking, and
The picture: a stack of equal-length jumps along the number line. is three jumps of length to the right; is two jumps of length to the left.

Why the topic needs it. The star formula the parent note chases — a linear combination that equals the gcd (defined next in §4) — is exactly this shape . The entire algorithm is a machine for finding the two coefficients and . If "linear combination" is fuzzy, the goal is invisible.
4. Divides, common divisor, and
The picture: measure two sticks of length and with the same ruler. A common divisor is any ruler-spacing that fits both sticks a whole number of times. The gcd is the longest such spacing — the biggest tile that paves both sticks perfectly.

Why the topic needs it. is the target the algorithm computes and the right-hand side of Bézout's identity. See Euclidean Algorithm for the plain version that finds only this number.
5. Quotient and remainder:
This is the heartbeat of the whole algorithm, so we build it carefully.
The picture: pour into buckets each holding . You fill full buckets; the puddle that can't fill another bucket is .

Why the topic needs it. Every single row of the Extended Euclidean table is one division equation. The subscripted symbols and below are just this same step, repeated.
6. Subscripts, the remainder chain, and the coefficient sequences
The picture: a row of numbered lockers. is "whatever is in locker ". is "the locker just before "; is "two lockers before ".
Where the chain starts. We seed the two lockers before any division happens: Then each new locker is the remainder of dividing the two before it, using §5's equation , i.e.
Now the two coefficient sequences. For each locker we also track how that remainder is built from and . We define two number sequences and by the requirement Their starting values fall straight out of the seeds:
- .
- .
Why the recurrence follows. Each new remainder is literally the same subtraction we do on the numbers — we just perform it on their recipes instead. The coefficients obey the exact same "two-lockers-ago minus times one-locker-ago" rule because that is the only operation happening. That is the whole engine of the Extended algorithm.
Why the topic needs it. The parent note's recurrence is now grounded: you know what is (the -coefficient of locker ), where it starts (), and why the formula holds (it inherits the remainder subtraction).
7. Congruence and (for the applications)
The picture: a clock with marks. Walking steps and walking steps land you on the same mark. On a -hour clock, .
Why the topic needs it. The parent note's applications — Modular Multiplicative Inverse, RSA Algorithm — live on this clock. From you read : on the mod- clock, the term wraps all the way around and vanishes, leaving landing on mark . That is why the coefficient is the inverse.
How these foundations feed the topic
Read top to bottom: add/order and the number line give us letters and linear combinations and the gcd; division-with-remainder plus subscripts give us the plain Euclidean algorithm; tracking coefficient sequences through it gives the extended version, which produces Bézout's identity, which powers the mod- applications.
Equipment checklist
Cover the right side and answer each before opening the parent note.
What does mean on the number line?
What is an integer, in one phrase?
What does mean in plain words?
What is , and what is ?
What is a linear combination of and ?
In , what are and , what constraint does obey, and what may never be?
Is equal to ?
What are the seed values and the coefficient seeds ?
Why does hold?
Why does the remainder chain eventually reach ?
What does say on a clock?
Connections
- Euclidean Algorithm — the plain gcd-finder these foundations lead into
- Bézout's Identity — the equation all this vocabulary lets you read
- Modular Multiplicative Inverse — needs the congruence and gcd pieces from §4 and §7
- Linear Diophantine Equations — built on linear combinations from §3
- Chinese Remainder Theorem — layers congruences from §7
- RSA Algorithm — uses inverses mod from §7