Thanks again to KiwiCo who made this video possible. Now make something in return: KiwiCo.com/StandUpMaths And definitely check out Ben's video. I'm putting in this pinned comment for everyone too lazy to check the description. For shame. th-cam.com/video/I4fxSYHCa9Y/w-d-xo.html
I assume you have already known that the decimal digit expansion of constant pi is absolutely identical with the decimal digit expansion of sin (0.00000........0000018) degree.
@@PetraKann Well, if you trust 2! = 2, and the recursion relation, then we want 2! = 2 × 1!, so 1! _must_ be 1. By the same reasoning, we want 1! = 1 × 0!, so 0! must _also_ be 1. Convinced?
I remember I had accidentally discovered this fact a long time ago in school. I was trying to figure out a formula for the volume of an N-dimensional sphere. I started with a circle and then just kept integrating more dimensions to see if I could generalize a formula. The result was that even and odd numbered dimensions each had a different formula that used factorials and interestingly they were offset by 1/2. Using that, I was able to solve for (n + 1/2)! which was really cool and unexpected! It also made sense why pi showed up, since it was related to the volume of spheres.
That turns out to be really important in quantum field theory. And the continuation of the gamma function to do FRACTIONAL numbers of dimensions is useful as a mathematical trick you can use to deal with divergent integrals during renormalization. It's called dimensional regularization.
In my Master's thesis I made a plot of the Gamma function where the height was the absolute value, and the complex phase was indicated by the color of the graph. It made a really funky rainbow plot, but you could see all the features in it
What could have been cool is using the hue on the graphs to represent the argument on the absolute value graph (ie red = positive real, cyan = negative real, chartreuse = positive imaginary, purple = negative imaginary); then you could have gotten much closer to the whole story on one graph
If we're using color anyway we _can_ make a sort of 4 d graph, just associate one spatial dimension with a range of colors. Essentially take one of the graphs of one part of the output and color it based on the magnitude of the other part.
@@Bean-Time My grandfather always says it's his favorite color so I grew up thinking it was a normal color that lots of people use. It's the color of tennis balls.
You can use time as a 4th dimension and make it an animation of 3D "slices" through the 4D structure. You'd just have to decide if the time aspect represents the real or imaginary part of the output
Or you could just look at an animation of how the inputs to the function move over to the output of the function. Seeing how the points of the complex plane transform under a function gives you a more visceral feeling for the behavior of the function on the complex plane. In my view, the fact that complex numbers can be represented using two real numbers in a particular order should be ignored as much as possible.
And Euler is there again. Seriously, I'm a civil engineer and I thought Euler was a genius physician and engineer for creating (with Bernoulli) all of material resistance as we know it. Then I learned he was actually a mathematician, and definitely not the least of them
I remember when I first learned about factorials. It was given to us as a self-study chapter in one of my math classes. My friend and I were one of the only ones to finish it. The odd thing is that both of us did not catch that they are called factorials, so we made up our own language. Both of us, independently, came up with the term "exploded". So, 4! was, "four exploded". Sometimes I still call it exploding a number.
"My friend and I were one of the only ones to finish it." This is an interesting mathematical exercise in itself. The number of people who finished it was "only", and of those "only" people, you and your friend were "one". I suppose the fact that you and your friend were "one" means that you were the same person, and that you were just talking to yourself. I am still in the dark, however, about how many people comprise this mysterious number "only".
Fun fact: on older version of iOS you could take the factorial of a non-whole number in the calculator app and it actually worked out the gamma function! But nowadays it just says ERROR :(
In high school, some friends and I went down a rabbit hole that lead to us learning about the Gamma function. This all started when we were wondering why our TI calculators would give a value for 0.5! (but not for any real number)
Going forward, why not plot functions from C->C with absolute value for the height, and argument as the hue of the point? Plus in HSL, hue is already an angle, so it won't have any discontinuities in color, unless there is a discontinuity in the function.
I think this graph was made with pyplot, which uses 2D arrays to create plots, and creates the hue maps automatically. You can mess with them but it goes from a 2 minute job to a 10 minute job.
@@shearnotspear Yes my immediate thought was matplotlib (the parent library for pyplot) and I wondered why a standard color map was used (seems to be the default Viridis) rather than making hue based on imaginary values.
i was playing around with factorials the other day but it broke my mind trying to figure out even the factorial of simple fractions let alone negative, wow, well done!
bit of a pet peeve but.. why not just show the domain coloring graph? We always keep repeating that you can't graph C->C functions because it would have four dimensions, but domain coloring is right there encoding the entire thing, without the distortion from displaying a 3D graph in a 2D screen. It would be much better if we just showed people how visualizing complex functions can be pretty easy...
@@wizard7314 I should clarify that if you graph with both magnitude and angle as z and hue, then yeah, you have 4 dimensions being graphed. Just like when you have two side by side Re and Im plots. Numerically the full output is shown to you in both cases, but the "full picture" of understanding the behavior of the output plane is only partially glimpsed in each. There are so many different ways to squeeze those 4 dimensions into graphs and each one gives you a different view of the picture.
If anybody is curious, with the help of Desmos I've found some other interesting values on the graph "x!": 1,5! = 3/4√π 2,5! = 15/8√π 3,5! = 105/16√π 4,5! = 945/32√π 5,5! = 10395/64√π etc... - I think you can see the logic. As we go up, the numerator gradually gets multiplied by every next uneven number (or by 2n) and the denominator is just the next power of two
I'm 99% sure you're writing the formulas (3/2)!, (5/2)!, etc., but that is the most confusing list of numbers I've ever seen. My brain can ONLY see [1, 5], [2, 5], [3, 5], etc. and I was trying to figure out what a factorial of a matrix would be. It took me multiple seconds to assume you must be from Europe, and you were just accidentally confusing the hell out of me with your comma shenanigans.
@@kindlin you think that's bad? In some cases I use comma in both decimal place and thousand separators I usually use a . for decimal point (like 5.2) And a , for thousand separators (1,000,000.2 = 1 million and a fifth) bit sometimes I use a , for decimal point (5,2 = 5 and a fifth) It's a matter of time before I accidentally do something like 1,000,000,2 and confuse the hell out of everyone
if Ive learned anything from 3Blue1Brown, it's that whenever you have Pi, there is always... ALWAYS... a circle hiding somewhere, somehow. So since both 1/2! and -1/2! involve pi, how do they involve circles?
I don't know the answer. But when the square root of pi shows up, it reminds me of the integral of a Gaussian, and I DO know how the circle shows up there. So maybe we can transform the gamma function evaluation at these points into a Gaussian integral somehow.
@@MattMcIrvin Yes, it is because the square X² of a standard Gaussian random variable is a Chi-squared r.v., which is a Gamma distribution with parameters (1/2 , 1/2) hence the gamma(1/2). Now where is the circle ? It is in computing the bivariate Gaussian : the equivalence curves (ellipsoids) are circles x²+y².
For (-1/2)!, you have the improper integral on [0, ♾) of x^(-1/2)·e^(-x) = 1/sqrt(x)·e^(-x). You can let x = y^2, and this substitution transforms the integral into the integral on [0, ♾) of 2·e^(-y^2). This is equal to the Gaussian integral, and the Gaussian integral is equal to sqrt(π). As for the other half-integer values, you can just the recursion f(n + 1) = (n + 1)·f(n).
This video comes with no better timing. Just a few days ago I plugged x! into desmos expecting it not to work (I had always assumed that it was strictly for natural numbers) I was astounding to see such a zany graph. My TI84 just gave points. All explanations of this Gamma function I found incredibly unintuitive. Thank you, matt.
The problem with quaternions (and also matrices) is that a^b is not clearly defined. since a times b is different from b times a, it means that there are actually 2 different powers. a "left power" and a "right power".
@@Anonymous-df8it Complex numbers have the property that a*b = b*a, so calculating a^b by using e^(ln(a)*b) is perfectly fine, since its also equal to e^(b*ln(a)). This is not generally true for quaternions or matrices, thus creating two possible definitions for the power.
@2:56 that face after "second criterion" is the face of a man very happy with what he is doing and also happy to explain it to you. Great video as always!
Second channel integration video when??? Also, how far off of the positive real number line does the ski slope extend? I'm interested in the identity line, or if any line through the origin still grows faster than exponential functions. There wasn't enough graph in the positive direction to see what the end behavior might look like.
OMG I'm so happy you're finally talking about this! The gamma function and analytic continuation was a short obsession of mine as a math enthusiast and amateur a year ago. There aren't that many accessible videos talking about it (at least on the surface) so I had to do some traditional reading and research. I am definitely used to being spoonfed by effective educators like you, so it was definitely a very fruitful exercise! And now here you are a year later to summarize everything in your signature Stand-Up Maths format and manner.
One of the things that makes it not obvious that you can extend the factorial in this way is that the factorials of negative integers are undefined--those happen to be the places where the gamma function blows up. So if you do the simplest thing and try to extend it in the negative direction past 0, you run into a brick wall and it perhaps seems like that's the end.
I think one might be able to use animations to visualize a 4d plot. One could show a graph of the 2d input "morph" into a 2d graph of the output. Keeping track of individual points and how they transform could be interesting.
Just another style of visualisation of 4D. I believe that is something 3blue1brown uses in some of his videos, but it's not really that intuitive. In 2D, the lines of the input plane just weirdly flip or spin around and overlap, after which you still don't have much but a cool animation. You definitely don't have a clear sense of what's happening, but that's hard to achieve with anything.
It turns out the only two places we ever see sqrt(pi) show up, namely (-1/2)! and Stirling's formula for n!, are connected. First you prove an asymptotic formula between the (Gaussian) integral that defines (-1/2)! and integrals of powers of cos(x). Then you find a recurrence relation for integral of cos(x)^n which allows you to express it in terms of integer factorials. Finally expand them using Stirling's formula and you'll see the correspondence between the sqrt(pi)'s!
PS: There's an article by Professor Kent Conrad which collects many different proofs of the Gaussian integral. Really cool if you, like me, only knew the famous polar coordinates one.
Fun Fact, this function is ubiquitous in theoretical particle physics. This is due to the fact that the volume of a D-dimensional sphere can be expressed through the Gamma function and the poles of the gamma function correspond to the high energy behavior of your model.
Yes indeed! And in these calculations, it's actually useful to (1) compute an integral on 4D spacetime by first computing the integral on 4D Euclidean space (which is a different thing entirely), and (2) continue the function into *fractional* dimensions, from 4D to (4 minus epsilon)D, to make some divergent integrals converge so you can get a handle on precisely how they are divergent during renormalization.
I have only used the absolute function with real numbers. I had no idea that it essentially gives you the magnitude of a complex vector. How interesting! Thanks Matt!
Thinking of complex numbers in polar coordinates--absolute value and phase angle--is really useful. Multiplying complex numbers means you multiply the absolute values and *add* the phase angles (or "arguments"), so complex numbers with an absolute value of 1 (on the unit circle, that is) are useful for describing rotations in the plane, or anything that cycles or oscillates.
@@MattMcIrvin This is the core idea behind Euler's e^ix = cosx+isinx The absolute value of a complex number is just the magnitude of that number, same as any 2D vector. The distance between any two points [x1,y1] and [x2,y2] is just sqrt((x2-x1)^2+(y2-y1)^2), similar to the pythagorean of a triangle, c=sqrt(a^2+b^2). In fact, the distance formula in any number of dimensions is just the Pythagorean formula.
I've just watched 2 minutes of the video so far, but I just wanted to comment, hoping that you'll stumble on it by mere chance, this is some of the best TH-cam content I've ever consumed, and it has nothing to do with the educational value, these videos are, as far as I'm concerned, the maths and in-person equivalent of the "Ahoy" TH-cam channel, which is saying a lot.
5:28 My math teacher has the expression (1/2)! = sqrt(pi)/2 as his profile picture. He did math at Cambridge apparently and all the teachers describe him as the smartest teacher in the school, though he’s never tell it to you. He’s the smartest and most humble man I’ve had the pleasure to meet.
I had some success with visualising the fourth component using colour for 2D in 2D out functions. I find this easier than two separate plots as it is easier to see which points are the same. I'm surprised you haven't tried that yet.
What I also really like about the Gamma function, it's that it has a lot of surprises. Do you know that the volume of a n-dimensional ball can be expressed quite neatly with the Gamma function? It is exactly pi^(n/2) R^n / Gamma(n/2 + 1) (where R is the radius). If I take the factorial notation, and be careful with the whole "shifted by one", it's even better looking : pi^(n/2) R^n / (n/2)! So for example, the volume of a 10d ball of radius 1 is pi^5 / 120. Also note, the cube of radius 1 in which the ball is has a volume of 2^n (that one is easy), so the ratio "ball volume / cube volume" goes to 0 when the dimension n tends to infinity, weird huh? It's because in higher dimensions, "cubes are spiky", by that I mean the distance from opposite corners is larger and larger compared to the length of one side (it's sqrt(n) time bigger, where n is the dimension, thanks to our old friend Pythagoras). That mean for example, the distance from opposite corners of a 100d cube is 10 times larger than the length of its side! So there is a lot of space around these corners, which the ball doesn't take. That's an intuition (well, as much as I can intuit higher dimensions) of why this happens.
I absolutely love factorials, especially the notation. If you have any maths friends who are about to turn 24, write them a birthday card that reads: “Congratulations on turning 4!” (Note this is the only factorial where this joke can reasonably work. For 3!, unless your soon-to-be 6 year old is a maths prodigy, they’ll be too young to understand the joke, and if anything will be offended you think they’re only 3. If your friend has already passed their 24th birthday... well you’re gonna have to wait a while for them to turn 5! to use the joke..)
You can make a really nice plot of complex functions by taking the absolute value as the Z axis, and then mapping the phase angle of the complex number onto the color wheel
If we assume the logarithm of factorial is concave (which is the case for the integers), we get (n+1/2)! /n! between sqrt(n) and sqrt(n+1) so equivalent to sqrt(n+1) when n goes to infinity. Using (u+1)! = u! (u+1), we deduce that (1/2)! is the limit of sqrt(n+1) (n/(n+1/2) ) ((n-1)/(n-1/2)) ((n-2)/(n-3/2)) ... (1 / (3/2)), so using a telescopic product of square roots, product of sqrt(k(k+1)/(k+1/2)^2) starting from k = 1. Taking the square corresponds to Wallis formula.
Yes, noticed too it definitely looks like a sine wave and I was looking through the comments to find out about that. Are you sure it really _is_ a sine wave? Might be interesting to figure out why?
A small point: you say that you can plug in any number into the integral, but the integral only converges when the real part of n is sufficiently large. Fortunately, this is enough, since you can always subtract 1 from n using the recurrence formula.
5:37 "Well, there's no reason why we can't put negative values into our integral formula" Actually, there is a reason. The integral formula for Gamma(z) fails to converge for Re(z)
I wonder what the imaginary factorial would be, where instead of always multiplying by number greater by one you multiply by number greater by i, so f(x) = f(x-i)*x.
If your function is to be analytic (differentiable over complex plane apart from discrete points like poles) then we can substitute x-->ix in your equation and it must still hold. f(ix) = f(ix-i)*ix = f(i(x-1))*ix Let g(x) = (-ix)! = Gamma(1-ix) So that g(ix)= x! = (x-1)!*x = g(i(x-1))*x. This comes pretty close to being your f. W can multiply by i when (x+1) by multiplying the whole function by exp{pi*ix/2} when the input is (ix). When (ix) is imaginary (for real x), this multiplies by i as (x+1). Also, g(x) = (-ix)! = (-ix - 1)!*(-ix) Define h(x) = (-ix)! * exp{pi*x/2}. We check: h(ix) = x! * exp{pi*i*x/2}. When x is real, this equals (x-1)! *x * i * exp{pi*i*(x-1)/2} = h(i(x-1))*ix So we have that h(ix) = h(i(x-1))*ix for real x. If h(x) is to be analytic then we can substitute x --> -ix and the equation would still hold. Giving h(x) = h(x-i)*x Which is your desired function. Hence f(x) = Gamma(1-ix) * exp{pi*x/2}. The Gamma(1-ix) part is simply a 90 degree imaginary rotation of the argument to the function. So the whole function graph is the same but turned 90 degrees. In fact if we plug in that rotated x into the function to see what it is apart from a rotation, h(ix) = x! * exp{pi*i*x/2} It's the same as x! = Gamma(1+x) except multiplied by that exponential. Along the real line of the factorial (remember the whole function is rotated though, so here 'real line of factorial' is actually on the imaginary axis) the function is oscillating in its complex phase. On the imaginary line of the factorial, it is exponential growth/shrink. What I wonder is whether the exponential growth in on one side substantially changes the topography of the function. Maybe it diverges to one side now, instead of dropping off to the sides?
You got my sub....the quick and to the point maths you throw is fun, I honestly disliked factorials and you really did give me a different more colorful perspective on factorials. Thanks :)
I'd love to see your treatment of the reciprocal gamma function. It's arguably an even prettier function than the gamma function itself given that it's not only continuous, but entirely smooth and analytic.
The Gamma function is also continuous, smooth, and analytic. The domain is just not equal to C, as it has nonremovable singularities. Its reciprocal only has removable singularities, so it can be trivially extended to an entire function.
No, because you can do it in multiple ways. For instance, consider finite functions: if you have N points, you can calculate a unique polynomial of degree no larger than N that passes through all those points. A consequence of that is that you can add an additional point to get a new polynomial. And since this additional point can be anywhere, adding different points gives you different polynomials: in particular, if you take two candidate new points with the same X (say, (x, y1) and (x, y2)), the polynomial you'll get adding the first point must be different than the polynomial you get adding the second point (because p(x) can't be y1 and y2 at the same time). A simple example: take (0, 1), (1, 3), (2, 7). It shouldn't be too hard to see that p(x) = x² + x + 1 goes through all three points. Now add (-1, 4). You get a new polynomial, p1(x) = -0.5x³ + 2.5x² + 1, that goes through all four points. But if you instead add (-1, -2), you get p2(x) = 0.5x³ - 0.5x² + 2x + 1, which goes through _this_ extra point plus the original three. So both p1 and p2 are continuous functions that fit the original three points, but they are different functions.
@@joseville No. Analytic continuation is used to extend from an open interval of the real numbers to the complex plane. A discrete set of countably many points is not an open interval.
No. No such a generalized method exists. If you have a discrete function f : Q -> Q, then there are uncountably infinitely many ways to extend such a function to the real numbers.
You can do a 4D plot showing an gradient image as the input and the distorted gradient as the output. We use this a lot in shader computing. You just need to assign each point a colour, show the image on one side of the screen, and on the other, show the image if every point were to the position of the result of putting it through the complex function. Simple UV distortion.
The gamma function is still not the only function satisfying f(x+1)=f(x)*(x+1), another trivial example is f(x)=Gamma(x)(1+0.5*(sin(2*pi*x))). You need one more criterion to fix the gamma function. My favourite one is that the Gamma function fulfills f(z+1)=f(z)*(z+1) everywhere and is bounded on the strip 1
That's nice! The recurrence relation shows that f(x)/Γ(x) has to be periodic; since it's analytic we can write it as a Fourier series using sines and cosines like in your example; but these will blow up in the imaginary direction.
@@gdclemo Yes, what my comment actually proves is that if f satisfies this rule, is analytic on the strip in question, and is bounded on that strip, then f(x)/x! is constant. The constant is 0 if f is your constant 0 function, but 1 if f agrees with the factorial on the positive integers.
When you first showed that the function that goes off to infinity I wondered if you would show the reciprocal of the gamma or factorial function. I just thought that would be interesting. Nice that the square root of pi pops up! I first thought factorial was only a function of positive integers... but how interesting it gets when you extrapolate (generalize) it to all the other numbers!
The graph of the imaginary parts had that wavy bit, and wavy bits tend to be relative to the trig function and that part seems related to sin and now that we have the connection, for a lack of better phrasing, the stalactites and stalagmites are very reminiscent of sec
3:40 Well, technically this is still not enough to uniquely determine the continuation. You also need the condition that log(n!) is a convex function :)
this video is one of the reasons of why i learnt a basic of calculus before i should. how could i miss a Matt video? also , when we get conputers in our brains, the 1st thing i would test is trying to "see" these surfaces because computers dont care about 4 dimensions
As soon as you said factorials, I went and googled that, and now I know what a factorial is! Always learning! ❤
ปีที่แล้ว
I recently watched a video on the gamma function and of course I tried to plug in i. But the first time, I didn't use x^i×Πx/(i+x), but only Πx/(i+x), which comes from outside a circle and approximates it while going around and slowing down. It always takes about 500× more iterations to go around than for the previous round. Pretty cool!
5:47 This actually converges quite fast! I tested it out on wolfram alpha vs the regular method, and it won. To be more precise I tested: N[Power[Gamma\(91)0.5\(93),2], 10000] against N[Pi, 10000]
Another problem using factorials : Imagine you're collecting fridge magnets from a cake brand . In each £2.50 cake package you get 1 magnet from the total number of magnets N . Every magnet as an equal probability of being in your package (P=1/N) How much money would you need to spend to get the entire collection ? Easy to solve numerically but way harder analytically.
Maybe the best way of visualising it to plot the absolute value, and then colour it (according to a standard colour wheel) according to phase? That way you get all of the information and no arbitrary disjointness. Might be better to add gridlines (like the in the old 1900 drawing) to show the curvature as you no longer have colour to do that for you.
10:33 Is it just me or does that “gulley” look suspiciously like a sinusoid? And now that I think about it, the “gulley” for the real part looked like a cosine wave… Maybe this is because the real part of e^(a+bi) is e^acosb and the imaginary part is e^asinb? And that integral did have some complex exponents in it… very interesting, wonder what everyone else thinks?
If each time you mention factorials is as fun as all previous times multiplied together, there are a few options, the most trivial one is just 0*0*0*0*..=0, 1*1*1*1*...=1 and anything between -1 and 1 will just end up converging to 0, those are less interesting cases though. What you get for example if you have a fun value of 2 to start with, your second time around will be 2 as well, as it is just one 2 that you multiply together, next up you have 2*2=4, but for simplicity we can type this as 2^2, next we have 2*2*(2^2)=16 or 2^4, next is 2*2*(2^2)^(2^4)=256 or 2^8. At this point we realize 2 things, first off that we don't really need the 2, we can use any number, say x, and the exponent follow the pattern which is just 2^n, so the amount of fun given a time that is mentioned should be x^(2^n), but that doesn't take account to the first and second time around when the fun is just equal to x, so you would have to define n=0 be the second time you mentioned factorials and the first time you mention factorials to just be a special case, defined to be equal to x. Regardless, the function x^(2^n) is a faster growing function than the factorial function, so the amount of fun you have will eventually be higher than a factorial equivalent increase.
Long time viewer, first time commenter. Absolutely ENAMORED by your channel and all of your videos. Your care and effort shows, and your work is always a pleasure to watch! Keep up the excellent work :)
Since the deck starts in the same configuration each time, and there's only a few ways that people shuffle, if shuffling only once, I highly doubt there hasn't been 2 people ending up with the same order.
It would be interesting to see this as one of 3blue1brown's animated morphings from the complex plane to itself.. And concerning what to call the spikes, maybe "masts"? The hand-drawn graph looks like a design for some weird kind of ship.
Love it! I did the same basic thing with Pascal's Triangle, extending to have any number of terms, the coefficient of said terms can be any value (real or imaginary), and n can be any real number (+, -, or decimal)
@@22tfortnitevevo negative values of n result in the same figures raised to the - 1 power. Decimal values can be converted to n/10, n/100, etc. Any number of terms can be achieved in a few ways, location based addition figures, location based multiplication on figures, series Binomials, or compacting into 2 terms using series substitution. Term coefficients can be varied by substitution down to 1S and then applying powers after the Pascal's expansion. In the case of complex numbers being used as coefficients its the same process but the final expansion will have nested Pascal figures. The real fun is for me is that the processes aren't that hard, I calculated 6 terms to the 6th power by hand in 45 minutes and wrote an excel that could handle up to 26 terms to any given power... Granted I didn't have enough rows to calculate past n=4 The real fun for me was figuring out that the result of multiplying polynomials of differing numbers of terms creates a partial Pascal's figure. Example ((a+b)^n1) ((a+b+c)^n2) will fit into the figure for (a+b+c)^(n1+n2) except the c terms will be truncated from the c-prime vertex by nsum-n1 sets. ((a+b)^2)((a+b+c)^2) will fit into the figure for ((a+b+c)^4) but will not contain terms with c^4 or c^3.
@@22tfortnitevevo I would love to be able to use a graphing program to quickly produce the figures, but math is only a hobby I get to play with on rare occasions. Plus my formal math training stopped at pre-calculus, so I don't even know how to write proofs.
0:17 is the classic moment where there would be some video edit of all the times he talked about factorial, but either the editor (him?) had no time or he never mentioned factorials
PBS level of confusion in the latter part of the video here! I did refresh my memory of what a factorial was, and I enjoyed the graphs. And despite the mental derailment during the 4d plot I consider this a win! :D
Your joke at 24 sec mark is one of your finest to date. Also this video is so fascinating each time i contemplate it I end up multiplying my joy by every previous time and my mind is beginning to run low on ram.
I am really grateful that I've given up my ambitions in academia and pursue a career in growing flowers. The only math problem I've to deal with professionally is to add X% of fertilizer to Y liters of water. (And we don't even bother with the actual concentration in % of the resulting mixture.) This means when I watch these videos now and don't understand some bit about it, I feel no stress and let Matt blabber on until he gets to something I do understand again. And I was still expecting complex numbers to show up when they did, so these videos are not completely wasted on me.
Thanks again to KiwiCo who made this video possible. Now make something in return: KiwiCo.com/StandUpMaths
And definitely check out Ben's video. I'm putting in this pinned comment for everyone too lazy to check the description. For shame. th-cam.com/video/I4fxSYHCa9Y/w-d-xo.html
Integration video not up quite yet? I paused the video to watch all the gory details, but alas, I can't see it on the second channel.
@@Sinnistering It's just an integration by parts.
I assume you have already known that the decimal digit expansion of constant pi is absolutely identical with the decimal digit expansion of sin (0.00000........0000018) degree.
Let’s settle the issue of 0! and 1! first hey?
Why are they both equal to 1
@@PetraKann Well, if you trust 2! = 2, and the recursion relation, then we want 2! = 2 × 1!, so 1! _must_ be 1. By the same reasoning, we want 1! = 1 × 0!, so 0! must _also_ be 1. Convinced?
that hand drawn graph is so cool, the fact that a mathematician in 1909 could visualize the graph without computer renditions is just crazy
I mean, technically they *were* the computer :D
I cried inwardly when Matt said "but, if you want a nicer one". As if the computer renderd one can compete with that hand drawn masterpice
what part of the video are you referring to?
@@kurzackd 7:06
I guess that begs the question: are the minds of thinkers pre-computer age, more elegant than those of today??
I remember I had accidentally discovered this fact a long time ago in school. I was trying to figure out a formula for the volume of an N-dimensional sphere. I started with a circle and then just kept integrating more dimensions to see if I could generalize a formula. The result was that even and odd numbered dimensions each had a different formula that used factorials and interestingly they were offset by 1/2. Using that, I was able to solve for (n + 1/2)! which was really cool and unexpected! It also made sense why pi showed up, since it was related to the volume of spheres.
That sounds fascinating! Would you still happen to have your work around to show off? I'd love to see it!
What were you studying in hs to be messing with nth dimensional spheres? What is your degree in?
That turns out to be really important in quantum field theory. And the continuation of the gamma function to do FRACTIONAL numbers of dimensions is useful as a mathematical trick you can use to deal with divergent integrals during renormalization. It's called dimensional regularization.
That sounds like something 3blue1brown would use as a video concept... I really want to see a video about that, it sounds super interesting
@@jeremygalloway1348 The math is third-semester calculus. You just have to be really persistent.
Matt: "there's no reason why we can't solve for negative values"
graph: goes bananas
graph: u n u n u n
@@RubyPiec Real world Registeel durability in [Indeterminate Time]
In my Master's thesis I made a plot of the Gamma function where the height was the absolute value, and the complex phase was indicated by the color of the graph. It made a really funky rainbow plot, but you could see all the features in it
That sounds awesome! Would be interested to read that, care to drop us a link?
Search for the fractional langevin equation at utrecht university. I even won a thesis prize for it!
I suppose you could also do one where the height is the real component, and the color is the imaginary component.
@@PhilBagels that sounds cool as well, but if goes to infinity do you have to apply a logarithmic color scale?
Your research is fascinating! Fractional calculus is an interest of mine and I'd love to learn more about your research ⛰️
What could have been cool is using the hue on the graphs to represent the argument on the absolute value graph (ie red = positive real, cyan = negative real, chartreuse = positive imaginary, purple = negative imaginary); then you could have gotten much closer to the whole story on one graph
I had a similar thought as I was watching the video.
Chartreuse ????
@@Bean-Time Yes, that's a colour: RGB-Code #DFFF00
If we're using color anyway we _can_ make a sort of 4 d graph, just associate one spatial dimension with a range of colors. Essentially take one of the graphs of one part of the output and color it based on the magnitude of the other part.
@@Bean-Time My grandfather always says it's his favorite color so I grew up thinking it was a normal color that lots of people use. It's the color of tennis balls.
That hand drawn 3d graph represents the most amazing example of dedicated working I've maybe ever seen. It must have taken absolutely forever.
You can use time as a 4th dimension and make it an animation of 3D "slices" through the 4D structure. You'd just have to decide if the time aspect represents the real or imaginary part of the output
It could also represent the real or imaginary values of the input
using color might be better than an animation
@@gyroninjamodder It'd certainly be easier. But then, using colour and time you can have 5D graph.
@@spudhead169 You can use color to represent more than 1 dimension.
Or you could just look at an animation of how the inputs to the function move over to the output of the function. Seeing how the points of the complex plane transform under a function gives you a more visceral feeling for the behavior of the function on the complex plane. In my view, the fact that complex numbers can be represented using two real numbers in a particular order should be ignored as much as possible.
And Euler is there again. Seriously, I'm a civil engineer and I thought Euler was a genius physician and engineer for creating (with Bernoulli) all of material resistance as we know it. Then I learned he was actually a mathematician, and definitely not the least of them
'definitely not the least of them" - that's awesome, I'll use this to describe athletes like Messi, Tiger, Jordan, when G.O.A.T discussions come up
Euler is up there with Gauss as a name that shows up absolutely everywhere.
@@MattMcIrvin He shows up CONSTANTly. :-/
Presumably a physicist and not a physician, no?
@@timotejbernat462 I think op is a French native speaker and that's why they made that mistake
I remember when I first learned about factorials. It was given to us as a self-study chapter in one of my math classes. My friend and I were one of the only ones to finish it. The odd thing is that both of us did not catch that they are called factorials, so we made up our own language. Both of us, independently, came up with the term "exploded". So, 4! was, "four exploded". Sometimes I still call it exploding a number.
Not an inaccurate label at all
Aah, exploded! I love it!
Yeah x! seems to grow faster than x^n and n^x where n is a constant.
I like my six exploded!
"My friend and I were one of the only ones to finish it."
This is an interesting mathematical exercise in itself. The number of people who finished it was "only", and of those "only" people, you and your friend were "one".
I suppose the fact that you and your friend were "one" means that you were the same person, and that you were just talking to yourself.
I am still in the dark, however, about how many people comprise this mysterious number "only".
Fun fact: on older version of iOS you could take the factorial of a non-whole number in the calculator app and it actually worked out the gamma function!
But nowadays it just says ERROR :(
It works in Windows now!
blame jony ive and his ridiculous worship of ideals
@@michaeltajfel It's been working in Windows Calculator for 20 years. I tried that when I first learned what factorial is.
0:09 best factorial joke I’ve ever heard
Unfortunately not quite how the factorial works, but I’ll let it slide.
@@TheBasikShow Right? It's so close, but it's such a good joke you kinda have to give it to him.
Only factorial joke I’ve ever heard :)
@@Genny207 its so close, it's a parker factorial joke
In high school, some friends and I went down a rabbit hole that lead to us learning about the Gamma function. This all started when we were wondering why our TI calculators would give a value for 0.5! (but not for any real number)
Those good times of high school and rabbit holes, sigh…
Going forward, why not plot functions from C->C with absolute value for the height, and argument as the hue of the point? Plus in HSL, hue is already an angle, so it won't have any discontinuities in color, unless there is a discontinuity in the function.
I think this graph was made with pyplot, which uses 2D arrays to create plots, and creates the hue maps automatically. You can mess with them but it goes from a 2 minute job to a 10 minute job.
@@shearnotspear It's only 8 mins longer tho.
The Parker complex hue domain coloring
@@crackedemerald4930 Why call it that tho? It's not inherently flawed.
@@shearnotspear Yes my immediate thought was matplotlib (the parent library for pyplot) and I wondered why a standard color map was used (seems to be the default Viridis) rather than making hue based on imaginary values.
Mad props to the mathematician to drew that by hand without a computer and nailed it.
"How much is real and how much is imaginary" that's what I always think about when watching Matt Parker's videos.
All math is real and all math is imaginary
"Is this a real value? Is this imaginary?"
i was playing around with factorials the other day but it broke my mind trying to figure out even the factorial of simple fractions let alone negative, wow, well done!
Would also have been interesting to plot the phase of the complex numbers
bit of a pet peeve but.. why not just show the domain coloring graph?
We always keep repeating that you can't graph C->C functions because it would have four dimensions, but domain coloring is right there encoding the entire thing, without the distortion from displaying a 3D graph in a 2D screen. It would be much better if we just showed people how visualizing complex functions can be pretty easy...
Every strategy has its own strengths and weaknesses as none of them give the full picture.
@@WindsorMason nah the colouring actually gives the full picture.
@@wizard7314 I should clarify that if you graph with both magnitude and angle as z and hue, then yeah, you have 4 dimensions being graphed. Just like when you have two side by side Re and Im plots. Numerically the full output is shown to you in both cases, but the "full picture" of understanding the behavior of the output plane is only partially glimpsed in each. There are so many different ways to squeeze those 4 dimensions into graphs and each one gives you a different view of the picture.
I mean I’m colourblind so, depending on the colour scheme, colour based graphs are kind of a nightmare for me
The gamma function is essential in quantum mechanics, we use it all the time for calculating reaction probabilities as a function of energy.
If anybody is curious, with the help of Desmos I've found some other interesting values on the graph "x!":
1,5! = 3/4√π
2,5! = 15/8√π
3,5! = 105/16√π
4,5! = 945/32√π
5,5! = 10395/64√π
etc...
- I think you can see the logic. As we go up, the numerator gradually gets multiplied by every next uneven number (or by 2n) and the denominator is just the next power of two
I'm 99% sure you're writing the formulas (3/2)!, (5/2)!, etc., but that is the most confusing list of numbers I've ever seen. My brain can ONLY see [1, 5], [2, 5], [3, 5], etc. and I was trying to figure out what a factorial of a matrix would be. It took me multiple seconds to assume you must be from Europe, and you were just accidentally confusing the hell out of me with your comma shenanigans.
@@kindlin you think that's bad? In some cases I use comma in both decimal place and thousand separators
I usually use a . for decimal point (like 5.2)
And a , for thousand separators (1,000,000.2 = 1 million and a fifth)
bit sometimes I use a , for decimal point (5,2 = 5 and a fifth)
It's a matter of time before I accidentally do something like 1,000,000,2 and confuse the hell out of everyone
@@Xnoob545 1,234,567
if Ive learned anything from 3Blue1Brown, it's that whenever you have Pi, there is always... ALWAYS... a circle hiding somewhere, somehow. So since both 1/2! and -1/2! involve pi, how do they involve circles?
I don't know the answer. But when the square root of pi shows up, it reminds me of the integral of a Gaussian, and I DO know how the circle shows up there. So maybe we can transform the gamma function evaluation at these points into a Gaussian integral somehow.
@@MattMcIrvin Yes, it is because the square X² of a standard Gaussian random variable is a Chi-squared r.v., which is a Gamma distribution with parameters (1/2 , 1/2) hence the gamma(1/2). Now where is the circle ? It is in computing the bivariate Gaussian : the equivalence curves (ellipsoids) are circles x²+y².
Maybe the pillars that shoot up to infinity are circular
The volume of a n-dimensional ball of radius 1 is pi^(n/2) / Gamma(n/2 + 1)
(so with Matt's notations, pi^(n/2) / (n/2)!)
For (-1/2)!, you have the improper integral on [0, ♾) of x^(-1/2)·e^(-x) = 1/sqrt(x)·e^(-x). You can let x = y^2, and this substitution transforms the integral into the integral on [0, ♾) of 2·e^(-y^2). This is equal to the Gaussian integral, and the Gaussian integral is equal to sqrt(π). As for the other half-integer values, you can just the recursion f(n + 1) = (n + 1)·f(n).
This video comes with no better timing. Just a few days ago I plugged x! into desmos expecting it not to work (I had always assumed that it was strictly for natural numbers) I was astounding to see such a zany graph. My TI84 just gave points. All explanations of this Gamma function I found incredibly unintuitive. Thank you, matt.
Now I'm slightly curious what happens if you try to shove a quaternion into the factorial function.
You get an 8D graph. ^_^
How about matrices?
The problem with quaternions (and also matrices) is that a^b is not clearly defined. since a times b is different from b times a, it means that there are actually 2 different powers. a "left power" and a "right power".
@@Tumbolisu Just use a^b=e^(In(a)*b) and taylor series for e^x. This is how we define complex number^complex number.
@@Anonymous-df8it Complex numbers have the property that a*b = b*a, so calculating a^b by using e^(ln(a)*b) is perfectly fine, since its also equal to e^(b*ln(a)). This is not generally true for quaternions or matrices, thus creating two possible definitions for the power.
@2:56 that face after "second criterion" is the face of a man very happy with what he is doing and also happy to explain it to you. Great video as always!
Second channel integration video when???
Also, how far off of the positive real number line does the ski slope extend? I'm interested in the identity line, or if any line through the origin still grows faster than exponential functions. There wasn't enough graph in the positive direction to see what the end behavior might look like.
i'd be interested in a graph/formula showing the inflection points.
OMG I'm so happy you're finally talking about this! The gamma function and analytic continuation was a short obsession of mine as a math enthusiast and amateur a year ago. There aren't that many accessible videos talking about it (at least on the surface) so I had to do some traditional reading and research. I am definitely used to being spoonfed by effective educators like you, so it was definitely a very fruitful exercise! And now here you are a year later to summarize everything in your signature Stand-Up Maths format and manner.
I love the fact that Matt has had someone throw him an item in his videos for probably years and he still enjoys it every time
One of the things that makes it not obvious that you can extend the factorial in this way is that the factorials of negative integers are undefined--those happen to be the places where the gamma function blows up. So if you do the simplest thing and try to extend it in the negative direction past 0, you run into a brick wall and it perhaps seems like that's the end.
I think one might be able to use animations to visualize a 4d plot. One could show a graph of the 2d input "morph" into a 2d graph of the output. Keeping track of individual points and how they transform could be interesting.
Just another style of visualisation of 4D. I believe that is something 3blue1brown uses in some of his videos, but it's not really that intuitive. In 2D, the lines of the input plane just weirdly flip or spin around and overlap, after which you still don't have much but a cool animation. You definitely don't have a clear sense of what's happening, but that's hard to achieve with anything.
It turns out the only two places we ever see sqrt(pi) show up, namely (-1/2)! and Stirling's formula for n!, are connected. First you prove an asymptotic formula between the (Gaussian) integral that defines (-1/2)! and integrals of powers of cos(x). Then you find a recurrence relation for integral of cos(x)^n which allows you to express it in terms of integer factorials. Finally expand them using Stirling's formula and you'll see the correspondence between the sqrt(pi)'s!
PS: There's an article by Professor Kent Conrad which collects many different proofs of the Gaussian integral. Really cool if you, like me, only knew the famous polar coordinates one.
what
Fun Fact, this function is ubiquitous in theoretical particle physics. This is due to the fact that the volume of a D-dimensional sphere can be expressed through the Gamma function and the poles of the gamma function correspond to the high energy behavior of your model.
Yes indeed! And in these calculations, it's actually useful to (1) compute an integral on 4D spacetime by first computing the integral on 4D Euclidean space (which is a different thing entirely), and (2) continue the function into *fractional* dimensions, from 4D to (4 minus epsilon)D, to make some divergent integrals converge so you can get a handle on precisely how they are divergent during renormalization.
I had to search up the word Ubiquitous. And that made me realize just how little I know lol.
One way to avoid the dips to infinity is to take the reciprocal - ie 1/x!. Also works for complex numbers and makes the function "entire".
I have only used the absolute function with real numbers. I had no idea that it essentially gives you the magnitude of a complex vector. How interesting! Thanks Matt!
Thinking of complex numbers in polar coordinates--absolute value and phase angle--is really useful. Multiplying complex numbers means you multiply the absolute values and *add* the phase angles (or "arguments"), so complex numbers with an absolute value of 1 (on the unit circle, that is) are useful for describing rotations in the plane, or anything that cycles or oscillates.
@@MattMcIrvin
This is the core idea behind Euler's e^ix = cosx+isinx
The absolute value of a complex number is just the magnitude of that number, same as any 2D vector. The distance between any two points [x1,y1] and [x2,y2] is just sqrt((x2-x1)^2+(y2-y1)^2), similar to the pythagorean of a triangle, c=sqrt(a^2+b^2). In fact, the distance formula in any number of dimensions is just the Pythagorean formula.
Random fact: Six weeks is exactly 10! seconds.
Indeed!
And 1000 years is about 9! days
I want to tell you, sitting down and proving this was the first but of recreational math I've done in years
I've just watched 2 minutes of the video so far, but I just wanted to comment, hoping that you'll stumble on it by mere chance, this is some of the best TH-cam content I've ever consumed, and it has nothing to do with the educational value, these videos are, as far as I'm concerned, the maths and in-person equivalent of the "Ahoy" TH-cam channel, which is saying a lot.
That opening gag should not have made me laugh so hard. Well done, Matt.
5:28
My math teacher has the expression (1/2)! = sqrt(pi)/2 as his profile picture. He did math at Cambridge apparently and all the teachers describe him as the smartest teacher in the school, though he’s never tell it to you. He’s the smartest and most humble man I’ve had the pleasure to meet.
I had some success with visualising the fourth component using colour for 2D in 2D out functions. I find this easier than two separate plots as it is easier to see which points are the same. I'm surprised you haven't tried that yet.
What I also really like about the Gamma function, it's that it has a lot of surprises. Do you know that the volume of a n-dimensional ball can be expressed quite neatly with the Gamma function? It is exactly pi^(n/2) R^n / Gamma(n/2 + 1) (where R is the radius).
If I take the factorial notation, and be careful with the whole "shifted by one", it's even better looking : pi^(n/2) R^n / (n/2)!
So for example, the volume of a 10d ball of radius 1 is pi^5 / 120.
Also note, the cube of radius 1 in which the ball is has a volume of 2^n (that one is easy), so the ratio "ball volume / cube volume" goes to 0 when the dimension n tends to infinity, weird huh? It's because in higher dimensions, "cubes are spiky", by that I mean the distance from opposite corners is larger and larger compared to the length of one side (it's sqrt(n) time bigger, where n is the dimension, thanks to our old friend Pythagoras). That mean for example, the distance from opposite corners of a 100d cube is 10 times larger than the length of its side! So there is a lot of space around these corners, which the ball doesn't take. That's an intuition (well, as much as I can intuit higher dimensions) of why this happens.
I absolutely love factorials, especially the notation. If you have any maths friends who are about to turn 24, write them a birthday card that reads:
“Congratulations on turning 4!”
(Note this is the only factorial where this joke can reasonably work. For 3!, unless your soon-to-be 6 year old is a maths prodigy, they’ll be too young to understand the joke, and if anything will be offended you think they’re only 3. If your friend has already passed their 24th birthday... well you’re gonna have to wait a while for them to turn 5! to use the joke..)
You probably wouldn't be able to do the 5 factorial one because only 1 person as far as we know (Jeanne Calment) lived to their 120th year.
Yeah, it's very unlikely, but not impossible, like say 6!
You can make a really nice plot of complex functions by taking the absolute value as the Z axis, and then mapping the phase angle of the complex number onto the color wheel
"Complex Tundra of Nothingness" = My next band name
If we assume the logarithm of factorial is concave (which is the case for the integers), we get (n+1/2)! /n! between sqrt(n) and sqrt(n+1) so equivalent to sqrt(n+1) when n goes to infinity. Using (u+1)! = u! (u+1), we deduce that (1/2)! is the limit of sqrt(n+1) (n/(n+1/2) ) ((n-1)/(n-1/2)) ((n-2)/(n-3/2)) ... (1 / (3/2)), so using a telescopic product of square roots, product of sqrt(k(k+1)/(k+1/2)^2) starting from k = 1. Taking the square corresponds to Wallis formula.
While watching the intro, I opened my CAS and just wrote: factorial(-1/2)
It returned: sqrt(pi)
I almost vomited from bewilderment
I saw him dancing without shoes, I almost vomited from bewilderment.
The power of not stopping! Your content is outstanding now!
10:23 its actually a sine wave, with the middle starting on 0 and it dipping on 1 side and rising on the other
yeah that made me wonder if you could express the same function as wave interference equations
Yes, noticed too it definitely looks like a sine wave and I was looking through the comments to find out about that. Are you sure it really _is_ a sine wave? Might be interesting to figure out why?
This video was absolutely satisfactorial
A small point: you say that you can plug in any number into the integral, but the integral only converges when the real part of n is sufficiently large. Fortunately, this is enough, since you can always subtract 1 from n using the recurrence formula.
"The Grand Tour" poster right there on the wall is just fantastic! Good job Matt.
I'd like to see an animated plot of the results where one of the dimensions is represented by time.
Do it.
5:37
"Well, there's no reason why we can't put negative values into our integral formula"
Actually, there is a reason. The integral formula for Gamma(z) fails to converge for Re(z)
I wonder what the imaginary factorial would be, where instead of always multiplying by number greater by one you multiply by number greater by i, so f(x) = f(x-i)*x.
If your function is to be analytic (differentiable over complex plane apart from discrete points like poles) then we can substitute x-->ix in your equation and it must still hold.
f(ix) = f(ix-i)*ix = f(i(x-1))*ix
Let g(x) = (-ix)! = Gamma(1-ix)
So that g(ix)= x! = (x-1)!*x = g(i(x-1))*x.
This comes pretty close to being your f. W can multiply by i when (x+1) by multiplying the whole function by exp{pi*ix/2} when the input is (ix). When (ix) is imaginary (for real x), this multiplies by i as (x+1).
Also, g(x) = (-ix)! = (-ix - 1)!*(-ix)
Define h(x) = (-ix)! * exp{pi*x/2}.
We check: h(ix) = x! * exp{pi*i*x/2}.
When x is real, this equals
(x-1)! *x * i * exp{pi*i*(x-1)/2} = h(i(x-1))*ix
So we have that h(ix) = h(i(x-1))*ix for real x. If h(x) is to be analytic then we can substitute x --> -ix and the equation would still hold. Giving
h(x) = h(x-i)*x
Which is your desired function.
Hence
f(x) = Gamma(1-ix) * exp{pi*x/2}.
The Gamma(1-ix) part is simply a 90 degree imaginary rotation of the argument to the function. So the whole function graph is the same but turned 90 degrees.
In fact if we plug in that rotated x into the function to see what it is apart from a rotation,
h(ix) = x! * exp{pi*i*x/2}
It's the same as x! = Gamma(1+x) except multiplied by that exponential. Along the real line of the factorial (remember the whole function is rotated though, so here 'real line of factorial' is actually on the imaginary axis) the function is oscillating in its complex phase. On the imaginary line of the factorial, it is exponential growth/shrink.
What I wonder is whether the exponential growth in on one side substantially changes the topography of the function. Maybe it diverges to one side now, instead of dropping off to the sides?
You got my sub....the quick and to the point maths you throw is fun, I honestly disliked factorials and you really did give me a different more colorful perspective on factorials. Thanks :)
I'd love to see your treatment of the reciprocal gamma function. It's arguably an even prettier function than the gamma function itself given that it's not only continuous, but entirely smooth and analytic.
The Gamma function is also continuous, smooth, and analytic. The domain is just not equal to C, as it has nonremovable singularities. Its reciprocal only has removable singularities, so it can be trivially extended to an entire function.
At 4:00 : The integral definition of z! breaks down if n
Is there a generalized method for turning discrete functions into continous ones?
Generalized method for generalizing - now there's a high-ranking idea.
Analytic continuation, maybe?
No, because you can do it in multiple ways. For instance, consider finite functions: if you have N points, you can calculate a unique polynomial of degree no larger than N that passes through all those points.
A consequence of that is that you can add an additional point to get a new polynomial. And since this additional point can be anywhere, adding different points gives you different polynomials: in particular, if you take two candidate new points with the same X (say, (x, y1) and (x, y2)), the polynomial you'll get adding the first point must be different than the polynomial you get adding the second point (because p(x) can't be y1 and y2 at the same time).
A simple example: take (0, 1), (1, 3), (2, 7). It shouldn't be too hard to see that p(x) = x² + x + 1 goes through all three points.
Now add (-1, 4). You get a new polynomial, p1(x) = -0.5x³ + 2.5x² + 1, that goes through all four points. But if you instead add (-1, -2), you get p2(x) = 0.5x³ - 0.5x² + 2x + 1, which goes through _this_ extra point plus the original three. So both p1 and p2 are continuous functions that fit the original three points, but they are different functions.
@@joseville No. Analytic continuation is used to extend from an open interval of the real numbers to the complex plane. A discrete set of countably many points is not an open interval.
No. No such a generalized method exists. If you have a discrete function f : Q -> Q, then there are uncountably infinitely many ways to extend such a function to the real numbers.
You can do a 4D plot showing an gradient image as the input and the distorted gradient as the output.
We use this a lot in shader computing. You just need to assign each point a colour, show the image on one side of the screen, and on the other, show the image if every point were to the position of the result of putting it through the complex function.
Simple UV distortion.
Is the audio very saturated just for me?
No, for me too. Watching on my Pi4 so I was in doubt if this was the cause....
The first 'n' looks like lambda and the modern graph looks just like the 1909 graph minus the steampunk. Great work!
I also love factorials
Thanks Ben Kelly
You’re welcome Jeremy Johns
"... really enjoy multiplying." Perfect delivery!
The gamma function is still not the only function satisfying f(x+1)=f(x)*(x+1), another trivial example is f(x)=Gamma(x)(1+0.5*(sin(2*pi*x))). You need one more criterion to fix the gamma function. My favourite one is that the Gamma function fulfills f(z+1)=f(z)*(z+1) everywhere and is bounded on the strip 1
That's nice! The recurrence relation shows that f(x)/Γ(x) has to be periodic; since it's analytic we can write it as a Fourier series using sines and cosines like in your example; but these will blow up in the imaginary direction.
f(x+1)=f(x)*(x+1) is also satisfied by f(x)=0. It doesn't contain the factorials though.
@@gdclemo Yes, what my comment actually proves is that if f satisfies this rule, is analytic on the strip in question, and is bounded on that strip, then f(x)/x! is constant. The constant is 0 if f is your constant 0 function, but 1 if f agrees with the factorial on the positive integers.
When you first showed that the function that goes off to infinity I wondered if you would show the reciprocal of the gamma or factorial function. I just thought that would be interesting. Nice that the square root of pi pops up!
I first thought factorial was only a function of positive integers... but how interesting it gets when you extrapolate (generalize) it to all the other numbers!
In Calculus, factorials were interesting.
That they were
The graph of the imaginary parts had that wavy bit, and wavy bits tend to be relative to the trig function and that part seems related to sin and now that we have the connection, for a lack of better phrasing, the stalactites and stalagmites are very reminiscent of sec
3:40 Well, technically this is still not enough to uniquely determine the continuation. You also need the condition that log(n!) is a convex function :)
this video is one of the reasons of why i learnt a basic of calculus before i should. how could i miss a Matt video?
also , when we get conputers in our brains, the 1st thing i would test is trying to "see" these surfaces because computers dont care about 4 dimensions
Every single time Matt says "they" when referring to someone I am momentarily confused as who/what he's talking about.
Is this a thing with people in England or is it just Matt's personal idiosyncrasy?
Matt can't be bothered to learn people's pronouns; he's too busy doing math!
@@gordoofdoom It's not an England thing. I think it's just a Matt thing. I don't know of anyone else that does it.
As soon as you said factorials, I went and googled that, and now I know what a factorial is! Always learning! ❤
I recently watched a video on the gamma function and of course I tried to plug in i. But the first time, I didn't use x^i×Πx/(i+x), but only Πx/(i+x), which comes from outside a circle and approximates it while going around and slowing down. It always takes about 500× more iterations to go around than for the previous round. Pretty cool!
3:41- *_They_* came up with that solution? Wait, so Euler was multiple people? No wonder he (I mean, they) got so much done...
boring
They can be used as a singular third person pronoun, even in cases where the gender isn't necessarily ambiguous.
@@LofferLogge It can be, but its confusing and pointless and should not be used that way.
@@LofferLogge but why?
@@qupp75 Maybe it's a shield against getting cancelled.
5:47
This actually converges quite fast! I tested it out on wolfram alpha vs the regular method, and it won.
To be more precise I tested:
N[Power[Gamma\(91)0.5\(93),2], 10000]
against
N[Pi, 10000]
I have no idea what you just typed into a youtube comment, what's any of that supposed to do? Also, what converges to what at 5:47?
@@kindlin The gamma function of 0.5 is the square root of pi, so we can apply the function to 0.5 and square it to calculate pi.
Another problem using factorials :
Imagine you're collecting fridge magnets from a cake brand .
In each £2.50 cake package you get 1 magnet from the total number of magnets N .
Every magnet as an equal probability of being in your package (P=1/N)
How much money would you need to spend to get the entire collection ?
Easy to solve numerically but way harder analytically.
Maybe the best way of visualising it to plot the absolute value, and then colour it (according to a standard colour wheel) according to phase? That way you get all of the information and no arbitrary disjointness. Might be better to add gridlines (like the in the old 1900 drawing) to show the curvature as you no longer have colour to do that for you.
10:33
Is it just me or does that “gulley” look suspiciously like a sinusoid?
And now that I think about it, the “gulley” for the real part looked like a cosine wave…
Maybe this is because the real part of e^(a+bi) is e^acosb and the imaginary part is e^asinb? And that integral did have some complex exponents in it… very interesting, wonder what everyone else thinks?
Riemann Zeta zeros are coefficients of π, basically z = (x * (0..π), y * (π..0)) or z = (x * cos x, y * sin y), so 1² or i² squared would yield 1...
when you normalize rad to 1 this should fold everything
If each time you mention factorials is as fun as all previous times multiplied together, there are a few options, the most trivial one is just 0*0*0*0*..=0, 1*1*1*1*...=1 and anything between -1 and 1 will just end up converging to 0, those are less interesting cases though.
What you get for example if you have a fun value of 2 to start with, your second time around will be 2 as well, as it is just one 2 that you multiply together, next up you have 2*2=4, but for simplicity we can type this as 2^2, next we have 2*2*(2^2)=16 or 2^4, next is 2*2*(2^2)^(2^4)=256 or 2^8. At this point we realize 2 things, first off that we don't really need the 2, we can use any number, say x, and the exponent follow the pattern which is just 2^n, so the amount of fun given a time that is mentioned should be x^(2^n), but that doesn't take account to the first and second time around when the fun is just equal to x, so you would have to define n=0 be the second time you mentioned factorials and the first time you mention factorials to just be a special case, defined to be equal to x.
Regardless, the function x^(2^n) is a faster growing function than the factorial function, so the amount of fun you have will eventually be higher than a factorial equivalent increase.
Long time viewer, first time commenter.
Absolutely ENAMORED by your channel and all of your videos. Your care and effort shows, and your work is always a pleasure to watch!
Keep up the excellent work :)
A number around 0.46163 has the lowest factorial of any positive number.
Since the deck starts in the same configuration each time, and there's only a few ways that people shuffle, if shuffling only once, I highly doubt there hasn't been 2 people ending up with the same order.
It would be interesting to see this as one of 3blue1brown's animated morphings from the complex plane to itself..
And concerning what to call the spikes, maybe "masts"? The hand-drawn graph looks like a design for some weird kind of ship.
Love it! I did the same basic thing with Pascal's Triangle, extending to have any number of terms, the coefficient of said terms can be any value (real or imaginary), and n can be any real number (+, -, or decimal)
wait how
@@22tfortnitevevo negative values of n result in the same figures raised to the - 1 power. Decimal values can be converted to n/10, n/100, etc. Any number of terms can be achieved in a few ways, location based addition figures, location based multiplication on figures, series Binomials, or compacting into 2 terms using series substitution. Term coefficients can be varied by substitution down to 1S and then applying powers after the Pascal's expansion. In the case of complex numbers being used as coefficients its the same process but the final expansion will have nested Pascal figures.
The real fun is for me is that the processes aren't that hard, I calculated 6 terms to the 6th power by hand in 45 minutes and wrote an excel that could handle up to 26 terms to any given power... Granted I didn't have enough rows to calculate past n=4
The real fun for me was figuring out that the result of multiplying polynomials of differing numbers of terms creates a partial Pascal's figure. Example ((a+b)^n1) ((a+b+c)^n2) will fit into the figure for (a+b+c)^(n1+n2) except the c terms will be truncated from the c-prime vertex by nsum-n1 sets. ((a+b)^2)((a+b+c)^2) will fit into the figure for ((a+b+c)^4) but will not contain terms with c^4 or c^3.
@@ffximasterroshi awesome dude you should make a visualization of it on a graphing software or smth
@@22tfortnitevevo I would love to be able to use a graphing program to quickly produce the figures, but math is only a hobby I get to play with on rare occasions. Plus my formal math training stopped at pre-calculus, so I don't even know how to write proofs.
@@ffximasterroshi damn that sucks, hopefully another commenter stumbles on this and is able to do it
This is my favorite headache of all time.
There are also multi-level factorials, such as superfactorial and superduperfactorial.
The integrals doesn’t converge for negative values. The gamma function is extended using the regular factorial relation.
The "stick complex numbers into this function" videos are my favourite.
I love the casio sitting on the desk.
The actual joy experienced when pi came up 😂 like a kid getting a sweet from grandma know he's gonna get it.
0:17 is the classic moment where there would be some video edit of all the times he talked about factorial, but either the editor (him?) had no time or he never mentioned factorials
I think the latter would make more sense.
PBS level of confusion in the latter part of the video here! I did refresh my memory of what a factorial was, and I enjoyed the graphs. And despite the mental derailment during the 4d plot I consider this a win! :D
You could bring up literally any topic tangentially related to math(s) and Matt will say "aaaah... I love (topic)." That's why I love him.
Your joke at 24 sec mark is one of your finest to date. Also this video is so fascinating each time i contemplate it I end up multiplying my joy by every previous time and my mind is beginning to run low on ram.
I love how the symbol for factorials is just shouting the number it's applied to
Correction: "let me know if you spot anything mistakes". The irony. Love your videos!!!
I am really grateful that I've given up my ambitions in academia and pursue a career in growing flowers. The only math problem I've to deal with professionally is to add X% of fertilizer to Y liters of water. (And we don't even bother with the actual concentration in % of the resulting mixture.)
This means when I watch these videos now and don't understand some bit about it, I feel no stress and let Matt blabber on until he gets to something I do understand again. And I was still expecting complex numbers to show up when they did, so these videos are not completely wasted on me.
that's amazing. i instantly thought about the fibonacci video once i saw the title and thumbnail
I just love it when π turns up when you least expect it.
Okay so it's really nitpicking but when you say "we plug in negative values" for Gamma(s), Re(s)
I resent the offset of 1 in the definition of the gamma function so much. SO MUCH.