All possible pythagorean triples, visualized
14:53

All possible pythagorean triples, visualized

3Blue1Brown 26.05.2017 4 002 171 просмотров 86 794 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
To understand all pythagorean triples like (3, 4, 5), (5, 12, 13), etc. look to complex numbers. This video was sponsored by Remix: https://www.remix.com/jobs Help fund future projects: https://www.patreon.com/3blue1brown An equally valuable form of support is to simply share some of the videos. Special thanks to these supporters: http://3b1b.co/triples-thanks Home page: https://www.3blue1brown.com/ Regarding the brief reference to Fermat's Last Theorem, what should be emphasized is that it refers to *positive* integers. You can of course have things like 0^3 + 2^3 = 2^3, or (-3)^3 + 3^3 = 0^3. Music by Vincent Rubinetti: https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown Thanks to these viewers for their contributions to translations Hebrew: Omer Tuchfeld ------------------ 3blue1brown is a channel about animating math, in all senses of the word animate. And you know the drill with YouTube, if you want to stay posted about new videos, subscribe, and click the bell to receive notifications (if you're into that). If you are new to this channel and want to see more, a good place to start is this playlist: http://3b1b.co/recommended Various social media stuffs: Website: https://www.3blue1brown.com Twitter: https://twitter.com/3Blue1Brown Patreon: https://patreon.com/3blue1brown Facebook: https://www.facebook.com/3blue1brown Reddit: https://www.reddit.com/r/3Blue1Brown

Оглавление (5 сегментов)

Introduction

When you first learned about the Pythagorean theorem, that the sum of the squares of the two shorter sides on a right triangle always equals the square of its hypotenuse, I'm guessing that you came to be pretty familiar with a few examples, like the 3-4-5 triangle, or the 5-12-13 triangle. And I think it's easy to take for granted that these even exist, examples where the sum of two perfect squares happens to be a perfect square. But keep in mind for comparison, if you were to change that exponent to any whole number bigger than 2, you go from having many integer solutions to no solutions whatsoever. This is Fermat's famous last theorem. Now there's a special name for any triplet of whole numbers, a, b, c, where a squared plus b squared equals c squared. It's called a Pythagorean triple. And what we're going to do here is find every single possible example. And moreover, we'll do so in a way where you can visualize how all of these triples fit together. This is an old question, pretty much as old as they come in math. There are some Babylonian clay tablets from 1800 BC, more than a millennium before Pythagoras himself, that just list these triples.

Proof

And by the way, while we're talking about the Pythagorean theorem, it would be a shame not to share my favorite proof, for anyone who hasn't already seen this. You start off by drawing a square on each side of the triangle, and if you take that c square and add four copies of the original triangle around it, you can get a big square whose side lengths are a plus b. But you can also arrange the a square and the b square together with four copies of the original triangle to get a big square whose side lengths are a plus b. What this means is that the negative space in each of these diagrams, the area of that big square minus four times the area of the triangle, is from one perspective clearly a squared plus b squared, but from another perspective it's c squared. Anyway, back to the question of finding whole number solutions. Start by reframing the question slightly. Among all of the points on the plane with integer coordinates, that is, all of these lattice points where grid lines cross, which ones are a whole number distance away from the origin? For example, the point 3,4 is a distance 5 away from the origin, and the point 12,5 is a distance 13 away from the origin. The question of finding Pythagorean triples is completely equivalent to finding lattice points which are a whole number distance away from the origin. Of course, for most points, like 2,1, the distance from the origin is not a whole number, but it is at least the square root of a whole number. In this case, 2 squared plus 1 squared is 5, so that distance, that hypotenuse there, is the square root of 5.

Complex multiplication

Now, taking what might seem like a strange step, but one which will justify itself in just a moment, think of this as the complex plane, so that every one of these points, like 2,1 here, is actually an individual complex number, in this case 2 plus i. What this gives is a surprisingly simple way to modify it to get a new point whose distance away from the origin is guaranteed to be a whole number. Just square it. Algebraically, when you square a complex number, expanding out this product and matching up all of the like terms, because everything here just involves multiplying and adding integers, each component of the result is guaranteed to be an integer, in this case you get 3 plus 4i. But you can also think of complex multiplication more geometrically. You take this line drawn from the origin to the number, and consider the angle it makes with the horizontal axis, as well as its length, which in this case is the square root of 5. The effect of multiplying anything by this complex number is to rotate it by that angle, and to stretch out by a factor equal to that length. So when you multiply the number by itself, the effect is to double that angle, and importantly, to square its length. Since the length started off as the square root of some whole number, this resulting length is guaranteed to be a whole number, in this case 5. Here, let's try it with another example. Start off with some complex number that has integer coordinates, like 3 plus 2i. In this case, the distance between this number and the origin is the square root of 3 squared plus 2 squared, which is the square root of 13. Now multiply this complex number by itself. The real part comes out to 3 squared plus 2i squared, which is 9 minus 4, and the imaginary part is 3 times 2 plus 2 times 3, so the result is 5 plus 12i, and the magnitude of this new number is 13, the square of the magnitude of our starting number, 3 plus 2i. So simply squaring our randomly chosen lattice point gives us the 5-12-13 triangle.

Pythagorean triples

There's something kind of magical about actually watching this work. It almost feels like cheating. You can start with any randomly chosen lattice point, like 4 plus i, and just by taking its square, you generate a pythagorean triple. In this case, 4 plus i squared is 15 plus 8i, which has a distance 17 away from the origin. If you play around with this, which I encourage you to do, you'll find that some of the results are kind of boring. If both the coordinates of your starting point are the same, or if one of them is zero, then the triple at the end is going to include a zero. For example, 2 plus 2i squared gives 8i, and even though technically this is indeed a lattice point a whole number distance away from the origin, the triple that it corresponds to is 0 squared plus 8 squared equals 8 squared, which isn't exactly something to write home about. But for the most part, this method of squaring complex numbers is a surprisingly simple way to generate non-trivial pythagorean triples. And you can even generalize it to get a nice formula. If you write the coordinates of your initial point as u and v, then when you work out u plus vi squared, the real part is u squared minus v squared, and the imaginary part is 2 times uv. The resulting distance from the origin is going to be u squared plus v squared. It's kind of fun to work out this expression algebraically and see that it does indeed check out, and it's also fun to plug in some random integers for u and v and get out a pythagorean triple. Essentially, we've created a machine where you give it any pair of integers, and it gives you back some pythagorean triple. A really nice way to visualize this, which will be familiar to any of you who watched the zeta function video, is to watch every point of z on the plane move over to the point z squared. For example, the point 3 plus 2i is going to move over to 5 plus 12i. The point i is going to rotate 90 degrees to its square, negative 1. The point negative 1 is going to move over to 1, and so on. Now when you do this to every single point on the plane, including the grid lines, which I'll make more colorful so they're easier to follow, here's what it looks like. So the grid lines all get turned into these parabolic arcs, and every point where these arcs intersect is a place where a lattice point landed, so it corresponds to some pythagorean triple. That is, if you draw a triangle whose hypotenuse is the line between any one of these points and the origin, and whose legs are parallel to the axes, all three side lengths of that triangle will be whole numbers. What I love about this is that usually when you view pythagorean triples just on their own, they seem completely random and unconnected, and you'd be tempted to say there's no pattern. But here we have a lot of them sitting together really organized, just sitting on the intersections of these nicely spaced curves. Now you might ask if this accounts for every possible pythagorean triple. Sadly, it does not. For example, you will never get the point 6 plus 8i using this method, even though 6-8-10 is a perfectly valid pythagorean triple. There are simply no integers u and v where u plus vi squared is 6 plus 8i. Likewise, you will never hit 9 plus 12i. But these don't really feel like anything new, do they? Since you can get each one of them by scaling up the familiar triple 3-4-5, which is accounted for in our method. In fact, for reasons that I'll explain shortly, every possible pythagorean triple that we miss is just some multiple of a different triple that we hit. To give another example, we miss the point 4 plus 3i. There are no integers u and v, so that u plus vi squared is 4 plus 3i. In fact, you'll never hit any points whose imaginary component is odd. However, we do hit 8 plus 6i, that's 3 plus i squared. So even though we miss 4 plus 3i, it's just one half times the point we do hit. And by the way, you'll never have to scale down by anything smaller than one half. A nice way to think about these multiples that we miss is to take each point that we get using this squaring method and draw a line from the origin through that point out to infinity. Marking all of the lattice points that this line hits will account for any multiples of these points that we might have missed. Doing this for all possible points, you'll account for every possible Pythagorean triple, Every right triangle that you ever have seen or ever will see that has whole number side lengths is accounted for somewhere in this diagram. To see why, we'll now shift to a different view of the pythagorean triple problem, one that involves finding points on a unit circle that have rational coordinates. If you take the expression a squared plus b squared equals c squared and divide out by that c squared, what you get is a over c squared plus b over c squared equals 1. This gives us some point on the unit circle x squared plus y squared equals 1 whose coordinates are each rational numbers. This is what we call a rational point of the unit circle. And going the other way around, if you find some rational point on the unit circle, when you multiply out by a common denominator for each of those coordinates, what you'll land on is a point that has integer coordinates and whose distance from the origin is also an integer. With that in mind, consider our diagram, where we squared every possible lattice point and then drew these radial lines through each one to account for any multiples that we might have missed. If you project all of these points onto the unit circle, each one moving along its corresponding radial line, what you'll end up with is a whole bunch of rational points on that circle.

Rational points on the unit circle

And keep in mind, by the way, I'm drawing only finitely many of these dots and lines, but if I drew all infinitely many lines corresponding to every possible squared lattice point, it would actually fill every single pixel of the screen. Now if our method was incomplete, if we were missing a Pythagorean triple out there somewhere, it would mean that there's some rational point on this circle that we never hit once we project everything onto the circle. And let me show you why that cannot happen. Take any one of those rational points and draw a line between it and the point at negative 1. When you compute the rise over run slope of this line, the Rise between the two points is rational and the Run is also rational, so the slope itself is just going to be some rational number. So if we can show that our method of squaring complex numbers accounts for every possible rational slope here, it's going to guarantee that we hit every possible rational point of the unit circle, right? Well, let's think through our method. We start off with some point u plus vi that has integer coordinates, and this number makes some angle off of the horizontal, which I'm going to call theta. Squaring this number, the resulting angle off the horizontal, is 2 times theta. And of course, when you project that onto the unit circle, it's along the same radial line, so the corresponding rational point of the unit circle also has that same angle, 2 times theta. And here, I'll bring in a nice little bit of circle geometry, which is that any time you have an angle between two points on the circumference of a circle and its center, that turns out to be exactly two times the angle made by those same points and any other point on the circle's circumference, provided that other point isn't between the original two points. What this means for our situation is that the line between negative 1 and the rational point on the circle must make an angle theta with the horizontal. In other words, that line has the same slope as the line between the origin and our initial complex number, u plus vi. But look at the rise over run slope of the line defined by our choice of integers, u and v. The slope is v divided by u, and of course, we can choose v and u to be whatever integers we want, 199 00:14:00,420 --> 00:13:59,720 The slope is v divided by u. And of course, we can choose v and u to be whatever integers we want, and therefore we do indeed account for every possible rational slope. So there you go! The radial lines from our method, determined by all possible choices of u and v, must pass through every rational point on this circle. And that means our method must hit every possible Pythagorean triple. If you haven't already watched the video about pi hiding in prime regularities, the topics there are highly related to the ones here. Thank you for watching!

Методичка по этому видео

Структурированный конспект

Все пифагоровы тройки: визуализация через комплексные числа

Элегантный метод нахождения всех пифагоровых троек через возведение комплексных чисел в квадрат и их визуализация на комплексной плоскости.

Другие видео автора — 3Blue1Brown

Ctrl+V

Экстракт Знаний в Telegram

Экстракты и дистилляты из лучших YouTube-каналов — сразу после публикации.

Подписаться

Дайджест Экстрактов

Лучшие методички за неделю — каждый понедельник