Тёмный

Understanding Lagrange Multipliers Visually 

Serpentine Integral
Подписаться 28 тыс.
Просмотров 340 тыс.
50% 1

When you first learn about Lagrange Multipliers, it may feel like magic: how does setting two gradients equal to each other with a constant multiple have anything to do with finding maxima and minima? Here's a visual explanation.
~~~
This video was funded by Texas A&M University as part of the Enhancing Online Courses grant.
~~~
The animations in this video were mostly made with a homemade Python library called "Morpho". You can find the project here:
github.com/mor...

Опубликовано:

 

26 сен 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 339   
@scalex1882
@scalex1882 Год назад
This is one of these things where you are sitting in university, getting fed the final formula with an absolutely insane proof of the formula that makes you question reality and when you see this video it takes no more than 10 minutes to understand the entire concept. Absolutely incredible, thank you so much!
@lehninger2691
@lehninger2691 Год назад
Wait, you guys are getting an absolutely insane proof???
@ico-theredstonesurgeon4380
@ico-theredstonesurgeon4380 Год назад
Why the heck dont they teach these things visually in university?? This video is literally higher quality education for free. It makes no sense at all
@pyropulseIXXI
@pyropulseIXXI Год назад
You should start reading the textbook and doing the proof yourself. This stuff in the video is basically just straight from the textbook. As for visualizations, you should be visualizing this stuff in your head. If your 'learning method' is to just sit in lecture and let a professor program you, you won't ever learn anything, which is why you'll be confused all the time until someone basically does the learning for you (like this video).
@ico-theredstonesurgeon4380
@ico-theredstonesurgeon4380 Год назад
@@pyropulseIXXI that's true but I would argue that sometimes visualisations really speed up the learning process, and teachers are often not the best at drawing.
@ahmedbenmbarek9938
@ahmedbenmbarek9938 Год назад
​@@ico-theredstonesurgeon4380it is not free it is sponsored by a university. The main issue with understanding math is to have a teacher who really understands maths to begin with. Most math teachers are simple folks looking for a fat salary. Maybe themselves do not understand the concept so they simply regurgitate what another teacher did to them. Anyway all thanks to RU-vid that allowed brilliant teacher to explain mathematics from simplest concepts to the most complicated ones.
@rintepis9290
@rintepis9290 Год назад
I am so impressed by how clear this video manages to explain the intuition behind the Lagrange Multipliers. The only part I had to pause and ponder is to show the gradient of f must be perpendicular to the level curve when the point is a local maximum on the boundary curve.
@shouligatv
@shouligatv Год назад
Same, if anyone has an intuitive explanation, please do share it !
@jozsefnemeth935
@jozsefnemeth935 Год назад
@@shouligatv it was explained by the ball on the slope: a perpendicular barrier to the ball trajectory will stop the ball, hence the barrier is in the horizontal plane.
@gdvirusrf1772
@gdvirusrf1772 Год назад
@@shouligatv If you imagine the parametrized curve of the boundary of f(x,y), you'll know that the maxima/minima occur at points where the derivative of the parametrized curve is equal to 0 (the single variable calculus way of solving the problem). The thing is, if the derivative is nonzero, then it must either point to the right (positive derivative) or to the left (negative derivative) on the parametrized curve. But this must also mean the gradient vector on the actual function f(x,y) itself must _also_ point to the right or left! Another way to say this is that for a point on the boundary of f(x,y), any deviation in the gradient vector away from perpendicular _must_ imply that the derivative of the parametrized curve of the boundary is nonzero at that point, and hence it _cannot_ be a max/min. So only the points where the derivative of f(x,y) is perpendicular could possibly be a max/min.
@sender1496
@sender1496 Год назад
It follows from the definition of the gradient. At a local min/max, the slope of f is zero along the boundary curve, meaning that f doesn't change in that direction. The gradient gives you the direction and magnitude in which a function changes the most and is thus perpendicular to this. In other words, if the gradient were to have a component in the "boundary curve"-direction (ie not perpendicular), then surely it couldn't have slope zero since f would be increasing/decreasing when wandering on the boundary.
@jozsefnemeth935
@jozsefnemeth935 Год назад
@@shouligatv another way to look at the problem: we search for points where a level curve of the f-surface is tangent to the constraint curve. The perpendicular to these curves belonging to the X,y plane will be the same. By definition, the gradient on the respective surfaces provides this perpendicular.
@GiulioDean
@GiulioDean 10 месяцев назад
I'm doing a PhD in aerospace engineering and never have I seen a video so clear on this topic. chapeau!
@paganaye
@paganaye 3 месяца назад
Chapeau = "hats off."
@leonvonmoltke7923
@leonvonmoltke7923 2 года назад
I would like to say that it is not often that people explain things better than khan academy. Well done sir.
@NemoTheGlover
@NemoTheGlover 2 года назад
once you go past Cal I, khan academy content isint that great in my opinion
@agrajyadav2951
@agrajyadav2951 Год назад
@@NemoTheGlover what
@golchha_J
@golchha_J 2 месяца назад
KA video on this topic was crap
@omargaber3122
@omargaber3122 Год назад
I can't believe I managed to understand Lagrange Multipliers after all these years!!!!!!! , how magical math is when it's understood, thank you so much
@hatelovebowel4571
@hatelovebowel4571 2 года назад
this is fking amazing. The best explanation and Calculus should be taught with geometry, it is so clear.
@richardvondracek496
@richardvondracek496 8 месяцев назад
I have been waiting for this video my whole life. Although I did many calculations with Lagrange multipliers in my life It never clicked in my brain the way other things did. Close to half century old and you have just completed my brain. ♥♥ Thank you so much for this. ♥♥ Damn.. this feel good. You are my new hero!!
@gergerger53
@gergerger53 Год назад
That whole framing in terms of terrain, seas and what counts as the shoreline are fantastic metaphors to aid the conceptual understanding of this method. Very, very well represented, here.
@krittaprottangkittikun7740
@krittaprottangkittikun7740 2 года назад
This video is way underrated, it is very clear and nice!
@SerpentineIntegral
@SerpentineIntegral 2 года назад
@joseph ramos Hey, hello! I still make new videos, but not on this channel anymore. I put all my new stuff on a new channel called Morphocular. You can find it here: ru-vid.com/show-UCu7Zwf4X_OQ-TEnou0zdyRA
@CG119Animator
@CG119Animator 4 месяца назад
That explanation was stellar! You broke down a tough concept without frying anyone's brain cells.
@yendrian44
@yendrian44 Год назад
Holy shit when you said that lamda in this case is called the Lagrange multiplier I could literally feel the creation of new neuron connections in my brain. This video is a masterpiece
@qwerasdliop2810
@qwerasdliop2810 Год назад
Absolutely incredible! Can't believe something so simple yet incredible was fit into such a simple set of equations, just under the surface!
@gohanmineiro
@gohanmineiro 2 года назад
Simple, clear, and concise explanation. Kudos.
@laodrofotic7713
@laodrofotic7713 Год назад
This is a good video, congratulations on helping millions around the globe with this.
@derrick20
@derrick20 Год назад
A neat way to conceptualize this idea is to think of the constraint function as a filter of sorts, since we know every point along the constraint curve has a gradient perpendicular to the curve (this can also be understood in the sense that everything is a local extremum, since they are all equal, so the direction of max increase shouldn’t be biased to either side similar to the ball analogy in the video). So, when setting the gradients of the two functions equal, we just filter only the extreme in the objective function
@StarContract
@StarContract 4 месяца назад
In my opinion, good mathematical education should strive to develop your mathematical intuition, which in turn you would be able to turn into formality. This video is literally perfect.
@boutainabenhmida6071
@boutainabenhmida6071 2 года назад
never seen a visual explanation better than this
@alperyldrm4788
@alperyldrm4788 Год назад
That is wonderful how you visualize and construct the idea step by step! Grateful!
@plekkchand
@plekkchand Год назад
Wonderful, direct, lucid, free of affected cuteness and cosmic background music. Thank you!
@zhuleung2938
@zhuleung2938 Год назад
excellent work. you've just made me understand what confuse me throughout my whole collage life.
@klevisimeri607
@klevisimeri607 Год назад
This video is more valuable than gold!
@davidebic
@davidebic Год назад
This is exactly the intuition I had trying to understand Lagrange Multipliers!
@flatmajor6802
@flatmajor6802 7 месяцев назад
This presentation of L.M is much easier than the presentation that the level curve of the max of f is tangent to the level curve of g. Completely bypasses the need to show why they would be tangent at all. Ty🔥
@ktgiahieu1
@ktgiahieu1 9 месяцев назад
Thank you very much for such impressive video. The concept used to be so blurry to me, yet it is as clear as bright day now!
@user-dz9eb7fu2f
@user-dz9eb7fu2f 2 года назад
Very clearly explained, this clarified a lot for me thank you so much
@rhke6789
@rhke6789 10 месяцев назад
Best explanation of Lagrange multipliers on RU-vid. Congrats and thank you
@dufrain79
@dufrain79 Год назад
A very good informative video for beginners in optimisation. Very good entry level for understanding Lagrange Multipliers. Such a beautiful use of the Morpho library under Python.
@harshal8956
@harshal8956 Год назад
This just blew my mind. This is what I was looking for. Great work.
@NicolasMartinezAngulo
@NicolasMartinezAngulo 11 месяцев назад
Could not have explained it any better. Probably top 3 math videos I've ever seen.
@franciscorivas4036
@franciscorivas4036 Год назад
Best explanation I've found so far about lagrange multipliers. Thank you.
@eklhaft4531
@eklhaft4531 7 месяцев назад
I have no idea why they couldn't explain it like this at the university instead of just throwing a bunch of boring letters at us but here we are. I feel like you just removed an ulcer from my brain that's been sitting there for couple of years. Thanks.❤
@mase4256
@mase4256 4 месяца назад
That was the best explanation I’ve ever seen in multivariable calculus, definitely subscribing
@breitbandfunker4332
@breitbandfunker4332 Год назад
best video for understanding lagangian multipliers - now i understood it :-)
@egeecagan
@egeecagan 4 месяца назад
best explanation ever without killing some of my brain cells
@verracaelum5258
@verracaelum5258 3 месяца назад
agam bu tarz animasyonlarla anlatan başka bildiğin kanallar var mı bu adamın az videosu varmış böyle
@محمداحمد-ز4ل6ط
@محمداحمد-ز4ل6ط 2 года назад
every teacher should teach like this! very excellent illustration
@sepehr__byt
@sepehr__byt 12 дней назад
The video was phenomenal and truly amazing; thank you for providing such valuable content!
@Hinchey613
@Hinchey613 3 месяца назад
The animation at 2:50 was incredible, definitley ignited a light bulb moment in my head.
@dannis5165
@dannis5165 6 месяцев назад
that rolling ball analogy is so insane. i never understood a concept more clearly before.
@KYosco
@KYosco 9 месяцев назад
That makes it extremely intuitive! I don't think one can explain it any better than that.
@canowow11
@canowow11 Год назад
really good video on a difficult math problem, but visually you made it easy
@lh2738
@lh2738 Год назад
Thanks a lot for such a well explained and drawn video, it really helps a lot to understand the subject. This channel is pure gold.
@gossipGirlMegan
@gossipGirlMegan Год назад
Excellent work I ever met ! Tanks a lot ,deer professor!!!
@anthonytafoya3451
@anthonytafoya3451 2 года назад
Wow! Thank you for this video. Visuals GO A LONG WAY my brother. Cheers and you have a new subscriber :)
@autumnreed2079
@autumnreed2079 10 месяцев назад
This is beautiful! I wanted something to help me explain Lagrange Multipliers better as a tutor and this was brilliant. Thanks
@manueelrubik
@manueelrubik 3 месяца назад
this video is low key the best math lesson even made, congrat s
@meirgold
@meirgold 2 года назад
Excellent and clear explanation. Thanks very much!
@sandeepmandrawadkar9133
@sandeepmandrawadkar9133 9 месяцев назад
Unbelievably super simplified explanation 👏
@federicoferraro7080
@federicoferraro7080 Год назад
Even yhough I knew the answer, this helped to visualise the concepts and even helped me make links with other concepts (fluid mechanics). So thanks a lot !
@zacharydavis4398
@zacharydavis4398 Год назад
Solid content 👍🏾Thanks for spending the time to create and share 🤙🏾
@camel2666
@camel2666 3 месяца назад
single-handedly saving my vector calc grade!
@readjordan2257
@readjordan2257 2 года назад
I really enjoy this channel. I love the presentation and explanations. I watch a lot of math channels, but this one is (for me) just as good as any of them.
@Ganerrr
@Ganerrr Год назад
would solving like (lim m->k {d/dz (f/(g-m))}) = 0 work?
@VectorSpace33
@VectorSpace33 6 месяцев назад
This video was executed perfectly. Great job.
@user-wr4yl7tx3w
@user-wr4yl7tx3w Год назад
Wow, that is really well and clearly explained.
@hereigoagain5050
@hereigoagain5050 Год назад
Amazing graphics really help to understand Lagrange Multipliers. My middle name must be "Lambda" because I don't contribute to the solution :)
@BarryKort
@BarryKort 3 месяца назад
In order to actually find the extremum of a function subject to constraints, it's typically necessary to determine the actual values of the Lagrange multipliers. One of the better behaved algorithms is to replace the scalar Lagrange multiplier by a convex curve which can be adjusted by means of an iterative solution process. This method, known as the Generalized Lagrange Multiplier Method is mathematically related to another important branch of mathematics called Duality Theory. Such Primal-Dual Methods were explored by myself and Professor Dimitri Bertsekas in the early 1970s, when we were both at Stanford University. The resultant algorithm is spelled out in one of Dimitri's textbooks on the subject of Optimization Methods.
@NoNTr1v1aL
@NoNTr1v1aL Год назад
Absolutely amazing video! Subscribed.
@SCALER
@SCALER 2 года назад
Hey, nice video, could you tell what animation tool you use for the animations here?
@SerpentineIntegral
@SerpentineIntegral 2 года назад
Thanks! The animations were made using a homemade Python library called "Morpho". You can find the project here: github.com/morpho-matters/morpholib
@Words-.
@Words-. 11 месяцев назад
The visuals are soooo well done
@agaz1985
@agaz1985 6 месяцев назад
This is THE way to explain things. Thanks!
@chamnil8666
@chamnil8666 2 года назад
very very useful and amazing explanation.Thank you so very much.
@kaytea2983
@kaytea2983 7 месяцев назад
Very nice for developing intuition re Lagrange multipliers.
@elyjamesuzu
@elyjamesuzu Год назад
this channel is highly underrated...
@mehdiardavan
@mehdiardavan Год назад
Fantastic video. Well visualized and explained. I was just wondering what you used to make the graphical effects while showing LaTeX formula rotate in 3D?
@nathanryan12
@nathanryan12 3 месяца назад
Thanks! I had to watch a few times, but it makes sense now
@cadedulaney1522
@cadedulaney1522 2 года назад
Incredible explanation this helped me so much
@ronaldjorgensen6839
@ronaldjorgensen6839 Год назад
thank you for your time and persistence
@harrymorris5319
@harrymorris5319 Год назад
4:07 for Lagrange multipliers to work - need to have the constraint expressed as some expression involving x and y set equal to a constant x^2 + y^2 = 4 6:57 8:33 10:30 11:20 The max or min of a function f(x,y) which has a constraint g(x,y) = k must occur where ∆f (gradient of f) is parallel to ∆g (gradient of g) . If two vectors are parallel one is a scalar multiple of another. So ∆f = λ ∆g and λ the scalar multiple is called the Lagrange multiplier How to solve 12:13
@Amprichu
@Amprichu Год назад
YOU ONLY HAVE 1.5K SUBS???????? THIS VIDEO WAS SO HELPFUL WHAT
@ebenenspinne4713
@ebenenspinne4713 Год назад
Awesome video. There is only one thing I find misleading here: at 7:10 you show the gradient vectors as vectors in the literal direction of steepest ascend, implying them to be 3-dimensional vectors. In my opinion this is misleading and gives a wrong intuition for the gradient that I myself had for a long time. Remember how the gradient is defined. Then it follows clearly that the gradient vectors are 2-dimensional vectors for a function like f or g which only has two inputs. It helps to visualize the graph of f or g in one's head as a plane with colours indicating the magnitude of the output and the gradient vectors pointing in the direction of "steepest ascend" of the temperature/colour. Then it follows clearly that the gradient vectors are 2-dimensional, perpendicular to the level curve and all in one plane passing through the level curve (as shown correctly at 9:55). *This should not change* just because we change how we visualize the graph/magnitude of the output of the function. 10:43 has the same issue. With this small correction/improvement, this video is very good!
@피타코라스
@피타코라스 9 месяцев назад
yes you're right i also think that is wrong! in 3 variable, gradient vector should be normal to the tangent plain.
@user-qs3ih3ll5f
@user-qs3ih3ll5f Год назад
Thank you. I love this explanation.
@joaogoncalves-tz2uj
@joaogoncalves-tz2uj 2 месяца назад
this is the best video I've seen on this topic and it still doesn't clear all the doubts about it. Why does it when the tangent line at the 3d curve of g is parallel to the plane xy we can say the gradient at f is perpendicular to the "level curve" of g? Also, given that there are infinite lines perpendicular to a given line, how does it guarantees grad f // grad g?
@firstkaransingh
@firstkaransingh 2 года назад
I salute you for taking a complex concept and breaking it down to understand at a very basic level. More power to you.
@shankhasinha1444
@shankhasinha1444 8 месяцев назад
Thank you so much for making this video.
@jasonspencer7267
@jasonspencer7267 6 месяцев назад
This is the best explanation on this topic that I've seen, after seeking them out for years. I really wish math would be taught more like this, where the intuition comes first, and then you see how it is just notated in equations (that will then have some conceptual meaning.) _Very_ nicely done!
@PB-sk9jn
@PB-sk9jn Год назад
haha.. when I was final year undergrad we had a prof of theoretical physics teach us lagrange multipliers, who inexplicably said he couldn't explain it and had never found a good explanation. I figured this out and explained it to him and to my classmates. So bloody obvious I thought...
@harshraj2575
@harshraj2575 Год назад
Can someone please explain how the gradient of F became parallel to the gradient of G? I know they share the same tangent plane so the gradients must be parallel but i was not able to understand the logic that was said in the video.
@carultch
@carultch Год назад
In case you are curious for where the local maxima along the trail are, I'll tell you the answers. There are 8 total solutions, 4 of which are trivial to find. The 4 remaining solutions that require Lagrange multipliers to find are at: x = +/-1.052, y=+/- 0.7125 See if this is consistent on my contour plot.
@odysseus9672
@odysseus9672 Год назад
From the point of view of finding the minimization, lambda tells you nothing. If you're working with a Lagrangian, though, then the Lagrange multiplier tells you the force needed to maintain the constraint.
@gaboqv
@gaboqv Год назад
It actually also tells you how a little change in the constraint could make this max much higher or lower, in economics this is important as optima with very high sensititivity could mean that having the correct measurements of constraints is paramount.
@PacoCotero1221
@PacoCotero1221 Год назад
Its also, in microeconomics, the marginal effect of budget variations in utility + budget constraint problems in some instances
@Mathematics_and_physics
@Mathematics_and_physics Год назад
It is worth noting that g(x,y)=k defines some differentiable manifold , and the gradient vector is expanded in terms of the basis of the orthogonal complement to the tangent space of the manifold.
@atirmahmood7058
@atirmahmood7058 11 месяцев назад
Awesome just awesome because of the perfect visualisation
@paulgerlach2625
@paulgerlach2625 Год назад
insane video. cant express how much this helped me
@yosef7947
@yosef7947 2 года назад
The best video by far on the topic!!!
@kensonmalupande2424
@kensonmalupande2424 2 года назад
Excellently explained.keep it up sir 💪
@Speak4Yourself2
@Speak4Yourself2 Год назад
Outstanding visuals. Thanks a lot!
@curtpiazza1688
@curtpiazza1688 8 месяцев назад
Interesting presentation! Love the graphics! 😊
@trippymccube8735
@trippymccube8735 2 года назад
This video made my brain tingle, thank you very much!
@프로틴요플레
@프로틴요플레 Год назад
The first thing I come up with when considering Lagrange Multipliers is that it is a pure hella substitutions if the number of constraints are less than the number of dimensions..
@ilong4rennes
@ilong4rennes Год назад
thank you so much for your extraordinary video! this helps me a lot!
@vladimirkolovrat2846
@vladimirkolovrat2846 2 года назад
Brilliant graphics and explanation.
@marcods6546
@marcods6546 Год назад
A bit repetitive in the explanation, but finally a good explanation of this concept. Thanks a lot!
@brianyeh2695
@brianyeh2695 9 месяцев назад
Your explanation is another level. You link every step with a question, which is an excellent way for people to follow well
@Yeahagreed
@Yeahagreed Год назад
Absolutely insane. Thank you so much.
@taravanova
@taravanova Год назад
Does this only work for points of the surface of f(x,y) constrained by the equation g(x,k)=k? In other words, if you were looking for a maximum using this method, would it give you: 1) a point on the boundary or 2) the point in the center of f(x,y)? I suspect 1), and you would get 2) if the constraint was g(x,k)
@jesusfuentes7589
@jesusfuentes7589 Год назад
Hats off, man, really good one. Thank you very much.
@jmajumder15
@jmajumder15 2 года назад
Amazing explanation ! Pure gold
@jackyyeh8763
@jackyyeh8763 9 месяцев назад
Fantastic explanation. Thanks!
@lucialee1232
@lucialee1232 Год назад
Very good explanation thank you
@vkessel
@vkessel Год назад
At 10:39 I could imagine a counterexample by deforming the surface. Realized the deformation would result in partial derivatives that don't exist because they depend on the direction of the limit. Mentioning in case someone else runs into that line of thought.
@ascanius398
@ascanius398 Год назад
Thank you. I was struggling with this.
@adwaitkesharwani3569
@adwaitkesharwani3569 Год назад
Thank you for the clear explanation!
Далее
Change of Variables and the Jacobian
13:08
Просмотров 298 тыс.
Lagrange Multipliers | Geometric Meaning & Full Example
12:24
История Hamster Kombat ⚡️ Hamster Academy
04:14
Why Utopias Are Evil
24:31
Просмотров 4,7 тыс.
Visualization of tensors  - part 1
11:41
Просмотров 593 тыс.
This Is the Calculus They Won't Teach You
30:17
Просмотров 3,2 млн
How to do two (or more) integrals with just one
18:03
Просмотров 376 тыс.