Lagrange multipliers, examples
Lagrange multiplier technique, quick recap
- Step 1: Introduce a new variable , and define a new function as follows:This function is called the "Lagrangian", and the new variable is referred to as a "Lagrange multiplier"
- Step 2: Set the gradient of equal to the zero vector.In other words, find the critical points of .
- Step 3: Consider each solution, which will look something like . Plug each one into . Or rather, first remove the component, then plug it into , since does not have as an input. Whichever one gives the greatest (or smallest) value is the maximum (or minimum) point your are seeking.
Example 1: Budgetary constraints
- represents hours of labor
- represents tons of steel
Example 2: Maximizing dot product
- One which points in the same direction, this is the vector that .
- One which points in the opposite direction. This one .
Just skip the Lagrangian
- Gradient alignment between the target function and the constraint function,
- The constraint itself,