The only guy on UA-cam who gives an explanation for the expanded Lagrange Multiplier, even my professor just threw the formula out and told us to use it
11:50 How satisfying when you catch the Professor making a clerical sign mistake. 11:58 How disappointing when such clerical sign mistake gets squared off leaving the correct result 😁 Great video as usual!
15:35 perhaps the animation here should also show how the gradient f lies in the plane spanned by the gradients of the two constraints, and give intuition behind why that should be the case at the optimum...
Zed's dead, baby, Zed's dead. ;) Nicely done. I really like the visualizations, too. I'll have to check out the software you mentioned in one of these vids.
Im completely lost from the statement "the normal to g2 surface is gradient of g1". At 2:35 that vector really looks normal to g1 surface rather than g2, which is inconsistent with the audio saying that's the normal to g2? Is there a video in the playlist explaining this? My understanding of gradient vectors stopped at the "Geometric Meaning of the Gradient Vector", where it lives in the x-y plane and points to direction of steepest ascent on the surface. It seems that the gradients in this video do not stay flat on x-y plane. How can they be visualized and is there a video in playlist on gradients that don't live in just x-y plane and their geometric meaning? How would these g1 g2 and f gradients look on the geogebra example in last part of video? I wish the later example referred back to the theory in the first part of video.
Hi Trefor, you made it look easy. Thank you👍 I didn't understand why grad f is a linear combination of gradients of the two constraints. Shouldn't grad f be perpendicular to the line of intersection of constraints? Can't one find the gradient of the intersection line and then proceed the same way as Lagrange multiplier case for a single constraint?
really appreciate your lesson. i just finished the high school math lessons and didnt major in math when in college. i tried lagrange multipliers on the following question, but was still stocked. too hard to solve the equation. abc=23, ab+bc+ca=27, what is the max and min of a^2+b^2+c^2 really appreciate if you can help......thank you.
The Graphical Approach in 3-D. You could possibly draw the surfaces by hand and compare the drawing to Geogebra. I tried this course with my 2-D calculator, and of course I could not visualize 3-D well.
Great video. But I'm wondering if there is a better explanation than just by extension of the 1 constraint case? If del f is orthogonal to both del g1 and del g2, then should del f be the cross product of the two?
Nice video, but I didn't get how do you get to the linear combination of the gradients of the constraints? I get the 1 constraint case, but cannot understand the extension to this case
me neither. I understood gradient f and gradient g are parallel. However, if gradient g1 and gradient g2 form a plane, and gradient f is normal to the plane, it means gradient f is at the same time perpendicular to both gradients of g1 and g2.
f' lands on the plane that 2 g' vectors land, and is parallel to/same as a certain combination of g1' and g2', so it's really the same logic. Also it doesn't have to be perpendicular to either of the curves
Consider two constraints planes, they intersect at a line right? I think it is better to understand it when the objective function is higher dimensional than each constrain. So let the objective function a 4d. I interpret the fourth dimension as color or shades of grey. Black is lowest and white is highest, anyway we now only care about extremum. So the line formed by the g1 and g2 intersection is now in the 4d as a colored or shaded line! We care about how function behave on that line. Consider we are looking at the line from its terminal so you see a dot. The gradients of g1 and g2 will be normall to the line so they just go out of the dot i mentioned, now for a point to be extremum, the color along the line or the shade should be constant on infinitesimal distance or in otherwords of zero directional derivative along our colored line. Zero directional derivative means the gradient is normal to that direction. So the gradient of f should be normal to the line!! So it is in the same plane of grad g1 and grad g2! So they can be written as linear addition or combination of vectors. At points that are not critical, the grad of f has a component normal to the grads of g, which means why not continue moving along the constrain as the function is increasing (in color). And so the the addition of vectors of grad g cant give a scalar multiple of f. We still need a vector to reach grad f vector. So it is not extremum.
I think in the video, the constrains intersect the objective function at limited number of points so i think understanding gradients in this case is not intuitive
Wow, this kinda interpretation is pretty handsome. Dear sir I had a question, i have seen in some places circle is indicated as S1 and sphere in 3d as S2. What do they mean anyway? TIA
it is just shorthand for a "1 dimensional sphere" and a "2 dimensional sphere" and you could go further o an n dimensional sphere which are all he points in n+1 dimensions of equal length fro the origin.
There are two cases: 1) x = - z; when you put this in the other equations you find x = 1 ==> z = -1 2) x = z; when you put this in the other equations you find x = - 3 ==> z = - 3
11:13 is it necessary that points we get with the help of Lagrange Multipliers , are either max or min . Why don't we consider the possibility of saddle point ?
The intersection of the restraints is 1 dimensional, so there can't be saddle points. In general, though, Lagrange Multipliers give you candidates for extremes, you have to manually verify whether they actually are maximums or minimums.
what about 3 constraints and 4 variables? are the equations gonna be same with one more constraint and one more variable like delta? and at 9:51 why is the case not possible?
I think of 4th dimension as a shade of blue for example and 5th dimension as shades of red. The constrains interesect at points of same xyz and shade of color. They will give a surface i think. This surface intersect with the 5 d objective function at points of same xyz and shade of red. The extremum is at points of same xyz and same shade of red and have local max or min shade of blue when move on the surface of intersection.
but how to solve it if all the x, y,z equation has 2 variable constraints and some of em even has the xyz variable on it, hence i cant make the same solution like yours sir, since i cant assume anything T.T
Is it possible to avoid the Lagrange multipliers altogether by saying that the determinant of all the gradients is zero? This plus however many constraints you have should be enough to make it work as long as you have exactly one less constraint than the number of variables.
I'm not a mathematician, so please filter my answer. I solve this problem like what you said. 1st, make an equation that the determinant of all the gradient(g1, g2) is zero. 2nd, dot product of grad f and determint of (grad g1, grad g2) is 0. It can be solved with this method.
the complexity from choosing a "harder" function means that the skillset needed to solve it goes deeper into things not directly related to Lagrange multipliers. it's better to introduce new information by focusing specifically on the new information
The only guy on UA-cam who gives an explanation for the expanded Lagrange Multiplier, even my professor just threw the formula out and told us to use it
I've watched many classes on youtube and I can say that Professor Trefor's classes stand out. Simply awesome!
i wish all classes were like this, all we need is just a touch of intuition and visualization to set the concepts clear in our mind!
Wikipedia is great for 1 constraint, but I absolutely needed Dr. Bazett for 2 constraints. Thanks so much.
I love Trefor for Math and his personality.
11:50 How satisfying when you catch the Professor making a clerical sign mistake.
11:58 How disappointing when such clerical sign mistake gets squared off leaving the correct result 😁
Great video as usual!
Your explanation, math, handwriting, 3d graphs.... all are super good
But your mu looks like a hook :-)
That was beautiful.
I suddenly noticed while watching the video that I too was wearing a checked shirt! Morphing into Dr Trefor!
Thanks
Thank you so much!
This course/playlist is extremely great , wish I found it earlier , now my exam is tomorrow itself 😕
After reading your comment, I can infer why you didn't find it earlier.
@@grapplerart6331 and yes, you are inferring correctly
@@ar3568row 🤣🤣🤣 How did it go?
Nice energy and even better teaching! I also found that website and seeing it here makes me happy :D
What an awesome explainations and cool visualization. Thanks you Prof, keep doing.
Excelent, as usual. Why not just find the intersection of the two constraints and use the standard method on that intersection?
Did you find an answer?
Your channel is so underrated.
I appreciate that!
Dr. you are amazing! You just earned a new follower. This video really helped me
Thanks man ...you just made my life easier...gr8 work..
15:35 perhaps the animation here should also show how the gradient f lies in the plane spanned by the gradients of the two constraints, and give intuition behind why that should be the case at the optimum...
Zed's dead, baby, Zed's dead. ;)
Nicely done. I really like the visualizations, too. I'll have to check out the software you mentioned in one of these vids.
exactly what I was looking for
Outstanding tutorial. Thanks a lot!
Really really helpful for me
Thank you man! You are very helpful =D
Just amazing ❤️
Thanks from Korea
Thanks a lot sir 🔥🔥🔥
So clear. Thanks
i became a big fan to ur intention.
Thanks for the excelent content! Found a small typo: at 11:50, it should be f(-3,0,-3), not f(-3,0,3), as z was squared the typo went unnoticed.. :)
Im completely lost from the statement "the normal to g2 surface is gradient of g1".
At 2:35 that vector really looks normal to g1 surface rather than g2, which is inconsistent with the audio saying that's the normal to g2?
Is there a video in the playlist explaining this?
My understanding of gradient vectors stopped at the "Geometric Meaning of the Gradient Vector", where it lives in the x-y plane and points to direction of steepest ascent on the surface.
It seems that the gradients in this video do not stay flat on x-y plane. How can they be visualized and is there a video in playlist on gradients that don't live in just x-y plane and their geometric meaning?
How would these g1 g2 and f gradients look on the geogebra example in last part of video? I wish the later example referred back to the theory in the first part of video.
same here, no clue how those words are true and confused by the pic not following the words nor the math I understand
Thank you sir you saved me.
thanks professor, it is really great explanation !
Hi Trefor, you made it look easy. Thank you👍 I didn't understand why grad f is a linear combination of gradients of the two constraints. Shouldn't grad f be perpendicular to the line of intersection of constraints? Can't one find the gradient of the intersection line and then proceed the same way as Lagrange multiplier case for a single constraint?
This is a fine method, but often finding a nice description for that line of intersection is highly non trivial
really appreciate your lesson. i just finished the high school math lessons and didnt major in math when in college.
i tried lagrange multipliers on the following question, but was still stocked. too hard to solve the equation.
abc=23, ab+bc+ca=27, what is the max and min of a^2+b^2+c^2
really appreciate if you can help......thank you.
The Graphical Approach in 3-D. You could possibly draw the surfaces by hand and compare the drawing to Geogebra. I tried this course with my 2-D calculator, and of course I could not visualize 3-D well.
Genius
Great video. But I'm wondering if there is a better explanation than just by extension of the 1 constraint case? If del f is orthogonal to both del g1 and del g2, then should del f be the cross product of the two?
great video
Thank you sir
This is very cool
Which software you used to generate all the animations? Is it Geogebra?
Nice video, but I didn't get how do you get to the linear combination of the gradients of the constraints? I get the 1 constraint case, but cannot understand the extension to this case
me neither. I understood gradient f and gradient g are parallel. However, if gradient g1 and gradient g2 form a plane, and gradient f is normal to the plane, it means gradient f is at the same time perpendicular to both gradients of g1 and g2.
@@HermanToMath no, the grad is perpendicular to both curves not to their grads
f' lands on the plane that 2 g' vectors land, and is parallel to/same as a certain combination of g1' and g2', so it's really the same logic.
Also it doesn't have to be perpendicular to either of the curves
Consider two constraints planes, they intersect at a line right?
I think it is better to understand it when the objective function is higher dimensional than each constrain.
So let the objective function a 4d. I interpret the fourth dimension as color or shades of grey.
Black is lowest and white is highest, anyway we now only care about extremum.
So the line formed by the g1 and g2 intersection is now in the 4d as a colored or shaded line! We care about how function behave on that line.
Consider we are looking at the line from its terminal so you see a dot.
The gradients of g1 and g2 will be normall to the line so they just go out of the dot i mentioned, now for a point to be extremum, the color along the line or the shade should be constant on infinitesimal distance or in otherwords of zero directional derivative along our colored line. Zero directional derivative means the gradient is normal to that direction. So the gradient of f should be normal to the line!! So it is in the same plane of grad g1 and grad g2! So they can be written as linear addition or combination of vectors. At points that are not critical, the grad of f has a component normal to the grads of g, which means why not continue moving along the constrain as the function is increasing (in color). And so the the addition of vectors of grad g cant give a scalar multiple of f. We still need a vector to reach grad f vector. So it is not extremum.
I think in the video, the constrains intersect the objective function at limited number of points so i think understanding gradients in this case is not intuitive
hi, thank you for this video. I want to know if distance optimization is basically distance minimisation?
thank you so much
Wow, this kinda interpretation is pretty handsome.
Dear sir
I had a question, i have seen in some places circle is indicated as S1 and sphere in 3d as S2. What do they mean anyway?
TIA
it is just shorthand for a "1 dimensional sphere" and a "2 dimensional sphere" and you could go further o an n dimensional sphere which are all he points in n+1 dimensions of equal length fro the origin.
tnx aLot prof.
how did you write the last equation in geogebra? I cannot make "a" a parameter. It deletes my equation.
Great video sir, question. At 11:10 why is it 1,0,-1 but for the second point it’s -3,0,-3 why is that?
There are two cases:
1) x = - z; when you put this in the other equations you find x = 1 ==> z = -1
2) x = z; when you put this in the other equations you find x = - 3 ==> z = - 3
@@FranFerioli Thank you so much
i wish you were my teacher
Hi sir could u make videos on statistics? Like t tests, nullhypotheses
your videos are amazing but maybe you could get a better mic....and your channel would be perfect in all points!!
why can't we take sqrt(x^2+y^2+z^2) it minimum distance rite
11:13 is it necessary that points we get with the help of Lagrange Multipliers , are either max or min . Why don't we consider the possibility of saddle point ?
The intersection of the restraints is 1 dimensional, so there can't be saddle points. In general, though, Lagrange Multipliers give you candidates for extremes, you have to manually verify whether they actually are maximums or minimums.
@@robinbernardinis yeah right, thank you.
what about 3 constraints and 4 variables? are the equations gonna be same with one more constraint and one more variable like delta? and at 9:51 why is the case not possible?
I think of 4th dimension as a shade of blue for example and 5th dimension as shades of red.
The constrains interesect at points of same xyz and shade of color. They will give a surface i think.
This surface intersect with the 5 d objective function at points of same xyz and shade of red. The extremum is at points of same xyz and same shade of red and have local max or min shade of blue when move on the surface of intersection.
but how to solve it if all the x, y,z equation has 2 variable constraints and some of em even has the xyz variable on it, hence i cant make the same solution like yours sir, since i cant assume anything T.T
Nice.
I have that shirt! Nice!
Is it possible to avoid the Lagrange multipliers altogether by saying that the determinant of all the gradients is zero? This plus however many constraints you have should be enough to make it work as long as you have exactly one less constraint than the number of variables.
I'm not a mathematician, so please filter my answer. I solve this problem like what you said. 1st, make an equation that the determinant of all the gradient(g1, g2) is zero.
2nd, dot product of grad f and determint of (grad g1, grad g2) is 0.
It can be solved with this method.
why do so many video's have a poor sound quality
why are you taking such an easy function during tutorial? Can you just take f(x)= x^2y^4z^6 or like so?
the complexity from choosing a "harder" function means that the skillset needed to solve it goes deeper into things not directly related to Lagrange multipliers. it's better to introduce new information by focusing specifically on the new information
@3:03 "single variable function" -> single constraint case
I prefer the previous animations as opposed to the handwriting.