The Lagrangian

Поділитися
Вставка
  • Опубліковано 28 лис 2016
  • Courses on Khan Academy are always 100% free. Start practicing-and saving your progress-now: www.khanacademy.org/math/mult...
    How a special function, called the "Lagrangian", can be used to package together all the steps needed to solve a constrained optimization problem.
  • Навчання та стиль

КОМЕНТАРІ • 193

  • @Rubikorigami
    @Rubikorigami 7 років тому +1016

    Wait... Could it be... 3Blue1Brown?!

  • @flomoose7315
    @flomoose7315 Рік тому +55

    This man is bringing me single handedly through my economics undergraduate degree!!! Keep it up and thank you!

  • @Vaibhav101
    @Vaibhav101 6 років тому +104

    Perhaps the best explanation on the Internet. Thanks 3B1B !

    • @andeslam7370
      @andeslam7370 3 роки тому +3

      can't agree more....

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

      Is this actually 3Blue1Brown??

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

      ​@@sjoerd7512 yes he worked with khan academy

  • @vambire02
    @vambire02 2 роки тому +6

    Very clear and concise explanation. Thanks a lot. I had the lagrange function in many courses at college but this is the first time I fully understand the concept behind it.

  • @NoahTopper
    @NoahTopper 3 роки тому +12

    I just...can't believe that I took a whole course in Optimization and nobody ever told me this is where the Lagrangian comes from. It's so clear.

    • @borninthenorthMi
      @borninthenorthMi 3 роки тому +3

      Well, I guess they had to take this part out to make room for the course in deconstructionist critical-race mathematics. Universities have become a straight-up scam.

    • @98danielray
      @98danielray 3 роки тому +8

      @@borninthenorthMi it is ok, michalina. you will go to a decent university someday

    • @borninthenorthMi
      @borninthenorthMi 3 роки тому

      @@98danielray name one

    • @jasonports8517
      @jasonports8517 2 роки тому +4

      @@borninthenorthMi CRT in maths? nice meme

  • @WigglyHedgehog
    @WigglyHedgehog 7 років тому +36

    The usefulness of the Lagrangian equation is not only because it's easier to program into a computer. The lambda can also be interpreted as the amount that R(x,y) would increase if the constant b in the constraint function could be relaxed by one unit. That can also be explained given only the geometric setup, but it's a little easier to calculate it given the Lagrangian.

    • @rokarus7658
      @rokarus7658 5 років тому +3

      This also justifies its usage in economics - marginal propensity to save and to consune are the bedrock for Keynesian (read: modern) economics.

  • @RaviShankar-jm1qw
    @RaviShankar-jm1qw Рік тому +8

    Arguably the best explanation of Lagrangian on the internet! Thanks @Khan Academy!

  • @eughyuck
    @eughyuck 2 роки тому +3

    Thank you! I have this issue in lectures where I frequently zone-out/forget to turn up so I appreciate your thorough clear explanation which leaves no knowledge gaps :)

  • @moussatouhami7567
    @moussatouhami7567 7 років тому +4

    hi khan family ,i'm very happy to find your videos on the internet free and very comfortable to watch your videos it's help me so much and we need more video about electromagnetism circuits magnetic (hyper circuits&circuits composite..& Coils ...)

  • @principaljpnce9802
    @principaljpnce9802 4 роки тому +3

    Simplest way of explaining the most complicated looking concept. Hats off to you Sir 👌👌👌

  • @danielc4267
    @danielc4267 7 років тому +68

    3:06 "why is lambda so hard to draw?" lol

  • @luiskraker807
    @luiskraker807 11 місяців тому +2

    I was struggeling a bit with understanding the concept of Lagrangian, but this videos of you helped me a lot. Thanks!

  • @silverlining6824
    @silverlining6824 3 роки тому +5

    Turning some calculus into geometry is helpful to those who visualize. Thank you!

  • @joezhang2633
    @joezhang2633 7 років тому +113

    Awesome explanations! I've been struggling to figure this out for 3 years in my Ph.D. and this is the best one!

    • @hichamboukharsa1639
      @hichamboukharsa1639 4 роки тому +1

      Could you explain me why lambda not equal to 1? Is shouldn't be 1 because the gradient is calculated for the same point (tangent)
      Thnx

    • @anmol.sharma010
      @anmol.sharma010 4 роки тому +6

      @@hichamboukharsa1639 lambda could be 1 and it could not be. But there is no guarantee. And yes the gradient is being calculated at the same point, but we are calculating the gradient with respect to two separate functions and then equating the two. The two gradients will be proportional and in order to remove the proportionality, we add lambda(a constant). If It is still unclear, see the previous video on lagrangian multipliers. Hope this helps!

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

      And our mad processor is teaching us this in bachelors electronics and communication engineering here in India.

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

      @@harisrashid0773 Same, Economics

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

      Hope you got your Ph. D

  • @ull893
    @ull893 6 років тому +10

    Welcome Blue and Brown guy! You are such a great teacher !

  • @cesaaargm
    @cesaaargm 2 роки тому +3

    thanks. I am studying the mechanical aspect of the lagrangian, applied to a mechanical system that is conservative. This approach is useful to widen my view of the probelam!

  • @lewistian7975
    @lewistian7975 4 роки тому +13

    That perfect red curve looks satisfying

  • @dangiscongrataway2365
    @dangiscongrataway2365 7 років тому +204

    Is this 3blue1brown talking?

  • @saurabhsharma7123
    @saurabhsharma7123 6 років тому +2

    Such an excellent tutorial!

  • @tudor6210
    @tudor6210 3 роки тому +1

    Such a nice presentation of the Lagrangian!

  • @aeroscience9834
    @aeroscience9834 7 років тому +155

    Dang it. I was hoping for Lagrangian mechanics.

    • @zairaner1489
      @zairaner1489 7 років тому +22

      Well that is what is behind the first Lagrange formalism for mechanics ;)

    • @user-vb4eq4vx1q
      @user-vb4eq4vx1q 7 років тому +1

      Same :(

    • @eulefranz944
      @eulefranz944 7 років тому +12

      we are in 2. semester and learn Lagrange...

    • @eulefranz944
      @eulefranz944 7 років тому +6

      We learn both actually^ :/

    • @Chalisque
      @Chalisque 7 років тому +4

      Before you try to get your head around Lagrangian mechanics, it is perhaps useful to understand the Lagrangian itself, and the intuition behind it. When applying it to mechanics, you don't want to still be thinking about what Lagrangians are and how they work.

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

    Apparently this is going to be important in my classical mechanics and QM class. Thanks!

    • @ES-qe1nh
      @ES-qe1nh Рік тому +2

      I mean yeah classical mechanics is basically just fancy constrained optimization with some cool mathematical theorems behind it (

  • @Chalisque
    @Chalisque 7 років тому +26

    The art of creatively adding zero: B(x,y)=4 means B(x,y)-4 = 0 means lambda(B(x,y)-4) = 0 means R(x,y) - lambda(B(x,y)-4) = R(x,y) provided the constraint holds. So lambda only has an effect when the constraint does not hold. Minimising the magnitude of influence of lambda (i.e. how much effect changing lambda has) is equivalent to making that influence zero (since influence=0 can be attained when the constraint is), and making that influence zero for nonzero lambda means obeying the constraint. I always enjoy cleverness like this in mathematics. Zero is a creature with many disguises.

    • @gavtriple9
      @gavtriple9 3 роки тому

      Very similar to a Perturbation

  • @peterfisher3161
    @peterfisher3161 3 роки тому +3

    I just clicked on this video, because I trust Khan Academy as a knowledge source. But Grant was a welcome surprise.

  • @naviderfani
    @naviderfani 4 роки тому +1

    Thanks for the great video. Would you please make a video about Lagrange duality.

  • @sarahmushroomkiller9233
    @sarahmushroomkiller9233 6 років тому +4

    omg, 3Blue1Brown never fail you. Always can find the best explanation from him! BRAVO!

  • @juliechoudury6912
    @juliechoudury6912 7 років тому

    Please do a video explaining the inter-temporal rate of substitution

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

    Khan academy is the GOAT of mathematical/physics topics!

  • @sigeeky
    @sigeeky 4 роки тому +4

    Great video, now it's clear and easy to understand! THANK YOU!

  • @liabraga4641
    @liabraga4641 7 років тому +10

    3Blue1Brown ❤❤❤ thank you!!

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

    Could anybody explain: What the difference between Lagrangian multipliers and sequential quadratic programming (SQP)?

  • @MrCobraTraders
    @MrCobraTraders 3 роки тому

    Best best best best explaination ever!!!

  • @thinkanddo2352
    @thinkanddo2352 6 років тому

    Thank you!

  • @sleeepymoe
    @sleeepymoe 3 роки тому +1

    12:25 he mentioned modeling the revenue or the budget as functions, any idea how to calculate such functions?

  • @1722mayur
    @1722mayur 2 роки тому +2

    Imagine this guy being your university professor for every course you take.

  • @sachin_suthar
    @sachin_suthar 5 років тому

    Nice explanation

  • @hakeemnaa
    @hakeemnaa 9 місяців тому

    Tring to find the maximum
    when L does not change when x change, that when it reaches maximum( or minimum)
    same as y
    also, lima since at that point, it does not change, because of changing in direction ( increase to decrease)

  • @user-iv9nj9nx8q
    @user-iv9nj9nx8q 2 місяці тому

    I think the constraint equation should actually be x^2 + y^2 =16 to match the red circle because when y=0 and x=4 (where the red circle intersects the x-axis on the right), x^2 would be 16. Or else the red circle should be made smaller to have a radius of 2 units.

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

    Superb!

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

    still the best explanation in youtube

  • @edwinyangtw
    @edwinyangtw 4 роки тому

    Could you please put the link of the next course blow for convenience.

  • @hardikgupta4038
    @hardikgupta4038 5 років тому +2

    usually we have many constraints and not just one. suppose there was another constraint, how will the equation change?

  • @MaxwellsWitch
    @MaxwellsWitch 6 років тому +9

    Wait... 3Blue1Brown? Awesome!

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

    Very helpful - as always! Didn't ZZ top write a song about La Grange?

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

    Is it really necessary to include the b in R - lambda B? When you take the derivatives in later steps that will just go to 0 because it is constant. Is it really necessary to take dL/dlambda? You get information that was given in the first place.

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

    When can see the function is less difficult to understand. Thank you

  • @jordia.2970
    @jordia.2970 7 місяців тому

    Seems crazy that, given how simple the explanation of where the Lagrangian comes from, that equation is commonly given without further justification... Makes one wonder if some teachers even know what they are doing beyond following a recipe...

  • @Stardoll0tutorials
    @Stardoll0tutorials 3 роки тому

    i won`t for sure need this in life , but i will for sure need this to pass my maths exam .

  • @momolesumo201
    @momolesumo201 4 роки тому

    I think you can add a variable and have '

  • @g3452sgp
    @g3452sgp 6 років тому +4

    Which playlist does this video belong to?
    I want to see more.

  • @franciscorivas4036
    @franciscorivas4036 4 роки тому

    Can I suggest adding the link to the full playlist so one can find more videos related to the current video?

    • @benjaminrichards4709
      @benjaminrichards4709 3 роки тому +1

      You'll be able to find it on the Khan Academy website in the Multivariable Calculus section

  • @ugursoydan8187
    @ugursoydan8187 4 роки тому

    why we define the action integral of lagrangian times dt? has we got a proof for it?

  • @pengzhou8926
    @pengzhou8926 3 роки тому

    非常的透彻

  • @Saptarshi.Sarkar
    @Saptarshi.Sarkar 4 роки тому

    We can get both the maximum and minimum using this. Right?

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

    Why does Sal sound like Grant when he explains math?

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

    God I wish you were my teacher for advanced diff eq!

  • @shibaneethakur5035
    @shibaneethakur5035 3 роки тому

    Sir which book you have preferred for this

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

    Ah the sweet voice of Grant. What a pleasure

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

    What are the prequisite of langrangian?

  • @mariofelipequevedolozano3659
    @mariofelipequevedolozano3659 3 роки тому +1

    I have a question, in some textbooks the Lagrangian is written as ''L(x,y,lamda)=F(x,y)+Lamda*G(x,y)'' where G(x,y) is the constriction, and yours is L=GradF-Lamda*GradG, in the end the systems of equations that must be solved are different by a minus sign and it changes quite a bit the results. Why are this equations different? I mean, I understood your explanation and it's pretty cool, but i couldn't use your equation because it was different from the one I saw in cass.

    • @_nttai
      @_nttai 3 роки тому +1

      I had the same question too. After some googling I found out that you'll get different values of λ (positive or negative) but the same solutions in terms of x, y, and your objective function. Using the Lagrangian you want to find the point (x,y) so that ∇f+λ∇g=0 which means the points such that ∇f and ∇g are linearly dependent so it is irrelevant the condition ±λ. In other words, you only care about x and y

    • @hbbh
      @hbbh 3 роки тому +1

      @@_nttai thanks

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

    Can somebody explain to me how the gradient of R is promotional of B...please

  • @Adrian124
    @Adrian124 3 роки тому +7

    "You'd never have a budget that looks like a circle"
    Huh, didn't think so

  • @vitorbraga28
    @vitorbraga28 6 років тому +1

    what is the program that he uses for the graph?

    • @legendariersgaming
      @legendariersgaming 5 років тому +1

      I am pretty sure it is a custom program, probably adapted from his Python library that he uses to animate his videos on 3Blue1Brown

  • @kamitube1059
    @kamitube1059 4 роки тому

    why do we substract the b ?

  • @DarkCloud7
    @DarkCloud7 6 років тому

    Danke

  • @johndwolynetz6495
    @johndwolynetz6495 6 років тому +3

    The Lagrangian function is now my god.

  • @TLumVids
    @TLumVids 6 років тому +9

    There is a big mistake in this video. Optimizing with constraints is not the same as Optimizing the Lagrangian without constraints unless the function we are optimizing is convex and the constraint is affine!

  • @yanceq2690
    @yanceq2690 3 роки тому

    Can somebody please tell me, what is this all for? I mean, if we can use the Pythagorean Theorem to find lengths in triangles, what can we use this for?

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

      Solving motion problems in mechanics. Sometimes difficult problems in Newtonian mechanics are much easier using Lagrangian mechanics.

  • @iamjisiah3065
    @iamjisiah3065 7 років тому

    What drawing thing is that

  • @NatCo-Supremacist
    @NatCo-Supremacist 7 років тому

    I wonder if this is related to Lagrangian points in Astrophysics in any way.

  • @Urias_Velasquez
    @Urias_Velasquez 6 років тому +5

    This vídeo has an huge error! The graphic o Gradient is not what they paint. The Gradient is the parallel plane to the vector they said.

  • @bxmoreno1988
    @bxmoreno1988 7 років тому

    Do a video on Bitcoin !!

  • @raulreyes7125
    @raulreyes7125 7 років тому

    DANG THE DRAWING

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

    I notice that voice from anywhere

  • @hichamboukharsa1639
    @hichamboukharsa1639 4 роки тому

    Why gradient of R not equal to gradient of B ? Is should be equal because we calculate the gradient in the same point

  • @BKAM78
    @BKAM78 3 роки тому

    where is the next video??!!

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

    "lagrangian is nothing more than repackaging what we already knew". this seems false, and towards the end you finally mentioned why. the transform to lagrangian reduces the constrained optimization problem to an UNconstrained optimization problem by embedding the problem into "lambda space". and that's SUPER significant.

  • @DarwinsChihuahua
    @DarwinsChihuahua 7 років тому

    Sounds like the name of a Highlander spin-off.

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

    What courses in mathematics do I have to have in my body before going inside the famous Lagrangian?
    Somebody can explain?

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

      It looks like you just have to know how to take partial derivatives. Those are covered, I believe, in Calculus III (maybe Calculus II).

  • @minsoe8014
    @minsoe8014 7 років тому +1

    Could someone please tell me that the reasons to assume the gradient equal to zero?

    • @McRaylie
      @McRaylie 7 років тому +1

      You are not assuming the gradient is zero, you are looking for values, so it equals zero.

    • @iwtwb8
      @iwtwb8 7 років тому +1

      There's surely deeper meaning, but he shows from about 6:00 onward that the way L is constructed makes it so that the gradient of R and B are proportional and that the value of B equals the constraint.

  • @Postermaestro
    @Postermaestro 6 років тому

    Commenting to spread on the tubes!

  • @nu11y61
    @nu11y61 7 років тому +4

    3Blue1Brown!

  • @krasnoyarsk512
    @krasnoyarsk512 5 років тому +3

    I didn't get it :( too complicated or just too much writing I don't know..

    • @mooloongee9595
      @mooloongee9595 4 роки тому +1

      Thats the problem with American videos.

  • @birdstheword5
    @birdstheword5 6 років тому

    You are my god

  • @pi17
    @pi17 4 роки тому

    Grant Sanderson in the house ladies and gentlemen!

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

    Can someone pls explain the Standard Model Lagrangian as a 15 year old wld understand it?😅

  • @fahimhossain165
    @fahimhossain165 4 роки тому

    Yasser Abu Mostafa himself sent me here!

  • @kamitube1059
    @kamitube1059 4 роки тому

    why is the gradient equal to 0

  • @peterd5843
    @peterd5843 4 роки тому +3

    3B1B!!!!

  • @Jimmy-vy7lk
    @Jimmy-vy7lk 5 років тому +4

    I tried to scroll up the video.

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

    Why the term "gradient" is used instead of velocity or slope in this video, any hidden meaning?

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

      And why is the arrow he drew perpendicular to the slope?

    • @ES-qe1nh
      @ES-qe1nh Рік тому

      The gradient vector is defined as an n-tuple of partial derivatives of some multivariate function

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

    He kills me with... it's just artificial fanciness... "it looks like you'redoing advancedmath but it is just artificial xD"

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

    "And all these letters make it look like were using some advanced math"
    Me, a normal guy who looked up a math video to see how stupid it will make me feel: 🤓🤡😶

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

    3b1b does Khan Avademy videos??????

  • @craigmalcom6294
    @craigmalcom6294 3 роки тому

    why are the gradients not equal to each other but proportional?

    • @joluju2375
      @joluju2375 3 роки тому

      Why would they be equal ? R & B are 2 different functions, and we are interrested in contour lines to be tangent. So far, no need for gradients.
      The trick is that for lines to be tangent, their perpendiculars (gradients) have to be aligned.
      V1 = λ V2 is merely the way to say the vectors are on the same line. Aligned, or proportional, or colinear are synonyms here.

    • @ES-qe1nh
      @ES-qe1nh Рік тому

      They are linear combinations of eachother, kind of by definition if you look at the constraint function

  • @morningmoon6100
    @morningmoon6100 4 роки тому

    3Blue1Brown is here !!!!!

  • @faraza5161
    @faraza5161 7 років тому +2

    Hi.. I am just curious.. Which software has been used in the making of this video?

    • @nabzo46
      @nabzo46 7 років тому +4

      Microsoft paint

    • @McRaylie
      @McRaylie 7 років тому

      I think he said it was Python once, but not sure

    • @Chalisque
      @Chalisque 7 років тому

      The pen sketching stuff, I use mypaint, though I don't know what he uses. Set the brush to work like a small pen, and nicely you can paint where you like and mypaint automagically extends the canvas for you. Also, though 3b1b doesn't use this for these videos, geogebra is worth playing with.

  • @VincentKun
    @VincentKun 4 роки тому

    When the math gets curly also get funky

  • @pedrosanchez1747
    @pedrosanchez1747 3 роки тому

    Good but very messy with the space needed for the explanation.

  • @bakibalcioglu5871
    @bakibalcioglu5871 5 років тому +4

    Wait... I know you