Download slides PDF

Optimality conditions

Learning outcomes

Class schedule

Local and global optima

First-order condition

Second-order conditions

When the second derivative is zero

Two-variable Hessian test

Eigenvalues: meaning and calculation

Computing eigenvalues of a 2 × 2 Hessian

Worked example: two positive eigenvalues

Eigenvalue signs and local curvature

Practice: calculate and classify

Practice solution: a saddle point

A saddle falls in one direction and rises in another

Worked example: quadratic cost

Global extrema on a closed interval

Checkpoint: identify the missing argument

Step 1: derivative, gradient, and the constraint

Step 2: the objective contour touches the constraint

Step 3: parallel gradients give the Lagrange equation

Equality-constrained optimization

The Lagrangian

Lagrange multipliers: geometric meaning

The multiplier measures sensitivity

Worked example: minimum energy

Equality geometry

The gradient is perpendicular to feasible motion

Finding both a maximum and a minimum

Practice: fixed total production

Fixed total production: solution

Lagrange example: sharing a production load

Sharing a production load: solution

Break

A consistent inequality convention

The four KKT conditions

One example for all four KKT conditions

Primal feasibility: is the point allowed?

Stationarity: which gradients balance?

Dual feasibility: why must μ be nonnegative?

Complementary slackness: when does a bound matter?

All four conditions: one complete check

KKT balances the objective and constraint gradients

Active and inactive constraints

Worked example: an active upper bound

Worked example: an inactive upper bound

An upper bound can be active or inactive

A practical active-set procedure

When KKT is necessary or sufficient

A constraint qualification can fail

KKT example: meeting a minimum delivery target

Minimum delivery: KKT solution

Process application: shared capacity

Resource allocation: full KKT system

Resource allocation: solve and verify

Profit contours and the capacity limit

Marginal value of capacity

Capacity changes the optimum and its marginal value

Maximum and minimum need different certificates

Practice: constrained quadratic cost

Practice solution

Common mistakes

Exit ticket

Class feedback

Optional: equality second-order test

References and further practice

Extra Lagrange example: a closed cylindrical tank

Closed cylinder: Lagrange solution

Extra KKT example: two active capacity bounds

Two active bounds: KKT solution