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.
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.
@@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!
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.
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.
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 ...)
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 :)
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!
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.
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.
"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.
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!
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...
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.
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
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.
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)
"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: 🤓🤡😶
Me : let me check out some Lagrangian mechanics online Also me: hmm khan academy videos are good I should probably check it. Hears the voice in the video "WAAAAAAIT A SECOND"
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?
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.
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.
Wait... Could it be... 3Blue1Brown?!
Kappy Engi Kappington that's what I was wondering as well!
it is
it is
3Blue 1Brown Wave
Yes ...he used to work there ....
This man is bringing me single handedly through my economics undergraduate degree!!! Keep it up and thank you!
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.
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.
@@borninthenorthMi it is ok, michalina. you will go to a decent university someday
@@98danielray name one
@@borninthenorthMi CRT in maths? nice meme
Perhaps the best explanation on the Internet. Thanks 3B1B !
can't agree more....
Is this actually 3Blue1Brown??
@@sjoerd7512 yes he worked with khan academy
Arguably the best explanation of Lagrangian on the internet! Thanks @Khan Academy!
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.
This also justifies its usage in economics - marginal propensity to save and to consune are the bedrock for Keynesian (read: modern) economics.
Awesome explanations! I've been struggling to figure this out for 3 years in my Ph.D. and this is the best one!
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
@@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!
And our mad processor is teaching us this in bachelors electronics and communication engineering here in India.
@@harisrashid0773 Same, Economics
Hope you got your Ph. D
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.
I just clicked on this video, because I trust Khan Academy as a knowledge source. But Grant was a welcome surprise.
3:06 "why is lambda so hard to draw?" lol
I was struggeling a bit with understanding the concept of Lagrangian, but this videos of you helped me a lot. Thanks!
Khan academy is the GOAT of mathematical/physics topics!
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.
Very similar to a Perturbation
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 ...)
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 :)
Turning some calculus into geometry is helpful to those who visualize. Thank you!
Simplest way of explaining the most complicated looking concept. Hats off to you Sir 👌👌👌
Apparently this is going to be important in my classical mechanics and QM class. Thanks!
I mean yeah classical mechanics is basically just fancy constrained optimization with some cool mathematical theorems behind it (
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!
Dang it. I was hoping for Lagrangian mechanics.
Well that is what is behind the first Lagrange formalism for mechanics ;)
Same :(
we are in 2. semester and learn Lagrange...
We learn both actually^ :/
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.
Is this 3blue1brown talking?
yes
@@mr.mirror1213 no
Without any doubt. He must be 3blue1brown
That perfect red curve looks satisfying
Welcome Blue and Brown guy! You are such a great teacher !
omg, 3Blue1Brown never fail you. Always can find the best explanation from him! BRAVO!
Imagine this guy being your university professor for every course you take.
3Blue1Brown ❤❤❤ thank you!!
Why does Sal sound like Grant when he explains math?
Very helpful - as always! Didn't ZZ top write a song about La Grange?
Such a nice presentation of the Lagrangian!
Great video, now it's clear and easy to understand! THANK YOU!
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.
"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.
still the best explanation in youtube
Ah the sweet voice of Grant. What a pleasure
i won`t for sure need this in life , but i will for sure need this to pass my maths exam .
Wait... 3Blue1Brown? Awesome!
"You'd never have a budget that looks like a circle"
Huh, didn't think so
Such an excellent tutorial!
Thanks for the great video. Would you please make a video about Lagrange duality.
12:25 he mentioned modeling the revenue or the budget as functions, any idea how to calculate such functions?
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!
thanks
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...
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.
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
@@_nttai thanks
Which playlist does this video belong to?
I want to see more.
th-cam.com/video/vwUV2IDLP8Q/w-d-xo.html
God I wish you were my teacher for advanced diff eq!
Best best best best explaination ever!!!
2:24 how do we know that the gradients are proportional? where does this come from?
Can I suggest adding the link to the full playlist so one can find more videos related to the current video?
You'll be able to find it on the Khan Academy website in the Multivariable Calculus section
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.
Could anybody explain: What the difference between Lagrangian multipliers and sequential quadratic programming (SQP)?
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.
When can see the function is less difficult to understand. Thank you
The Lagrangian function is now my god.
Could you please put the link of the next course blow for convenience.
usually we have many constraints and not just one. suppose there was another constraint, how will the equation change?
What are the prequisite of langrangian?
Please do a video explaining the inter-temporal rate of substitution
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)
Superb!
We can get both the maximum and minimum using this. Right?
Nice explanation
why we define the action integral of lagrangian times dt? has we got a proof for it?
He kills me with... it's just artificial fanciness... "it looks like you'redoing advancedmath but it is just artificial xD"
what is the program that he uses for the graph?
I am pretty sure it is a custom program, probably adapted from his Python library that he uses to animate his videos on 3Blue1Brown
Nice Very nice🎉
Grant Sanderson in the house ladies and gentlemen!
I think you can add a variable and have '
Yasser Abu Mostafa himself sent me here!
Sir which book you have preferred for this
"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: 🤓🤡😶
Me : let me check out some Lagrangian mechanics online
Also me: hmm khan academy videos are good I should probably check it.
Hears the voice in the video
"WAAAAAAIT A SECOND"
Can somebody explain to me how the gradient of R is promotional of B...please
Thank you!
why do we substract the b ?
I tried to scroll up the video.
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?
Solving motion problems in mechanics. Sometimes difficult problems in Newtonian mechanics are much easier using Lagrangian mechanics.
What courses in mathematics do I have to have in my body before going inside the famous Lagrangian?
Somebody can explain?
It looks like you just have to know how to take partial derivatives. Those are covered, I believe, in Calculus III (maybe Calculus II).
Why gradient of R not equal to gradient of B ? Is should be equal because we calculate the gradient in the same point
Why the term "gradient" is used instead of velocity or slope in this video, any hidden meaning?
And why is the arrow he drew perpendicular to the slope?
The gradient vector is defined as an n-tuple of partial derivatives of some multivariate function
Could someone please tell me that the reasons to assume the gradient equal to zero?
You are not assuming the gradient is zero, you are looking for values, so it equals zero.
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.
非常的透彻
I didn't get it :( too complicated or just too much writing I don't know..
Thats the problem with American videos.
3Blue1Brown!
where is the next video??!!
I notice that voice from anywhere
DANG THE DRAWING
wait a minute, this is 3B1B. You can't fool us..
3Blue1Brown is here !!!!!
3b1b does Khan Avademy videos??????
Do a video on Bitcoin !!
Hey, hey , grant?
Commenting to spread on the tubes!
why is the gradient equal to 0
What drawing thing is that
why are the gradients not equal to each other but proportional?
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.
They are linear combinations of eachother, kind of by definition if you look at the constraint function
Good but very messy with the space needed for the explanation.
3B1B!!!!
When the math gets curly also get funky
Sounds like the name of a Highlander spin-off.
Wait... I know you