4.10.18 · D3Advanced Topics (Elite Level)

Worked examples — First-order optimality conditions — gradient = 0

3,292 words15 min readBack to topic

Prerequisites you should have met: Gradient and directional derivatives (what is), Hessian matrix and second-order conditions (the matrix of second derivatives that classifies a point), and Saddle points. Everything else is built here.


The scenario matrix

Cell Case class Signal at the stationary point Example
A Clean minimum (1-D) Ex 1
B Clean maximum (1-D) Ex 1 (same function)
C Degenerate 1-D () — inflection vs flat min , must probe higher Ex 2
D 2-D minimum (positive-definite Hessian) both eigenvalues Ex 3
E 2-D maximum (negative-definite Hessian) both eigenvalues Ex 4
F 2-D saddle (indefinite Hessian) eigenvalues opposite sign Ex 5
G 2-D degenerate (singular Hessian) — a whole valley line an eigenvalue Ex 6
H Multiple stationary points, mixed types classify each separately Ex 7
I Boundary / constrained — gradient need NOT vanish check edge, not just interior Ex 8
J Word problem (real quantity to optimise) model then apply FONC Ex 9

The four 2-D shapes (cells D–G)

The four 2-D outcomes are exactly the four surface shapes below. Read the figure as a grid, and map each panel to its cell:

  • Top-left, blue bowl → cell D (minimum): both eigenvalues , every slice curves up; the black dot sits at the lowest point.
  • Top-right, orange dome → cell E (maximum): both eigenvalues , every slice curves down; the dot is the summit.
  • Bottom-left, red saddle → cell F (saddle): eigenvalues of opposite sign; the surface rises along one ridge and falls along the perpendicular one, meeting at the dot.
  • Bottom-right, green valley → cell G (degenerate): one eigenvalue is , so the trough is flat along a whole line — the dot is only one of infinitely many lowest points.

In every panel the black dot is where ; the shape around it is what the eigenvalue signs are secretly describing. Keep this picture in view as you work Ex 3–6.

Figure — First-order optimality conditions — gradient = 0

Cells A & B — the cleanest 1-D case


Cell C — the degenerate 1-D trap ()


Cell D — the 2-D bowl (positive-definite Hessian)


Cell E — the 2-D dome (negative-definite Hessian)


Cell F — the 2-D saddle (indefinite Hessian)


Cell G — the degenerate 2-D valley (singular Hessian)


Cell H — multiple stationary points of mixed type


Cell I — the boundary case (gradient does NOT vanish at the optimum)


Cell J — a real-world word problem


Flashcards

When , what do you do?
The second-order test is silent; probe the first non-zero higher derivative (odd order ⇒ inflection, even & positive ⇒ min).
What is an eigenvalue of the Hessian, intuitively?
The pure curvature of the surface along one of its two principal directions; its sign says bends-up (+) or bends-down (−).
2-D Hessian test with and ?
Positive definite ⇒ local minimum.
2-D Hessian test with and ?
Negative definite ⇒ local maximum.
2-D Hessian test with ?
Indefinite ⇒ saddle (eigenvalues of opposite sign, since ).
2-D Hessian test with ?
Inconclusive (singular) — a flat direction; classify by other means.
Where can an optimum hide even though there?
On the boundary of a closed domain — FONC only governs interior points.
Open-top box of volume minimum surface dimensions?
cm, surface .

Recall One-line summary of the whole matrix

Find where (maybe zero, one, several, or a whole line of points), then let the Hessian's eigenvalue signs decide min/max/saddle — and if the Hessian is singular or you're on a boundary, argue by hand or use constraints.


Connections

  • Parent: FONC — the condition every example applies.
  • Hessian matrix and second-order conditions — the classifier used in cells C–J.
  • Saddle points — cell F made concrete.
  • Convex functions — when a single stationary point (cell D) is automatically global.
  • Lagrange multipliers — the proper tool for the boundary cell I.
  • Gradient descent — an algorithm that would settle into the minima but get stuck at saddles.

Concept Map

one

several

a line

det gt 0, fxx gt 0

det gt 0, fxx lt 0

det lt 0

det = 0

closed domain

Solve grad f = 0

How many solutions

Single point

Classify each

Degenerate valley

Check Hessian

Minimum

Maximum

Saddle

Inconclusive probe by hand

Also test boundary

Compare interior vs edge