All possible pythagorean triples, visualized
Based on 3Blue1Brown's video on YouTube. If you like this content, support the original creators by watching, liking and subscribing to their content.
Represent lattice points (u, v) as complex numbers u + vi so that distance from the origin becomes √(u² + v²).
Briefing
Pythagorean triples—integer side lengths (a, b, c) satisfying a² + b² = c²—can be generated and visualized in a single, surprisingly structured way: take lattice points in the complex plane and repeatedly square them. Every lattice point (u, v) corresponds to the complex number u + vi, whose distance from the origin is √(u² + v²). Squaring u + vi produces (u² − v²) + (2uv)i, and the new point’s distance from the origin becomes u² + v², a guaranteed whole number. That algebraic “machine” turns any integer pair (u, v) into a Pythagorean triple, with the legs given by |u² − v²| and |2uv| and the hypotenuse by u² + v². Examples fall out immediately: (3 + 2i)² = 5 + 12i yields the 5–12–13 triangle, and (4 + i)² = 15 + 8i yields the 8–15–17 triangle.
The visualization comes from applying the transformation z → z² to the entire integer grid. Under squaring, straight grid lines warp into parabolic arcs. Where these arcs intersect land on squared lattice points—exactly the points whose distance from the origin is an integer, hence the endpoints of hypotenuses for right triangles with integer legs. This reframes triples from scattered curiosities into an organized geometric pattern: instead of isolated solutions, they cluster at predictable intersections.
But the method doesn’t hit every triple directly. Some valid triples correspond to lattice points that never appear as z² for integer z. The transcript gives concrete misses such as 6 + 8i (the 6–8–10 triple) and 9 + 12i, and notes that points with odd imaginary parts are never produced. The key fix is to account for scaling: even when a primitive triple’s point is missing, its multiples can still be recovered. For each point produced by squaring, draw the ray from the origin through that point; every lattice point on that ray corresponds to a scaled-up triple. Doing this for all squared lattice points fills in the gaps left by the initial squaring step.
To justify that nothing is still missing, the argument shifts to rational points on the unit circle. Dividing a² + b² = c² by c² turns it into x² + y² = 1 with x = a/c and y = b/c, so every integer triple corresponds to a rational point on the unit circle. Squaring lattice points and projecting along rays produces a set of rational points on that circle; the remaining question is whether any rational point could evade all rays. The transcript rules that out by using slopes: connect any rational point on the circle to −1, observe that the line’s slope is rational, and show that the squaring construction realizes every possible rational slope. Because the rays from the origin cover all rational slopes, they must pass through every rational point on the unit circle, meaning every integer Pythagorean triple is accounted for somewhere in the diagram.
In short: squaring lattice points generates a structured subset of triples, scaling along rays completes the set, and a slope-based rational-circle argument guarantees the completion is total.
Cornell Notes
Squaring a lattice point (u, v) viewed as the complex number u + vi turns its distance from the origin into a whole number and produces a Pythagorean triple. Algebraically, (u + vi)² = (u² − v²) + (2uv)i, so the legs are |u² − v²| and |2uv| and the hypotenuse is u² + v². Visualizing z → z² warps the integer grid into parabolic arcs; intersections correspond to triples. Some triples are not hit directly (e.g., 6–8–10), but scaling fixes this: every multiple lies on a ray through a generated point. Projecting those rays onto the unit circle yields all rational points x² + y² = 1, and a slope argument shows no rational point can be missed—so every integer Pythagorean triple appears.
How does squaring a complex number u + vi guarantee a Pythagorean triple?
Why do parabolic arcs appear when transforming the integer grid by z → z²?
What kinds of triples are missed by direct squaring, and how are they recovered?
How does the unit-circle rational-point viewpoint connect to integer triples?
What slope argument ensures no rational point on the unit circle is missed?
Review Questions
- Given u and v, what are the explicit formulas for the legs and hypotenuse of the resulting Pythagorean triple from (u + vi)²?
- Why does drawing rays from the origin through generated points recover triples that are not directly produced by squaring?
- How does the slope of the line from −1 to a rational point on the unit circle relate to the rational slopes achievable from v/u?
Key Points
- 1
Represent lattice points (u, v) as complex numbers u + vi so that distance from the origin becomes √(u² + v²).
- 2
Squaring z = u + vi yields z² = (u² − v²) + (2uv)i, producing a² + b² = c² with c = u² + v².
- 3
The transformation z → z² turns the integer grid into parabolic arcs; intersections correspond to endpoints of integer hypotenuses for axis-aligned right triangles.
- 4
Some valid triples are not hit directly (e.g., 6–8–10), but scaling along rays through generated points recovers all multiples.
- 5
Projecting the rays onto the unit circle produces rational points on x² + y² = 1, matching the rational form of the Pythagorean equation.
- 6
A slope argument shows every rational slope—and therefore every rational point on the unit circle—is reached, guaranteeing all integer Pythagorean triples appear.