The Euclidean algorithm as cutting squares

The question
What can cutting squares from an 84 by 30 rectangle tell you about its two side lengths?
Make the cuts, then explain what survives them.
- 1 SeeChoose squares and cut the rectangle.
- 2 TryCompare rectangles and find common tiles.
- 3 ProveExplain why the last side works.
- 4 ApplySolve divisibility and tiling problems.
Before you start · 3 quick checks on multiplication, subtraction, and area
Two ideas before you start
2 ideasA divisor leaves no leftover
A strip partitioned into equal lengths. Choose a length to see whether it fits exactly.
A positive integer divides a length when copies of it cover the length exactly. A common divisor must work for both lengths.
Exact definition
For integers \(d\gt0\) and \(a\ge0\), write \(d\mid a\) if \(a=dm\) for some integer \(m\). If \(d\mid a\) and \(d\mid b\), then \(d\) is a common divisor. For positive integers \(a,b\), their greatest common divisor, \(\gcd(a,b)\), is the largest positive integer dividing both. It exists because the common divisors form a nonempty finite set: they include the unit length and cannot exceed either positive length.
Division records the leftover
A strip showing full groups and a leftover. Change the group size.
The quotient counts full groups. The remainder is what is left after removing them.
Exact definition
For integers \(a\ge0\), \(b\gt0\), division with remainder writes \(a=qb+r\), where \(q\) and \(r\) are integers and \(0\le r\lt b\). Here \(q=\lfloor a/b\rfloor\), the largest integer no greater than \(a/b\), and \(r=a-qb\). The restriction on \(r\) makes the pair unique. If another full group still fits, the quotient is not finished.
What lengths and cuts mean here
All starting side lengths are positive integers measured in the same unit. Squares have sides parallel to the rectangle's sides. Cuts have no thickness, and no material is lost. The figures show exact ideal lengths, rather than measured dimensions with uncertainty. Each cut removes a square from one end of the longer side. The remaining piece is another rectangle unless nothing remains.
The arithmetic needs only multiplication and subtraction. The prerequisite box supplies a refresher for each. No prime factorization, modular arithmetic, or calculus is required.
Choose the next square
- Read the two current side lengths below the picture.
- Enter the side of the largest square that fits, then press Cut square. A smaller square may fit, but this activity asks for the largest.
- Keep cutting until no rectangle remains. Start over clears your cuts and the explanation.
Put repeated cuts on one line
Several consecutive squares can have the same side. Instead of recording each subtraction, a division line records how many such squares fit and the width of the leftover strip. The next line turns that leftover into the shorter side. The last line has no leftover, so its square side is the final positive size encountered.
This first tiling uses different square sizes. Do not confuse it with a grid of equal squares: that is a different task. The final size suggests a candidate for a common measuring unit. Try checks that idea, and Prove explains why it works for every positive integer pair.
Compare two cutting runs
Make a prediction before opening the division traces. Think about the effect of adding a whole strip to a rectangle.
Adding a strip whose width equals the shorter side adds an initial square. After that square is removed, the smaller starting rectangle is recovered. The two runs then make identical cuts. The first quotient can change even when the final square size does not.
Use what you found: equal tiles
- Choose an integer tile side with the slider or its number box.
- The readout tests both edge lengths. A remainder on either edge means that side does not make an equal-square grid.
- Find the largest side that works, then advance to the next goal.
Here the tiles are all the same size and form an aligned rectangular grid, with no gaps, overlaps, grout, or trimming. A tile side works exactly when it divides both edge lengths. Maximizing that side minimizes the tile count, since the count is the fixed rectangle area divided by the square of the side. This claim concerns equal tiles in this grid model; it does not claim that the cutting run uses the fewest possible squares of mixed sizes.
What a division step preserves
Start with integers \(a\ge b\gt0\). Divide \(a=qb+r\), where \(q\ge1\) and \(0\le r\lt b\). Then
\[\gcd(a,b)=\gcd(b,r).\]If \(r\gt0\), replace the pair by \((b,r)\) and repeat. If \(r=0\), stop and return \(b\). The procedure stops after finitely many divisions and returns the greatest common divisor of the original pair. At the endpoint we define \(\gcd(b,0)=b\) for \(b\gt0\). Swapping the initial lengths if needed puts them in the stated order.
The proof uses two facts: sums and differences of integer multiples of a positive integer are multiples of it, and positive integers cannot decrease strictly forever. For the divisibility steps, \(d\) is any positive integer, and the letters \(m,n,k\) denote integer multipliers.
Preserving a single divisor is not enough. The forward step shows that no old common divisor is lost. The reverse step shows that no new common divisor is introduced. Together they give equality of the whole sets, and therefore equality of their greatest members.
The stopping argument uses integers. A decreasing sequence of positive real numbers can continue forever, as the lesson on convergent sequences illustrates. Integer side lengths make this process terminate. A real-valued numerical implementation with approximate remainders would need a separate error analysis.
Use the algorithm
Work through the divisions before entering an answer. Each problem has hints and a full solution. Enter exact integers or equivalent fractions; there is no rounding tolerance.
Related proof practice: epsilon–delta limits make the order of choices explicit. Cantor's diagonal argument turns a construction into a proof about an entire set. Here the set is the common divisors, and the construction is a sequence of divisions.
Further reading
- Euclid, Elements, Book VII, propositions 1–2, on measuring two numbers by repeated subtraction.