Pi hiding in prime regularities
29:43

Pi hiding in prime regularities

3Blue1Brown 19.05.2017 2 778 706 просмотров 59 003 лайков

Machine-readable: Markdown · JSON API · Site index

Поделиться Telegram VK Бот
Транскрипт Скачать .md
Анализ с AI
Описание видео
A story of pi, primes, complex numbers, and how number theory braids them together. Mathologer on why 4k + 1primes break down as sums of squares: https://youtu.be/DjI1NICfjOk Help fund future projects: https://www.patreon.com/3blue1brown An equally valuable form of support is to share the videos. Special thanks to these supporters: http://3b1b.co/leibniz-thanks Home page: https://www.3blue1brown.com/ For those of you curious about the finer details, here's a writeup from the viewer Daniel Flores justifying the final approximation: https://www.overleaf.com/read/wdzkfjbkwzyf The fact that only primes that are one above a multiple of four can be expressed as the sum of two squares is known as "Fermat's theorem on sums of two squares": https://goo.gl/EdhaN2 Music by Vince Rubinetti: https://vincerubinetti.bandcamp.com/album/the-music-of-3blue1brown Timestamps 0:00 - Introduction 1:39 - Counting lattice points 5:47 - Gaussian integers 10:30 - The lattice point recipe 17:50 - Counting on one ring 20:14 - Exploiting prime regularity 25:19 - Combining the rings 28:36 - Branches of number theory 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

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

Introduction

This is a video I've been excited to make for a while now. The story here braids together prime numbers, complex numbers, and pi in a very pleasing trio. Quite often in modern math, especially that which flirts with the remon zeta function, these three seemingly unrelated objects show up in unison. And I want to give you a little peak at one instance where this happens. One of the few that doesn't require too heavy a technical background. That's not to say that this is easy. In fact, this is probably one of the most intricate videos I've ever done. But the culmination is worth it. What we'll end up with is a formula for pi, a certain alternating infinite sum. This formula is actually written on the mug that I'm drinking coffee from right now as I write this. And a fun but almost certainly apocryphal story is that the beauty of this formula is what inspired Linets to quit being a lawyer and instead pursue math. Now, whenever you see pi show up in math, there's always going to be a circle hiding somewhere, sometimes very sneakily. So, the goal here is not just to discover this sum, but to really understand the circle hiding behind it. You see, there is another way that you can prove the same result that you and I are going to spend some meaningful time building up to, but with just a few lines of calculus. And this is one of those proofs that leaves you thinking, okay, I suppose that's true, but not really getting a sense for why or for where the hidden circle is. On the path that you and I will take, though, what you'll see is that the fundamental truth behind this sum and the circle that it hides is a certain regularity in the way that prime numbers

Counting lattice points

behave when you put them inside the complex numbers. To start the story, imagine yourself with nothing more than a pencil, some paper, and a desire to find a formula for computing pi. There are countless ways that you could approach this, but as a broad outline for the plot line here, you'll start by asking how many lattice points of the plane sit inside a big circle. And then that question is going to lead to asking about how to express numbers as the sum of two squares, which in turn is going to lead us to factoring integers inside the complex plane. From there, we'll bring in this special function named Kai, which is going to give us a formula for pi that at first seems to involve a crazy complicated pattern dependent on the distribution of primes. But a slight shift in perspective is going to simplify it dramatically and expose the ultimate gold nugget. It's a lot, but good math takes time, and we'll take it step by step. When I say lattice point, what I mean is a point A on the plane where A and B are both integers. a spot where the grid lines here cross. If you draw a circle centered at the origin, let's say with radius 10, how many lattice points would you guess are inside that circle? Well, there's one lattice point for each unit of area. So, the answer should be approximately equal to the area of the circle, p< unk> r^ 2, which in this case is p< unk> * 10^ 2. And if it was a really big circle like radius 1 million, you would expect this to be a much more accurate estimate in the sense that the percent error between the estimate p< unk> r^ squ and the actual count of lattice points should get smaller. What we're going to try to do is find a second way to answer this same question. How many lattice points are inside the circle? Because that can lead to another way to express the area of a circle and hence another way to express pi. And so you play and you wonder and maybe, especially if you just watched a certain calculus video, you might try looking through every possible ring that a lattice point could sit on. Now, if you think about it, for each one of these lattice points, AB, its distance from the origin is the square root of a^2 + b^2. And since a and b are both integers, a^2 + b^2 is also some integer. So you only have to consider rings whose radi are the square roots of some whole number. A radius of 0 just gives you that single origin point. If you look at the radius 1, that hits four different lattice points. Radius square< unk> of two, well that also hits four lattice points. A radius< unk> of 3 doesn't actually hit anything. Square< unk> of 4 again hits four lattice points. A radius square< unk> of 5 actually hits eight lattice points. And what we want is a systematic way to count how many lattice points are on a given one of these rings, a given distance from the origin, and then to tally them all up. And if you pause and try this for a moment, what you'll find is that the pattern seems really chaotic, just very hard to find order under here. And that's a good sign that some very interesting math is about to come into play. In fact, as you'll see, this pattern is rooted in the distribution of primes. As an example, let's look at the ring with radius< unk> 25. It hits the point 50 since 5^ 2 + 0 2 is 25. It also hits 4 3 since 4 2 + 3 2 gives 25. And likewise, it hits 3 4 and also 05. And what's really happening here is that you're counting how many pairs of integers a have the property that a^2 + b^2 = 25. And looking at this circle, it looks like there's a total of 12 of them. As another example, take a look at the ring with radius< unk> 11. It doesn't hit any lattice points. And that corresponds to the fact that you cannot find two integers whose squares add up to 11. Try it.

Gaussian integers

Now many times in math when you see a question that has to do with the 2D plane it can be surprisingly fruitful to just ask what it looks like when you think of this plane as the set of all complex numbers. So instead of thinking of this lattice point here as the pair of integer coordinates 3 4 instead think of it as the single complex number 3 + 4 I. that way. Another way to think about the sum of the squares of its coordinates 3^2 + 4^ 2 is to multiply this number by 3 - 4 i. This is called its complex conjugate. It's what you get by reflecting over the real axis, replacing i with negative i. And this might seem like a strange step if you don't have much of a history with complex numbers. But describing this distance as a product can be unexpectedly useful. It turns our question into a factoring problem, which is ultimately why patterns among prime numbers are going to come into play. Algebraically, this relation is straightforward enough to verify. You get a 3^ 2 and then the 3 * - 4 I cancels out with the 4 I * 3 and then you have -4 I 2 which because I 2 is -1 becomes + 4 2. This is also quite nice to see geometrically. And if you're a little rusty with how complex multiplication works, I do have another video that goes more into detail about why complex multiplication looks the way that it does. The way you might think about a case like this is that the number 3 + 4 I has a magnitude of 5 and some angle off of the horizontal. And what it means to multiply it by 3 - 4 I is to rotate by that same angle in the opposite direction putting it on the positive real axis and then to stretch out by a factor of five which in this case lands you on the output 25 the square of the magnitude. The collection of all of these lattice points a plus b i where a and b are integers has a special name. They're called the Gaussian integers, named after Martin Sheen. Geometrically, you'll still be asking the same question. How many of these lattice points, Gaussian integers, are a given distance away from the origin, like< unk> of 25? But we'll be phrasing it in a slightly more algebraic way. How many Gaussian integers have the property that multiplying by their complex conjugate gives you 25? This might seem needlessly complex, but it's the key to understanding the seemingly random pattern for how many lattice points are a given distance away from the origin. To see why, we first need to understand how numbers factor inside the Gaussian integers. As a refresher, among ordinary integers, every number can be factored as some unique collection of prime numbers. For example, 2,250 can be factored as 2 * 3 ^ 2 * 5 cubed. And there is no other collection of prime numbers that also multiplies to make 2250. Unless you let negative numbers into the picture, in which case you could just make some of the primes in this factorization negative. So really within the integers factorization is not perfectly unique. It's almost unique with the exception that you can get a different looking product by multiplying some of the factors by negative 1. The reason I bring that up is that factoring works very similarly inside the Gaussian integers. Some numbers like five can be factored into smaller Gaussian integers which in this case is 2 + i * 2 - i. This Gaussian integer here 2 + i cannot be factored into anything smaller. So we call it a Gaussian prime. Again, this factorization is almost unique. But this time, not only can you multiply each one of those factors by -1 to get a factorization that looks different, you can also be extra sneaky and multiply one of these factors by i and then the other one by negative i. This will give you a different way to factor five into two distinct Gaussian primes. But other than the things that you can get by multiplying some of these factors by -1 or i or negative i, factorization within the gaussian integers is unique. And if you can figure out how ordinary prime numbers factor inside the gaussian integers, that'll be enough to tell us how any other natural number factors inside these Gaussian integers. And so

The lattice point recipe

here we pull in a crucial and pretty surprising fact. Prime numbers that are one above a multiple of four like five or 13 or 17, these guys can always be factored into exactly two distinct Gaussian primes. This corresponds with the fact that rings with a radius equal to the square root of one of these prime numbers always hit some lattice points. In fact, they always hit exactly eight lattice points, as you'll see in just a moment. On the other hand, prime numbers that are three above a multiple of four, like three or seven or 11, these guys cannot be factored further inside the Gaussian integers. Not only are they primes in the normal numbers, but they're also Gaussian primes, unsplitable, even when I is in the picture. And this corresponds with the fact that a ring whose radius is the square root of one of those primes will never hit any lattice points. And this pattern right here is the regularity within prime numbers that we're going to ultimately exploit. And in a later video, I might explain why on earth this is true. Why a prime numbers remainder when divided by four has anything to do with whether or not it factors inside the Gaussian integers. or said differently whether or not it can be expressed as the sum of two squares. But here and now we'll just have to take it as a given. The prime number two by the way is a little special because it does factor. You can write it as 1 + i * 1 - i. But these two Gaussian primes are a 90° rotation away from each other. So you can multiply one of them by i to get the other. And that fact is going to make us want to treat the prime number two a little bit differently for where all of this stuff is going. So just keep that in the back of your mind. Remember our goal here is to count how many lattice points are a given distance away from the origin. And doing this systematically for all distances of n can lead us to a formula for pi. And counting the number of lattice points with a given magnitude like square< unk> of 25 is the same as asking how many Gaussian integers have the special property that multiplying them by their complex conjugate gives you 25. So here's the recipe for finding all Gaussian integers that have this property. Step one, factor 25, which inside the ordinary integers looks like 5^ 2. But since 5 factors even further as 2 + i * 2 minus i, 25 breaks down as these four Gaussian primes. Step two, organize these into two different columns with conjugate pairs sitting right next to each other. Then once you do that, multiply what's in each column and you'll come out with two different Gaussian integers on the bottom. And because everything on the right is a conjugate with everything on the left, what comes out is going to be a complex conjugate pair which multiplies to 25. Picking an arbitrary standard, let's say that the product from that left column is the output of our recipe. Now notice there are three choices for how you can divvy up the primes that can affect this output. Pictured right here, both copies of 2 plus i are in the left column. And that gives us the product 3 + 4 i. You could also have chosen to have only one copy of 2 plus i in this left column, in which case the product would be five. Or you could have both copies of 2 plus i in that right column, in which case the output of our recipe would have been 3 - 4 i. And those three possible outputs are all different lattice points on a circle with radius< unk> of 25. But why does this recipe not yet capture all 12 of the lattice points? Remember how I mentioned that a factorization into Gaussian primes can look different if you multiply some of them by i or -1 or negative i. In this case, you could write the factorization of 25 differently. Maybe splitting up one of those fives as - 1 + 2 i * -1 - 2 i. And if you do that, running through the same recipe, it can affect the result. you'll get a different product out of that left column. But the only effect that this is going to have is to multiply that total output by i or negative 1 or negative i. So as a final step for our recipe, let's say that you have to make one of four choices. Take that product from the left column and choose to multiply it by 1 i,1 or negative i corresponding to rotations that are some multiple of 90°. that will account for all 12 different ways of constructing a Gaussian integer whose product with its own conjugate is 25. This process is a little complicated. So I think the best way to get a feel for it is to just try it out with more examples. Let's say instead we were looking at 125 which is 5 cubed. In that case we would have four different choices for how to divvy up the prime conjugate pairs into these two columns. You can either have zero copies of 2 plus i in the left column, one copy in there, two copies in there, or all three of them in that left column. Those four choices multiplied by the final four choices of multiplying the product from the left column by one or by i or negative 1 or negative i would suggest that there are a total of 16 lattice points a distance< unk> of 125 away from the origin. And indeed, if you draw that circle out and count, what you'll find is that it hits exactly 16 lattice points. But what if you introduce a factor like three, which doesn't break down as the product of two conjugate Gaussian primes? Well, that really mucks up the whole system. When you're divvying up the primes between the two columns, there's no way that you can split up this three. No matter where you put it, it leaves the columns imbalanced. And what that means is that when you take the product of all of the numbers in each column, you're not going to end up with a conjugate pair. So for a number like this 3 * 5 cubed, which is 375, there's actually no lattice point that you'll hit. No Gaussian integer whose product with its own conjugate gives you 375. However, if you introduce a second factor of three, then you have an option. You can throw one three in the left column and the other three in the right column. Since three is its own complex conjugate, this leaves things balanced in the sense that the products of the left and right columns will indeed be a complex conjugate pair. But it doesn't add any new options. There's still going to be a total of four choices for how to divvy up those factors of five multiplied by the final four choices of multiplying by 1 i,1 or negative i. So, just like the square< unk> of 125 circle, this guy is also going to end up hitting exactly 16 lattice points.

Counting on one ring

Let's just sum up where we are. When you're counting up how many lattice points lie on a circle with a radius square< unk> of n, the first step is to factor n. And for prime numbers like five or 13 or 17, which factor further into a complex conjugate pair of Gaussian primes, the number of choices they give you will always be one more than the exponent that shows up with that factor. On the other hand, for prime factors like 3 or 7 or 11, which are already Gaussian primes and cannot be split, if they show up with an even power, you have one and only one choice with what to do with them. But if it's an odd exponent, you're screwed and you just have zero choices. And always, no matter what, you have those final four choices at the end. By the way, I do think that this process right here is the most complicated part of the video. It took me a couple times to think through that. Yes, this is a valid way to count lattice points. So, don't be shy if you want to pause and scribble things down to get a feel for it. The one last thing to mention about this recipe is how factors of two affect the count. If your number is even, then that factor of two breaks down as 1 + i * 1 - i. So you can divvy up that complex conjugate pair between the two columns. And at first it might look like this doubles your options depending on how you choose to place those two Gaussian primes between the columns. However, since multiplying one of these guys by i gives you the other one, when you swap them between the columns, the effect that has on the output from the left column is to just multiply it by i or by negative i. So that's actually redundant with the final step where we take the product of this left column and choose to multiply it either by 1, i, 1 or negative i. What this means is that a factor of two or any power of two doesn't actually change the count at all. It doesn't hurt, but it doesn't help. For example, a circle with radius< unk> of 5 hits eight lattice points. And if you grow that radius to square< unk> of 10, then you also hit eight lattice points. And< unk> of 20 also hits eight lattice points, as does< unk> of 40. Factors of two just don't make a difference.

Exploiting prime regularity

Now, what's about to happen is number theory at its best. We have this complicated recipe telling us how many lattice points sit on a circle with radius roo< unk> of n and it depends on the prime factorization of n. To turn this into something simpler, something we can actually deal with, we're going to exploit the regularity of primes that those which are one above a multiple of four split into distinct Gaussian prime factors while those that are three above a multiple of four cannot be split. To do this, let's introduce a simple function, one which I'll label with the Greek letter kai. For inputs that are one above a multiple of four, the output of kai is just one. If it takes in an input three above a multiple of four, then the output of kai is negative 1. And then on all even numbers, it gives zero. So if you evaluate kai on the natural numbers, it gives this very nice cyclic pattern. 1 0 and then repeat indefinitely. And this cyclic function kai has a very special property. It's what's called a multiplicative function. If you evaluate it on two different numbers and multiply the results like K of 3 * K of 5, it's the same as if you evaluate Kai on the product of those two numbers. In this case, K of 15. Likewise, K of 5 * K of 5 is equal to K of 25. And no matter what two natural numbers you put in there, this property will hold. Go ahead, try it if you want. So for our central question of counting lattice points in this way that involves factoring a number, what I'm going to do is write down the number of choices we have but using kai in what at first seems like a much more complicated way. But this has the benefit of treating all prime factors equally for each prime power like 5 cubed. What you write down is k of 1 + k of 5 plus k of 5^ 2 plus k of 5 cubed. You add up the value of kai on all the powers of this prime up to the one that shows up inside the factorization. In this case, since five is one above a multiple of four, all of these are just one. So this sum comes out to be four, which reflects the fact that a factor of 5 cubed gives you four options for how to divvy up the two Gaussian prime factors between the columns. For a factor like 3 to 4, what you write down looks totally similar. Kai of 1 + k of 3 on and on up to k of 3 4th. But in this case, since kai of 3 is - 1, this sum oscillates. It goes 1 - 1 + 1. And if it's an even power like four in this case, the total sum comes out to be 1, which encapsulates the fact that there is only one choice for what to do with those unsplitable threes. But if it's an odd power, that sum comes out to zero, indicating that you're screwed. You can't place that unsplitable three. When you do this for a power of two, what it looks like is 1 + 0 plus 0 on and on since kai is always zero on even numbers. And this reflects the fact that a factor of two doesn't help and it doesn't hurt. You always have just one option for what to do with it. And as always, we keep a four in front to indicate that final choice of multiplying by 1, I1 or negative I. We're getting close to the culmination now. Things are starting to look organized. So take a moment, pause and ponder, make sure everything feels good up to this point. Take the number 45 as an example. This guy factors as 3^ 2 * 5. So the expression for the total number of lattice points is 4 * k of 1 + k of 3 + k of 3^ 2 * k of 1 + k of 5. You can think about this as 4 * the one choice for what to do with the threes times two choices for how to divvy up the Gaussian prime factors of five. It might seem like expanding out this sum is really complicated because it involves all possible combinations of these prime factors and it kind of is. However, because kai is multiplicative, each one of those combinations corresponds to a divisor of 45. I mean, in this case, what we get is 4 * k of 1 plus k of 3 plus k of 5 plus k of 9 plus k of 15 plus k of 45. And what you'll notice is that this covers every number that divides evenly into 45 once and only once. And it works like this for any number. There's nothing special about 45. And that to me is pretty interesting and I think wholly unexpected. This question of counting the number of lattice points a distance square< unk> of n away from the origin involves adding up the value of this relatively simple function over all the divisor of n.

Combining the rings

To bring it all together, remember why we're doing this. The total number of lattice points inside a big circle with radius r should be about< unk> * r 2. But on the other hand, we can count those same lattice points by looking through all of the numbers n between 0 and r 2 and counting how many lattice points are a distance square root of n from the origin. Let's go ahead and just ignore that origin dot with radius zero. It doesn't really follow the pattern of the rest. And one little dot isn't going to make a difference as we let r towards infinity. Now, from all of this Gaussian integer and factoring and kai function stuff that we've been doing, the answer for each n looks like adding up the value of kai on every divisor of n and then multiplying by four. And for now, let's just take that four and put it in the corner and remember to bring it back later. At first, adding up the values for each one of these rows seems super random, right? I mean numbers with a lot of factors have a lot of divisor whereas prime numbers will always only have two divisor. So it initially seems like you would have to have perfect knowledge of the distribution of primes to get anything useful out of this. But if instead you organize these into columns the puzzle starts to fit together. How many numbers between 1 and r 2 have 1 as a divisor? Well all of them. So our sum should include r 2 * k of 1. How many of them have 2 as a divisor? Well, about half of them. So that would account for about r^ 2 / 2 * k of 2. About a third of these rows have k of 3. So we can put in r^ 2 / 3 * k of 3. And keep in mind we're being approximate since r^ 2 might not perfectly divide 2 or 3. But as r grows towards infinity, this approximation will get better. And when you keep going like this, you get a pretty organized expression for the total number of lattice points. And if you factor out that r 2 and then bring back the four that needs to be multiplied in, what it means is that the total number of lattice points inside this big circle is approximately 4 * r^ 2 * this sum. And because kai is zero on every even number and it oscillates between 1 and negative 1 for odd numbers, this sum looks like 1 - 1/3 plus a 5th -7th and so on. And this is exactly what we wanted. What we have here is an alternate expression for the total number of lattice points inside a big circle, which we know should be around p< unk> * r 2. And the bigger r is, the more accurate both of these estimates are. So the percent error between the left hand side and the right hand side can get arbitrarily small. So divide out by that r 2. And this gives us an infinite sum that should converge to pi. And keep in mind, I just think this is really cool. The reason that this sum came out to be so simple, requiring relatively low information to describe, ultimately stems from the regular pattern in how prime numbers factor inside the Gaussian integers.

Branches of number theory

If you're curious, there are two main branches of number theory. Algebraic number theory and analytic number theory. Very loosely speaking, the former deals with new number systems, things like these Gaussian integers that you and I looked at and a lot more. And the latter deals with things like the remon zeta function or its cousins called L functions which involve multiplicative functions like this central character Kai from our story. And the path that we just walked is a little glimpse at where those two fields intersect. And both of these are pretty heavy duty fields with a lot of active research and unsolved problems. So if all this feels like something that takes time to mentally digest, like there's more patterns to be uncovered and understood, it's because it is. And there are

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

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

Pi через Примус: Как простые числа раскрывают тайны Пи

Узнайте, как обычные целые числа, комплексные числа и число Пи связаны друг с другом через закономерности простых чисел. Откройте формулу Пи, построенную на фундаментальной регулярности распределения простых чисел.

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

Ctrl+V

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

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

Подписаться

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

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