From: 3blue1brown
The Pythagorean theorem states that for a right triangle, the sum of the squares of the two shorter sides always equals the square of its hypotenuse [00:00:03]. Common examples of integer side lengths satisfying this theorem include the 3-4-5 triangle and the 5-12-13 triangle [00:00:15]. It’s notable that the sum of two perfect squares can result in another perfect square [00:00:21]. In contrast, if the exponent were any whole number greater than 2, there would be no integer solutions, a concept known as Fermat’s Last Theorem [00:00:30].
A triplet of whole numbers (a, b, c) where a² + b² = c² is called a Pythagorean triple [00:00:44].
Historical Context
The question of finding Pythagorean triples is ancient, with Babylonian clay tablets from 1800 BC listing these triples, over a millennium before Pythagoras himself [00:01:04].
Proof of the Pythagorean Theorem
One visual proof of the Pythagorean theorem involves squares drawn on each side of a right triangle [00:01:25].
- Start with the square on the hypotenuse (c-square) and add four copies of the original triangle around it to form a larger square with side lengths (a + b) [00:01:29].
- Alternatively, arrange the squares on the two shorter sides (a-square and b-square) together with four copies of the original triangle to also form a large square with side lengths (a + b) [00:01:38].
- The “negative space” in both diagrams (the area of the big square minus four times the area of the triangle) must be equal [00:01:47]. From one perspective, this area is a² + b² [00:01:55], and from the other, it is c² [00:01:58], thus proving a² + b² = c² [00:01:58].
Reframing the Problem: Lattice Points
Finding Pythagorean triples is equivalent to finding lattice points (points with integer coordinates) on a plane that are a whole number distance away from the origin [00:02:06].
- For example, the point (3,4) is a distance of 5 from the origin [00:02:20].
- The point (12,5) is a distance of 13 from the origin [00:02:24].
- For most lattice points, like (2,1), the distance from the origin is not a whole number (e.g., √5 for (2,1)) [00:02:38].
Generating Triples Using Complex Numbers
A surprising method for generating Pythagorean triples involves complex numbers [00:02:57]. Think of the plane as the complex plane, where each point (a,b) corresponds to a complex number a + bi [00:03:05].
The Squaring Method
Squaring a complex number of the form u + vi, where u and v are integers, guarantees that its components are integers and its magnitude is a whole number [00:03:12].
Algebraically, when you square u + vi: (u + vi)² = u² + 2uvi + (vi)² = u² + 2uvi - v² = (u² - v²) + (2uv)i [00:06:14]. The resulting real part is (u² - v²), and the imaginary part is (2uv) [00:06:19]. The distance from the origin (magnitude) of this new number is (u² + v²) [00:06:30]. This directly gives a Pythagorean triple: (u² - v²)² + (2uv)² = (u² + v²)² [00:06:35].
Geometrically, complex multiplication involves rotation and stretching [00:03:40]. If a complex number z has a length (magnitude) L and an angle θ with the horizontal axis [00:03:44], then z² will have a length of L² and an angle of 2θ [00:04:05]. Since the initial length L is the square root of a whole number (e.g., √(u² + v²)), squaring it results in a whole number (u² + v²) [00:04:13].
Examples:
- Start with 2 + i: (2 + i)² = 3 + 4i [00:03:08]. The original number’s magnitude is √5, and the squared number’s magnitude is 5. This gives the 3-4-5 triangle [00:03:08].
- Start with 3 + 2i: (3 + 2i)² = 5 + 12i [00:04:25]. The original magnitude is √13, and the squared magnitude is 13. This gives the 5-12-13 triangle [00:04:30].
- Start with 4 + i: (4 + i)² = 15 + 8i [00:05:15]. This has a distance of 17 from the origin, forming the 15-8-17 triple [00:05:24].
”Boring” Triples
If the coordinates of the starting complex number (u,v) are the same (e.g., u=v) or one is zero, the resulting triple might include a zero [00:05:37]. For example, (2 + 2i)² = 8i, which corresponds to the 0-8-8 triple [00:05:45].
Visualizing Pythagorean Triples
A powerful way to visualize this process is by mapping every point z on the complex plane to z² [00:06:55]. When the grid lines of the complex plane are transformed by the z² function, they turn into parabolic arcs [00:07:22]. Every intersection point of these transformed arcs represents a lattice point that is a whole number distance from the origin, thus corresponding to a Pythagorean triple [00:07:35]. This visualization organizes what often seems like random triples into a clear pattern on nicely spaced curves [00:08:08].
Completeness of the Method
While the squaring method generates many Pythagorean triples, it does not generate every possible triple directly [00:08:24].
- For example, 6-8-10 is a valid triple (6² + 8² = 36 + 64 = 100 = 10²), but there are no integers u and v such that (u + vi)² = 6 + 8i [00:08:31].
- Similarly, 4-3i is missed, as its imaginary component is odd [00:09:11]. However, 8+6i (which is (3+i)²) is hit, and 4+3i is simply half of 8+6i [00:09:26].
Any Pythagorean triple missed by this method is simply a multiple of a triple that is generated [00:09:02]. By drawing radial lines from the origin through all points generated by the squaring method (and thus through their multiples), every possible Pythagorean triple can be accounted for [00:09:42].
Connection to Rational Points on the Unit Circle
This problem can be reframed as finding points on a unit circle (x² + y² = 1) that have rational coordinates [00:10:22]. If a² + b² = c², dividing by c² gives (a/c)² + (b/c)² = 1 [00:10:33]. This means (a/c, b/c) is a rational point on the unit circle. Conversely, any rational point (x,y) on the unit circle, when multiplied by a common denominator, yields integer coordinates whose distance from the origin is also an integer [00:10:56].
When all points generated by the squaring method (and their multiples) are projected onto the unit circle along their radial lines, they cover all rational points on that circle [00:11:11].
To demonstrate that this method accounts for every rational point on the unit circle:
- Take any rational point on the unit circle [00:12:03].
- Draw a line between this point and the point (-1,0) [00:12:05].
- The slope of this line (rise over run) will be a rational number, as both rise and run are rational [00:12:09].
- Consider the initial complex number u + vi used in the squaring method. It makes an angle θ with the horizontal [00:12:39].
- Squaring this number yields a point whose angle is 2θ [00:12:48]. This 2θ is the angle made by the rational point (from the unit circle) and the origin [00:12:59].
- By circle geometry, the angle made by the line connecting (-1,0) to the rational point on the circle is half of the central angle, meaning it is θ [00:13:08].
- Therefore, the slope of this line from (-1,0) to the rational point is the same as the slope of the line from the origin to our initial complex number u + vi [00:13:38].
- The slope of u + vi is v/u [00:13:46]. Since u and v can be any integers, we can account for every possible rational slope [00:13:59].
- This implies that the radial lines from our method pass through every rational point on the unit circle [00:14:07], ensuring that every possible Pythagorean triple is accounted for [00:14:16].