Hexa Scholar

The Euclidean algorithm as cutting squares

A clay carpenter saws a wooden board marked into two equal squares and a narrow leftover strip; one square tile already lies cut off.
A carpenter cuts the largest squares the board allows, then keeps working on the strip that is left.

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. 1 SeeChoose squares and cut the rectangle.
  2. 2 TryCompare rectangles and find common tiles.
  3. 3 ProveExplain why the last side works.
  4. 4 ApplySolve divisibility and tiling problems.
Before you start · 3 quick checks on multiplication, subtraction, and area

Two ideas before you start

2 ideas

A 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.

1 See

Choose the next square

Outlined squares are completed cuts. The dashed rectangle is the piece still to cut; every shape uses the same length scale.

2 Try

Compare two cutting runs

Make a prediction before opening the division traces. Think about the effect of adding a whole strip to a rectangle.

3 Prove

What a division step preserves

Theorem: Euclidean algorithm

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.

4 Apply

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.

Key point Return the divisor in the line whose remainder is zero, the last positive number in the run, not the final zero. Check that it divides both original numbers. The invariant proves it is the greatest; divisibility alone only proves that it is a candidate.
Level IntroPrerequisites integer arithmetic, refreshed aboveTime ~30 min

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