IllustratorsLeak
3blue1brown
3blue1brown

patreon


A bizarre integral pattern (early view)

Hey everyone,

Here's a rough cut for a new video, about a strange series of computations that compute pi...until they don't.

As always, comments and feedback are welcome. I still have yet to do a proper comb-through for little errors, and there are a number of animations I'll amend, so feel free to throw in any requested changes while I'm at it. At the very least I'll probably add a bit more about variations on this phenomenon that result in patterns that break much later.

This explanation lent itself to being broken up into two parts, this one giving the core intuition, and a second one diving into the more heavy machinery it leans on, namely the convolution theorem. I'm curious to hear how satisfying the explanation feels before the rest comes. Frustratingly incomplete? A pleasing view of the argument's shape without being bogged down in details? Is there anything you'd do differently?

Many thanks!

Grant

A bizarre integral pattern (early view)

Comments

3:30 - It took me a minute to realize that the function is zero for some values, because the blue of the function is a similar color to the gray for the x axis. Before I heard the audio, I assumed the function was only defined on [-0.5, 0.5] Maybe use a higher-contrast color, or a thicker line, for the function's value?

Yeah, I've always liked this explanation of convolution; that it's not an integral over x, but an integral over all pairs x1, x2 such that x1 + x2 = t. And then it becomes completely obvious why it's associative and commutative, because addition is: the convolution of 3 functions is just an integral over all triples x1, x2, x3 such that x1 + x2 + x3 = t.

Paul Zagieboylo

Admittedly it is a reused animation from a previous time I was illustrating the Fourier series. Given that it's not meant to be a walk-through of Fourier-material, but a quick reference to how it's usually described, I was hoping to get away with it :) In either case, I'll amend the narration to gently tip my hat to the fact that infinite signals have a continuous spectrum.

3blue1brown

Duly noted! I may disappoint you with the final version of this particular video, but I have plans to pull out and motivate the convolution discussion in a separate way with the follow on video, which will hopefully be closer in spirit to the "you could have discovered this yourself" spirit you describe here.

3blue1brown

These are good points. The new plan is to pull out most of the convolution material to a video dedicated just to that, so that key points like those can be explained and (hopefully) not rushed.

3blue1brown

Heh, having watched this video is helping me understand Derek's video that just came out. He gave you a shout-out in it!

C.J. Smith

You're animating the discrete time Fourier transform and then using the continuous time Fourier transform to solve the problem. Can they be substituted for each other without acknowledging a transition? The diagram at 15:00 shows the result of the discrete time Fourier transform with linear interpolation between the N values which doesn't seem valid. (That's an excellent animation of the discrete time Fourier transformation otherwise.)

William Smith

Great video. I would like for you to include a few thoughts on why the convulution algorithm is useful for some applications (image processing?, whatever?). I agree with the comments that there are a lot of topics that you say will be in the next video. When you are talking about the fourier transform being the rectangular function -- would it make sense to say that it means that this function could be expressed as the sum of sine waves in exactly a certain range of frequencies with no contribution from frequenies outside of that range?

MBP

A way to motivate the g(t-x) is that the resulting graph, f(x)g(t-x), represents all pairs of points (one on the graph of f, one on the graph of g) whose x-coordinates add to t. This leads nicely into both commutativity (which should be quick to animate!) and associativity.

Akiva Weinberger

Sure, but it's better to try to see it from the definition.

Akiva Weinberger

You skipped over the fact that convolution is associative, and then assume it later (EDIT: and commutative)

Akiva Weinberger

The transition from thinking about the signed area of the product of dilated sinc functions to the convolution theorem was a bit jarring to me. The equivalence of the rectangle function and the sinc function isn't a very natural one, even if you are very comfortable with the Fourier transform. So while taking the convolution of the Fourier transform of the sequence of functions is the 'tool' of choice to analyse the problem. Neither the Fourier transform, nor convolution feels motivated in the way that most of your videos motivate things. Your sequence of steps is correct, but for people who aren't familiar with these tools, it feels like you've reached into the toolbox of maths, and pulled out some 'cute tricks'. Please don't take that as harsh criticism of your presentation here, many of the tools of mathematics feel like 'cute tricks' without the appropriate context, and it is very difficult to teach mathematics at a reasonable pace without allowing some things to just be 'cute tricks'. Your videos are normally extremely good at motivating things. Leaving viewers like me feeling like geniuses, because you make the problem solving technique feel like the only natural method to finding the solution. I feel you're falling short of your own very high bar, rather than the standard of most maths educators. I think it would be better to make a video about this property of the moving average of the rectangle function. And introduce convolution as being an interesting functional way to 'phrase' or 'articulate' the problem. As for why we want to introduce convolution at all, you skate over it in the video but convolution appears naturally in many types of problems. Some time spent looking at what convolution 'is', will be time well spent, especially if there are students watching this video who happen to be using convolution at any given time, it's not just a 'cute trick' to 'phrase' or 'articulate' a moving average (which can literally just be done with an average and moving the bounds). It measures correlation, but it's also closely related to the dot product, and determines the 'orthogonality' of two functions. Then there can be a second video where you introduce the integral of the product of Sinc functions, and this unusual property of eventually becoming less than one. Because the Sinc function extends out symmetrically to infinity there does not exist an intuitive way to reason about what the product of Sinc functions is doing. But then, you can show that the Fourier transform of the rectangle function is the integral of this Sinc function, and vice versa. Suddenly we now have this notion of equivalence between two domains. The rectangle function, because it is finitely bounded, is much easier to understand. Now, we can take the product of Sinc functions, then take the Fourier transform to see what is happening. And you can find a sequence of charts that are identical to the sequence of charts in the original rectangle problem. The natural question then is this always true? Or will this exact 1:1 correspondence break down at some point. The natural entry point for the convolution theorem. Most importantly, for the second video IMO. Is that it should 'feel' natural to consider that any integral of point-wise products is perhaps easier to understand as convolution in the Fourier domain or vice versa. This is a very powerful result. And I hope that you can revise things so that viewers get a little more of a glimpse of the significance and depth of this problem solving technique. Equivalence between domains should also tie in nicely with your Galois theory and symmetry series that you've been working on (very excited for BTW).

Fascinating! I would change "seemingly random procedure" at 7:13 to "seemingly arbitrary procedure" (or something like that), since "random" suggests some role for probabilities, and they don't play a role here.

Tom Loredo

Minor thing I don't see mentioned: 2:06 brown's speech bubble doesn't really point at him. My main impression after my first watch is, I'm confused, and also, wait that's the end? Re-watching now, gonna pause and comment as I go: 1:15 I guess I didn't really expect "later on" to be "in a different video" 8:43 This is where I started to get lost. I wonder if it may be good to take some more time on this convolutions bit. What are these functions f and g that are being displayed here? Are they arbitrary? (8:51 tells me yes) Can we make them simpler functions and tell us what they are? I think I was thinking for a bit that f and g were already related by definition, because they happen to look extremely similar. I now realize that's because you want to have a nice positive zone, but because I didn't know what the functions were, it may have led me astray. I also realize that the functions can't go off to infinity because of the infinite integral, but at least temporarily using functions that aren't too bad to compare the equation and the graph would help I think. 10:17 This was a key point about convolutions that, now focusing just on this, you do indeed state here, but I think my confusion starting at 8:43 led me to just missing this point the first time. Not sure if it needs more emphasis or if clearing up my earlier confusion would have helped me catch this. 11:29 I wonder if this bit starting here could use an extra sentence or two about this being the mean value theorem where b-a happens to be 1, making it just the simple integral. Or something like that. I know you're encouraging us to think about it, but seeing as being a moving average appears to be fairly essential for why we're connecting these things, it may be worth it to spell it out a little more. 14:07 This also had my brain going down a rabbit hole of thinking, wait, IS this always true? I understand the function transformation stuff, but does the integral always scale the same way? Playing around with it now, it does appear that if you scale the bounds in the opposite direction that does work out, but this is not something I remember learning. I'm a little too rusty on fourier transforms too, but I'm setting that aside for this video, since it's specifically being left for another one. I think the overall problem was too many complicated things brought up with not enough payoff or understanding gained (on my first watch anyway).

C.J. Smith

The "pseudo-commutative diagram" in the video sort of explains it. Because multiplication is associative, so is convolution.

Daksha Vaid-Kwinter

Did you mean to not show how those three facts lead to the result at the end? Of course it's not much work at all to do so, but it still felt a bit strange that the main result was never "officially" stated. At 12:51 I instantly thought "Is convolution associative?" Now you might have purposely glossed over this (I know I've done that kind of thing myself), but if not you might want to consider saying something about it.


More Creators