[00:00] Today I'd like to tell you about a piece of math known as holomorphic dynamics. and in fact one of my main goals today is to show you how this iconic shape, the poster child of math, pops up in a more general way than the initial definition [00:15] Now this field is also intimately tied to what we talked about in the last video, video will be to help tie up some of the loose ends that we had there. [00:34] It refers to functions that have complex number inputs and complex number outputs, Basically what it means to have a derivative in this context is that when you zoom [00:49] in to how the function behaves near a given point, to the point and its neighbors, it looks roughly like scaling and rotating, like multiplying by some complex constant. it includes most of the ordinary functions you could write down, [01:03] things like polynomials, exponentials, trig functions, all of that. The relevant dynamics in the title here comes from asking what happens when you repeatedly apply one of these functions over and over, [01:15] in the sense of evaluating on some input, then evaluating the same function on whatever you just got out, and then doing that again, and again and again and again. Sometimes the pattern of points emerging from this gets trapped in a cycle, [01:30] other times the sequence will just approach some kind of limiting point. Or maybe the sequence gets bigger and bigger and it flies off to infinity, just the point at infinity. [01:45] And other times still they have no pattern at all, and they behave chaotically. What's surprising is that for all sorts of functions that you might write down, when you try to do something to visualize when these different possible behaviors arise, [01:59] it often results in some insanely intricate fractal pattern. Those of you who watched the last video have already seen one neat example of this. There's this algorithm called Newton's method, which finds the root of some polynomial p, [02:11] and the way it works is to basically repeatedly iterate the expression x minus p of x divided by p prime of x, p prime being the derivative. When your initial seed value is in the loose vicinity of a root to that polynomial, [02:24] of values that really quickly converges to that root. But then we tried to do this in the complex plane, [02:36] root in the complex plane each one of these seed values might end up on. and then colored each pixel of the plane based on which root a seed value starting at [02:50] The results we got were some of these insanely intricate pictures, with these rough fractal boundaries between the colors. [03:02] Now in this example, if you look at the function that we're actually iterating, you can rewrite the whole expression to look like one polynomial divided by another. [03:15] And if you forget the fact that this arose from Newton's method, you could reasonably ask what happens when you iterate any other rational function. and Gaston Julia did in the years immediately following World War I. [03:33] iterate these rational functions, which is particularly impressive given that they had no computers to visualize any of this the way you and I can. By far the most popularized example of a rational function that you [03:51] is one of the simplest functions, z squared plus c, where c is some constant. I'm going to guess that this is at least somewhat familiar to many of you, [04:03] since it can help set the stage for what comes later. It'll be visible as this movable yellow dot. [04:16] start with an initial value of z equals zero. So after iterating this function once, doing z squared plus c, you get c. If you iterate a second time, plugging in that value to the function, [04:31] And as I change around the value c here, you can kind of see how the second value moves in lockstep. Then we can plug in that second value to get z3, visualizing our chain of values. [04:49] So if I keep doing this many different times for the first many values, for some choices of c, this process remains bounded. And other times, it looks like it blows up, and you can actually [05:01] show that if it gets as big as 2, it'll blow up to infinity. If you color the points of the plane where it stays bounded black, and you assign some other gradient of colors to the divergent values based on how quickly [05:16] the process rushes off to infinity, you get one of the most iconic images in all of math, Now this interactive dots and stick visualization of the trajectory, Numberphile video he did about the Mandelbrot set, which is great, you should watch it. [05:34] I would also highly recommend the interactive article on ako.net about all of this stuff for any of you who haven't had the pleasure of reading that yet. what each different part of the Mandelbrot set actually represents. [05:52] so that the process eventually converges to some limit. the process gets trapped in a cycle between two values. [06:05] gets trapped in a cycle of three values, and so on like this. Each one of these little islands kind of has its own meaning. Mandelbrot set and the Newton fractals we were looking at before are each constructed, [06:23] For the Mandelbrot set we have a consistent seed value, z equals zero, but the thing we're tweaking is the parameter c, changing the function itself. So what you're looking at is what we might call a parameter space. [06:38] but what we associate with each pixel is a different seed value for the process. Of course, we could play the same game with the map z squared plus c. [06:51] represent the different possible initial values, z naught. So whereas each pixel of the Mandelbrot set corresponds to a unique function, the images on the right each just correspond to a single function. [07:05] As we change the parameter c, it changes the entire image on the right. black if the process remains bounded, and then apply some kind of gradient to [07:17] the ones that diverge away to infinity based on how quickly they diverge to infinity. there is some four-dimensional space of all combinations of c and z naught, [07:30] and what we're doing here is kind of looking through individual two-dimensional slices You'll often hear or read the images on the right being referred to as Julia sets or Julia fractals, and when I first learned about all this stuff, [07:45] what the term Julia set refers to, specifically the z squared plus c case, and moreover that it's referring to the black region on the inside. and it would refer just to the boundaries of these regions, not the interior. [08:03] and to also make some headway towards the first goal that I mentioned at the start, it's worth stepping back and really just picturing yourself as a mathematician right now, What would you actually do to construct a theory around this? [08:19] but what sorts of questions would you ask if you actually want to understand it all? a good place to start is to ask if there are any parts of the system [08:31] that have some simple behavior, preferably the simplest possible behavior. In our example, that might mean asking when does the process just stay fixed in place, That's a pretty boring set of dynamics, I think you'd agree. [08:46] In the case of the functions arising from Newton's method, by design they have a fixed point at the roots of the relevant polynomial. You can verify for yourself, if p of z is equal to zero, [09:01] That's what it means to be a fixed point. If you're into exercises, you may enjoy pausing for a moment and computing the fixed points of this Mandelbrot set function, z squared plus c. More generally, [09:16] since asking when this expression equals z can always be rearranged as finding the From the fundamental theorem of algebra, this must have solutions, [09:30] typically as many solutions as the highest degree in this expression. Incidentally, this means you could also find those fixed points using Newton's method, ight now. Now just asking about fixed points is maybe easy, [09:45] and hence the diagrams we're looking at, is to understand stability. We say that a fixed point is attracting if nearby points tend to get drawn in towards it, [09:57] And this is something that you can actually compute explicitly using the derivative of the function. it looks exactly the same as it would for real functions, [10:11] though something like z squared has a derivative of 2 times z. But geometrically, there's a really lovely way to interpret what this means. For example, at the input 1, the derivative of this particular function evaluates to be [10:24] 2, and what that's telling us is that if you look at a very small neighborhood around that input, and you follow what happens to all the points in that little neighborhood as then it looks just like you're multiplying by 2. [10:39] This is what a derivative of 2 means. We know that this function moves that input to the value negative 1, that's i squared. [10:51] But the added information that its derivative at this value is 2 times i gives us the and you look at the action of the function on this tiny neighborhood, [11:03] it looks like multiplication by 2i, which in this case is saying it looks like a 90 degree rotation combined with an expansion by a factor of 2. we care about here is the growing and shrinking factor. [11:20] So if you compute the derivative of a function at its fixed point, it tells you that the fixed point is attracting, If that derivative has an absolute value bigger than 1, [11:36] it tells you the fixed point is repelling, it pushes away its neighbors. For example, if you work out the derivative of our Newton's map expression, and you simplify a couple things a little bit, here's what you would get out. [11:50] So if z is a fixed point, which in this context means that it's one of the roots of the polynomial p, this derivative is not only smaller than 1, it's equal to 0. since it means that a neighborhood around these points doesn't merely shrink, [12:07] And again, this is kind of by design, since the intent of Newton's method is to produce iterations that fall towards a root as quickly as they can. exercise to find its fixed points, the next step would be to ask, [12:24] For what values of c is this going to be true? try using the result that you find to show that this condition corresponds to the main [12:38] This is something you can compute explicitly, it's pretty cool. and this is where things really start to get interesting. [12:50] If f of z is not z but some other value, and then that value comes back to z, it means that you've fallen into a two cycle. evaluating f of f of z and then setting it equal to z. [13:07] For example, with the z squared plus c map, f of f of z expands out to look like this. The main thing to highlight is that it boils down to solving some degree four equation. [13:20] You should note though that the fixed points will also be solutions to this equation, solutions to the original fixed point equation. n cycles by composing f with itself n different times. [13:37] The explicit expressions that you would get quickly become insanely messy, but it's still elucidating to ask how many cycles would you expect based on this If we stick with our simple z squared plus c example, as you compose it with itself, [13:52] you'd get a polynomial with degree four and then one with degree eight and then degree sixteen and so on and so on, exponentially growing the order of the polynomial. So in principle, if I asked you how many cycles are there with a period of one million, [14:06] you can know that it's equivalent to solving some just absolutely insane polynomial expression with a degree of two to the one million. So again, fundamental theorem of algebra, you would expect to find something on the order [14:19] of two to the one million points in the complex plane which cycle in exactly this way. to find values whose behavior falls into a cycle with period n. [14:32] It ultimately boils down to solving some probably insane polynomial expression. such periodic points will grow exponentially with n. I didn't really talk about this in the last video about Newton's fractal, [14:47] that fall into some kind of cycle even for a process like this. between those colored regions and they don't really come up in [15:00] practice because the probability of landing on one of them is zero. cycles is attracting in the sense that a neighborhood of points around a value from that cycle would tend to get pulled in towards that cycle. [15:16] is whether or not this Newton's map process ever has an attracting cycle, initial guess gets trapped in that cycle and it never finds a root. [15:31] More explicitly, if you try to find the roots of z cubed minus 2z plus 2 and you're using Newton's method, watch what happens to a cluster that starts around the value zero and sort of bounces back and forth. [15:47] little bit too big so some of the outer points get sprayed away, but here's what it looks like if we start with a smaller cluster. in towards the cycle between zero and one. [16:01] It's not likely that you hit this with a random seed, but it definitely is possible. The exercise that you could do to verify that a cycle like this is attracting, by the way, would be to compute the derivative of f of f of z, [16:14] and you check that at the input zero this derivative has a magnitude less than one. The thing that blew my mind a little is what happens when you try to visualize which cubic polynomials have attracting cycles at all. [16:27] those attracting cycles should be rare. First of all, to better visualize the one example we're looking at, coloring each point based on what root the seed value starting at that point [16:43] will tend to, but this time we'll have an added condition of coloring points that says that if the seed value never gets close enough to a root at all, Notice if I tweak the roots, meaning that we're trying out different cubic polynomials, [16:58] that we see any black pixels at all. I can find this one little sweet spot here, but it's definitely rare. Now what I want is some kind of way to visualize every possible cubic polynomial [17:13] at once with a single image in a way that shows which ones have attracting cycles. whether or not one of these polynomials has an attracting cycle. [17:25] All you have to do is look at the seed value which sits at average of the three roots, Turns out, this is not at all obvious, if there's an attracting cycle, you can guarantee that this seed value will fall into that attracting cycle. [17:40] In other words, if there are any black points, this will be one of them. it stems from a theorem of our good friend Fatou. He showed that if one of these rational maps has an attracting cycle, [17:54] you can look at the values where the derivative of your iterated function equals zero, and at least one of those values has to fall into the cycle. but the loose intuition is that if a cycle is going to be attracting, [18:09] that's where the shrinking will come from. point where the derivative is not merely small but equal to zero, [18:21] and that point ends up being close enough to get sucked into the cycle. where we're only using one seed value z equals zero, it's still enough to get us a very full and interesting picture. [18:35] If there's a stable cycle to be found, that one seed value is definitely going to find it. I feel like maybe I'm assigning a little too much homework and exercises today, but if you're into that, yet another pleasing one would be to look back at [18:49] derivative expression that we found with our function that arises from Newton's method, and use this wonderful theorem of Vateau's to show our magical fact about cubic polynomials, that it suffices to just check this midpoint over the roots. [19:03] The upshot is that we can perform a test for whether or not one of these polynomials has an attracting cycle by looking at just a single point, not all of them. [19:15] And because of this, we can actually generate a really cool diagram. let's say putting them at z equals negative one and z equals positive one, and then we'll move around that third root, which I'll call lambda. [19:30] is when the point at the center of mass is black. So what I'll do is draw a second diagram on the right, where each pixel corresponds to one possible choice of lambda. [19:43] on the color of this midpoint of the three roots. There are kind of a lot of layers at play here. [19:55] Just remember, each pixel on the right corresponds to a unique polynomial, In fact, you might call this a parameter space. Sound familiar? [20:13] Points in this parameter space are colored black if, and only if, the Newton's method process for the corresponding polynomial produces an attracting cycle. Now, at first glance, it might not look like there [20:30] It means that in most cases Newton's method will not get sucked into cycles like this. But, and I think I've previewed this enough that you know exactly where this is going, [20:43] if we zoom in we can find a black region, and that black region Yet again, asking a question where we tweak a parameter for one of these functions yields this iconic cardioid and bubbles shape. [20:58] to the z squared plus c example as you might think. universal about parameter spaces with processes like this. [21:11] Still, one pressing question is why we get fractals at all. In the last video, I talked about how the diagrams for Newton's method have this very peculiar property, where if you draw a small circle around the boundary of a [21:24] colored region, that circle must actually include all available colors from the picture. If you were to assign colors to regions based on which limiting behavior [21:37] points fall into, like which limit point or which limit cycle or does it tend to infinity, then tiny circles that you draw either contain points with just one of those limiting behaviors, or they contain points with all of them. [21:49] So in the case where there's at least three colors, since along a smooth segment, you can draw a small enough circle that touches [22:01] And empirically, this is what we see. And furthermore, you might notice that as we zoom in, you can always see all available colors within the frame. [22:16] This doesn't explain rough boundaries in the context where there's only two limiting behaviors, but still, it's a loose end that I left in that video worth tying up, Julia sets and Fatou sets. [22:29] If a point eventually falls into some stable, predictable pattern, we say that it's part of the Fatou set of our iterated function. And for all the maps that we've seen, this includes almost everything. [22:41] The Julia set is everything else, which in the pictures we've seen would be the rough boundaries between the colored regions. What happens as you transition from one stable attractor to another? [22:53] the repelling cycles and the repelling fixed points. A typical point from the Julia set though, will not be a cycle. Now, if you look at a point in the Fatou set, and you draw a small enough disc around it, [23:09] as you follow the process, that small disc will eventually shrink as Unless you're going to infinity, but you could kind of think of that as the disc shrinking around infinity, but maybe that just confuses matters. [23:24] By contrast, if you draw a small disc around a point on the Julia set, it tends to expand over time as the points from within that circle go off and kind of do In other words, points of the Julia set tend to behave chaotically. [23:40] eventually fall into qualitatively different behaviors. A pretty surprising result, key to the multicolor property mentioned before, [23:53] is that if you let this process play out, that little disc eventually expands so much that it hits every single point on the complex plane, with at most two exceptions. This is known as the stuff-goes-everywhere principle of Julia sets. [24:07] In the source I was reading from, it's mentioned as But it should be called that. In some sense, what this is telling us is that the points of the Julia set [24:20] are not merely chaotic, they're kind of as chaotic as they possibly can be. Here, let me show you a little simulation using the Newton's map, with a cluster of a few thousand points, all starting from within a tiny distance, [24:33] one one-millionth, from a point on the Julia set. Of course, the stuff-goes-everywhere principle is about the uncountably [24:46] and that they eventually expand out to hit everything on the plane, But this little cluster should still give the general idea. sprayed all over the place in seemingly all directions. [25:04] What this means for our purposes is that if there's some attractive behavior of our map, you can be guaranteed that the values from that tiny disk around the point on the Julia set, no matter how tiny it was, will eventually fall into that attracting behavior. [25:20] this gives us some explanation for why the Julia set is not smooth, Even still, this might not be entirely satisfying because it kicks [25:32] this stuff-goes-everywhere principle is true in the first place. and I'm choosing not to go into the details there, because honestly, it's a lot to cover. [25:46] The proof I could find ends up leaning on something known as the J function, I will of course leave links and resources in the And if you know of a simpler way to see why this principle is true, [26:00] I should also say as a brief side note that even though the pictures we've seen it's kind of the boundary between these regions, there are examples where the Julia set is the entire plane. [26:14] Everything behaves chaotically, which is kind of wild. is the link between the chaos and the fractal. At first it seems like these are merely analogous to each other, you know, [26:27] Newton's method turns out to be a kind of messy process for some seed values, and this messiness is visible one way by following the trajectory of a particular point, but those feel like qualitatively different kinds of messiness. [26:42] However, what's neat here is that when you quantify just how chaotic explanation for the rough fractal shape via this boundary property. [26:57] Quite often you see chaos and fractals sort of married together in math, logical link to it, rather than as two phenomena that just happen to coincide.