Understanding Lagrange Multipliers Visually

Поділитися
Вставка
  • Опубліковано 22 сер 2021
  • 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/morpho-matters/mor...

КОМЕНТАРІ • 324

  • @scalex1882
    @scalex1882 Рік тому +465

    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 Рік тому +8

      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 Рік тому +15

      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 Рік тому +15

      @@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 Рік тому +2

      ​@@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 UA-cam that allowed brilliant teacher to explain mathematics from simplest concepts to the most complicated ones.

  • @rintepis9290
    @rintepis9290 Рік тому +179

    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 Рік тому +3

      @@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 Рік тому +10

      @@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 Рік тому +5

      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 7 місяців тому +37

    I'm doing a PhD in aerospace engineering and never have I seen a video so clear on this topic. chapeau!

    • @paganaye
      @paganaye 20 днів тому

      Chapeau = "hats off."

  • @hatelovebowel4571
    @hatelovebowel4571 2 роки тому +24

    this is fking amazing. The best explanation and Calculus should be taught with geometry, it is so clear.

  • @leonvonmoltke7923
    @leonvonmoltke7923 2 роки тому +75

    I would like to say that it is not often that people explain things better than khan academy. Well done sir.

    • @NemoTheGlover
      @NemoTheGlover 2 роки тому +11

      once you go past Cal I, khan academy content isint that great in my opinion

    • @agrajyadav2951
      @agrajyadav2951 Рік тому +2

      @@NemoTheGlover what

  • @firstkaransingh
    @firstkaransingh 2 роки тому +71

    I salute you for taking a complex concept and breaking it down to understand at a very basic level.
    More power to you.

  • @omargaber3122
    @omargaber3122 Рік тому +10

    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

  • @richardvondracek496
    @richardvondracek496 5 місяців тому +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!!

  • @Hinchey613
    @Hinchey613 6 днів тому

    The animation at 2:50 was incredible, definitley ignited a light bulb moment in my head.

  • @Murphyalex
    @Murphyalex Рік тому +12

    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.

  • @gohanmineiro
    @gohanmineiro Рік тому +9

    Simple, clear, and concise explanation. Kudos.

  • @plekkchand
    @plekkchand Рік тому +1

    Wonderful, direct, lucid, free of affected cuteness and cosmic background music. Thank you!

  • @qwerasdliop2810
    @qwerasdliop2810 Рік тому +5

    Absolutely incredible! Can't believe something so simple yet incredible was fit into such a simple set of equations, just under the surface!

  • @krittaprottangkittikun7740
    @krittaprottangkittikun7740 2 роки тому +13

    This video is way underrated, it is very clear and nice!

    • @SerpentineIntegral
      @SerpentineIntegral  2 роки тому +5

      @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: ua-cam.com/channels/u7Zwf4X_OQ-TEnou0zdyRA.html

  • @franciscorivas4036
    @franciscorivas4036 Рік тому

    Best explanation I've found so far about lagrange multipliers. Thank you.

  • @alperyldrm4788
    @alperyldrm4788 Рік тому

    That is wonderful how you visualize and construct the idea step by step! Grateful!

  • @lh2738
    @lh2738 Рік тому +1

    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.

  • @rhke6789
    @rhke6789 7 місяців тому

    Best explanation of Lagrange multipliers on UA-cam. Congrats and thank you

  • @derrick20
    @derrick20 Рік тому +8

    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

  • @CG119Animator
    @CG119Animator Місяць тому +2

    That explanation was stellar! You broke down a tough concept without frying anyone's brain cells.

  • @ktgiahieu1
    @ktgiahieu1 6 місяців тому

    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!

  • @boutainabenhmida6071
    @boutainabenhmida6071 2 роки тому +2

    never seen a visual explanation better than this

  • @harshal8956
    @harshal8956 Рік тому +1

    This just blew my mind. This is what I was looking for. Great work.

  • @StarContract
    @StarContract Місяць тому +3

    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.

  • @user-dz9eb7fu2f
    @user-dz9eb7fu2f 2 роки тому +9

    Very clearly explained, this clarified a lot for me thank you so much

  • @yendrian44
    @yendrian44 9 місяців тому +1

    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

  • @gossipGirlMegan
    @gossipGirlMegan Рік тому +1

    Excellent work I ever met ! Tanks a lot ,deer professor!!!

  • @davidebic
    @davidebic Рік тому +1

    This is exactly the intuition I had trying to understand Lagrange Multipliers!

  • @laodrofotic7713
    @laodrofotic7713 Рік тому +1

    This is a good video, congratulations on helping millions around the globe with this.

  • @zhuleung2938
    @zhuleung2938 Рік тому +2

    excellent work. you've just made me understand what confuse me throughout my whole collage life.

  • @mase4256
    @mase4256 Місяць тому

    That was the best explanation I’ve ever seen in multivariable calculus, definitely subscribing

  • @flatmajor6802
    @flatmajor6802 4 місяці тому

    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🔥

  • @user-ky5ve8ss3x
    @user-ky5ve8ss3x 2 роки тому +1

    every teacher should teach like this! very excellent illustration

  • @KYosco
    @KYosco 6 місяців тому

    That makes it extremely intuitive! I don't think one can explain it any better than that.

  • @NicolasMartinezAngulo
    @NicolasMartinezAngulo 8 місяців тому

    Could not have explained it any better. Probably top 3 math videos I've ever seen.

  • @anthonytafoya3451
    @anthonytafoya3451 Рік тому +2

    Wow! Thank you for this video. Visuals GO A LONG WAY my brother. Cheers and you have a new subscriber :)

  • @zacharydavis4398
    @zacharydavis4398 Рік тому +1

    Solid content 👍🏾Thanks for spending the time to create and share 🤙🏾

  • @autumnreed2079
    @autumnreed2079 7 місяців тому

    This is beautiful! I wanted something to help me explain Lagrange Multipliers better as a tutor and this was brilliant. Thanks

  • @klevisimeri607
    @klevisimeri607 Рік тому +3

    This video is more valuable than gold!

  • @meirgold
    @meirgold 2 роки тому +2

    Excellent and clear explanation. Thanks very much!

  • @sandeepmandrawadkar9133
    @sandeepmandrawadkar9133 6 місяців тому

    Unbelievably super simplified explanation 👏

  • @VectorSpace33
    @VectorSpace33 3 місяці тому

    This video was executed perfectly. Great job.

  • @dufrain79
    @dufrain79 Рік тому +9

    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.

  • @dannis5165
    @dannis5165 3 місяці тому

    that rolling ball analogy is so insane. i never understood a concept more clearly before.

  • @canowow11
    @canowow11 Рік тому +1

    really good video on a difficult math problem, but visually you made it easy

  • @readjordan2257
    @readjordan2257 Рік тому +4

    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.

  • @yosef7947
    @yosef7947 2 роки тому

    The best video by far on the topic!!!

  • @LucaSalemi
    @LucaSalemi Рік тому +1

    Brilliant explanation and visuals!

  • @jmajumder15
    @jmajumder15 2 роки тому

    Amazing explanation !
    Pure gold

  • @eklhaft4531
    @eklhaft4531 4 місяці тому

    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.❤

  • @user-wr4yl7tx3w
    @user-wr4yl7tx3w Рік тому +1

    Wow, that is really well and clearly explained.

  • @manueelrubik
    @manueelrubik 16 днів тому

    this video is low key the best math lesson even made, congrat s

  • @Speak4Yourself2
    @Speak4Yourself2 11 місяців тому

    Outstanding visuals. Thanks a lot!

  • @Words-.
    @Words-. 8 місяців тому

    The visuals are soooo well done

  • @paulgerlach2625
    @paulgerlach2625 Рік тому

    insane video. cant express how much this helped me

  • @chamnil8666
    @chamnil8666 2 роки тому +2

    very very useful and amazing explanation.Thank you so very much.

  • @JulianHarris
    @JulianHarris 4 місяці тому +2

    Outstanding. Just spent a whole morning trying to understand these things and the visualisations really really crystallise the relationships. Obviously this is an advanced topic and the prerequisites involve simultaneous equations, a little bit of linear algebra and partial derivatives. But once you’re in that position, I think this is possibly the best way to understand Lagrange multipliers.

  • @NoNTr1v1aL
    @NoNTr1v1aL Рік тому +2

    Absolutely amazing video! Subscribed.

  • @trippymccube8735
    @trippymccube8735 2 роки тому

    This video made my brain tingle, thank you very much!

  • @ronaldjorgensen6839
    @ronaldjorgensen6839 Рік тому

    thank you for your time and persistence

  • @user-qs3ih3ll5f
    @user-qs3ih3ll5f Рік тому +1

    Thank you. I love this explanation.

  • @agaz1985
    @agaz1985 3 місяці тому

    This is THE way to explain things. Thanks!

  • @cadedulaney1522
    @cadedulaney1522 Рік тому +1

    Incredible explanation this helped me so much

  • @mehdiardavan
    @mehdiardavan Рік тому +4

    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?

  • @vladimirkolovrat2846
    @vladimirkolovrat2846 Рік тому

    Brilliant graphics and explanation.

  • @suhasisroy7240
    @suhasisroy7240 2 роки тому

    Such a great visualisation

  • @adwaitkesharwani3569
    @adwaitkesharwani3569 Рік тому

    Thank you for the clear explanation!

  • @federicoferraro7080
    @federicoferraro7080 Рік тому +1

    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 !

  • @breitbandfunker4332
    @breitbandfunker4332 Рік тому +2

    best video for understanding lagangian multipliers - now i understood it :-)

  • @samfriedman5031
    @samfriedman5031 Рік тому

    Amazing explanation and graphics!

  • @BarryKort
    @BarryKort 22 дні тому

    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.

  • @curtpiazza1688
    @curtpiazza1688 5 місяців тому

    Interesting presentation! Love the graphics! 😊

  • @kensonmalupande2424
    @kensonmalupande2424 Рік тому +1

    Excellently explained.keep it up sir 💪

  • @Yeahagreed
    @Yeahagreed Рік тому

    Absolutely insane. Thank you so much.

  • @jackyyeh8763
    @jackyyeh8763 6 місяців тому

    Fantastic explanation. Thanks!

  • @jesusfuentes7589
    @jesusfuentes7589 Рік тому

    Hats off, man, really good one. Thank you very much.

  • @shankhasinha1444
    @shankhasinha1444 5 місяців тому

    Thank you so much for making this video.

  • @atirmahmood7058
    @atirmahmood7058 8 місяців тому

    Awesome just awesome because of the perfect visualisation

  • @ilong4rennes
    @ilong4rennes Рік тому +1

    thank you so much for your extraordinary video! this helps me a lot!

  • @mahxylim7983
    @mahxylim7983 2 роки тому

    Clearly explain! thank you so much

  • @englemanart
    @englemanart Рік тому

    Brilliant presentation!

  • @CaRmEn899
    @CaRmEn899 Рік тому

    This is just awesome. Really thanks

  • @kaytea2983
    @kaytea2983 4 місяці тому

    Very nice for developing intuition re Lagrange multipliers.

  • @Strausse12
    @Strausse12 2 роки тому

    absolutely fantastic!

  • @elyjamesuzu
    @elyjamesuzu Рік тому

    this channel is highly underrated...

  • @egeecagan
    @egeecagan Місяць тому +1

    best explanation ever without killing some of my brain cells

    • @verracaelum5258
      @verracaelum5258 28 днів тому

      agam bu tarz animasyonlarla anlatan başka bildiğin kanallar var mı bu adamın az videosu varmış böyle

  • @NCPROF.
    @NCPROF. 10 місяців тому

    What an impressive explanation, Thank you!

  • @gourbiswas7176
    @gourbiswas7176 2 роки тому

    Excellent, many thanks to you .

  • @ascanius398
    @ascanius398 Рік тому

    Thank you. I was struggling with this.

  • @Amprichu
    @Amprichu Рік тому

    YOU ONLY HAVE 1.5K SUBS???????? THIS VIDEO WAS SO HELPFUL WHAT

  • @cyberpunk2978
    @cyberpunk2978 2 роки тому

    This is awesome! AWESOME!

  • @phy6geniuxYTcreations
    @phy6geniuxYTcreations 11 місяців тому

    This video is amazing! Thank you for your dedication.

  • @SCALER
    @SCALER 2 роки тому +1

    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

  • @sam08090
    @sam08090 Рік тому

    Fantastic explanation 💗

  • @nathanryan12
    @nathanryan12 6 днів тому

    Thanks! I had to watch a few times, but it makes sense now

  • @colins.9367
    @colins.9367 Рік тому

    You are a life saver, thank you!

  • @youpushtoomuch7095
    @youpushtoomuch7095 Рік тому +1

    So amazing!

  • @Mathematics_and_physics
    @Mathematics_and_physics Рік тому +1

    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.

  • @AJ-et3vf
    @AJ-et3vf Рік тому

    Awesome video! Thank you!

  • @yaronyahav656
    @yaronyahav656 11 місяців тому

    this is so so so good. thank you.