Before we start, one shared picture of the three shapes we keep classifying — bowl, dome, saddle. Keep it beside you: every L3 and L4 classification below is really deciding which of these three panels your critical point lives in.
Recall the layout H=[fxxfyxfxyfyy], where fxx means "differentiate f by x twice" and fxy means "by x, then by y" (or vice-versa — they match).
(a) fxx===4== (top-left).
(b) fxy===−1== (top-right).
(c) Because of Schwarz's theorem: when the second partials are continuous, mixed partials are equal, so fxy=fyx and H is symmetric. Both numbers measure the same twist of the surface, read from either direction.
Recall Solution
The vector(2x+y,x+2y) is the gradient ∇f — first-order slopes, one per variable, so n numbers.
The matrix[2112] is the Hessian H — second-order curvatures, one per pair of variables, so n2 numbers (n×n).
But symmetry (H=H⊤) means the entry above the diagonal repeats the one below it, so only ==2n(n+1)== of them are independent (n on the diagonal plus 2n(n−1) distinct off-diagonal pairs). That is what you actually need to store or compute — for n=2 it is 3 numbers, not 4.
The gradient points uphill; the Hessian bends the hill.
First the gradient: fx=3x2+2y2, fy=4xy+2y.
Now differentiate each slope again:
fxx=∂x∂(3x2+2y2)=6x
fxy=∂y∂(3x2+2y2)=4y
fyy=∂y∂(4xy+2y)=4x+2
fyx=∂x∂(4xy+2y)=4y ✓ (matches fxy)
H(x,y)=[6x4y4y4x+2]
Notice the Hessian depends on the point — curvature changes as you move.
Recall Solution
Substitute x=1,y=−1:
fxx=6(1)=6
fxy=4(−1)=−4
fyy=4(1)+2=6H(1,−1)=[6−4−46]
Recall Solution
What "curvature along a direction" means. Slice the surface with the vertical plane through x pointing along v; you get a 1D curve g(t)=f(x+tv). Its second derivative g′′(0)is the curvature felt in that direction.
Why g′′(0)=v⊤Hv (mini-proof, so you don't have to trust the parent note blindly). By the chain rule, the first derivative of g(t)=f(x+tv) is the directional derivative
g′(t)=∇f(x+tv)⊤v=∑ifxi(x+tv)vi.
Differentiate again in t. Each fxi is itself a function of the moving point, so the chain rule gives dtdfxi=∑jfxixjvj. Therefore
g′′(t)=∑i(∑jfxixjvj)vi=∑i,jvifxixjvj=v⊤Hv.
The double sum ∑i,jviHijvj is exactly the matrix product v⊤Hv written out. So the quadratic form equals the directional curvature — no hidden factor. (The 21 you sometimes see belongs to the Taylor term21v⊤Hvt2, because integrating g′′ twice produces the 21t2; the curvature itself has no 21.)
Now the computation. Compute Hv first:
Hv=[6−4−46][11]=[6−4−4+6]=[22].
Then v⊤(Hv)=(1)(2)+(1)(2)=4.
The value 4>0: along (1,1) the surface curves upward (like the bottom of a bowl in that direction).
Gradient: ∇f=(2x−4y,−4x+2y), which is 0 only at (0,0) ✓ (test is valid here).
Hessian: fxx=2,fyy=2,fxy=−4, so H=[2−4−42].
D=detH=(2)(2)−(−4)2=4−16=−12<0.
Since D<0, the eigenvalues have opposite signs ⇒ saddle point (the yellow saddle panel of the figure above). (No need to check a=fxx — the diagonal-sign test only matters when D>0.)
Recall Solution
∇f=(−2x+y,−6y+x); solving both =0 gives only (0,0).
H=[−211−6].
D=(−2)(−6)−12=12−1=11>0 ⇒ eigenvalues share a sign.
Which sign? Check the top-left diagonal curvature a=fxx=−2<0 ⇒ both negative ⇒ maximum (the red dome panel).
Recall Solution
Eigenvalues solve det(H−λI)=0. Subtract λ from each diagonal entry:
det[−2−λ11−6−λ]=(−2−λ)(−6−λ)−(1)(1)=0.Expand the product (multiply the two brackets term by term):
(−2−λ)(−6−λ)=(−2)(−6)+(−2)(−λ)+(−λ)(−6)+(−λ)(−λ)=12+2λ+6λ+λ2=λ2+8λ+12.
Now subtract the off-diagonal product 1⋅1=1:
λ2+8λ+12−1=λ2+8λ+11=0.
Apply the quadratic formula (λ=2a−b±b2−4ac with a=1,b=8,c=11):
λ=2−8±64−44=2−8±20=−4±5.
So λ1=−4+5≈−1.76 and λ2=−4−5≈−6.24. Both negative ⇒ maximum, matching L3.2 ✓. Their product =11=D and sum =−8=trH, exactly the shortcut logic.
Recall Solution
∇f=(2x,4y3), zero only at (0,0).
fxx=2,fyy=12y2,fxy=0, so at the origin H=[2000].
D=detH=(2)(0)−02=0 ⇒ the second-derivative test is inconclusive. One eigenvalue is 0 — a flat direction (y) where the quadratic term tells you nothing.
Resolve it with higher-order terms: along y the function is f(0,y)=y4≥0, and along x it is x2≥0; both curve upward, so (0,0) is actually a minimum. The Hessian alone could not see this because the curvature in the y-direction only shows up at fourth order. This is exactly why D=0 is flagged "test fails, look deeper."
∇f=(3x2−3,2y). Set to zero: 2y=0⇒y=0; 3x2−3=0⇒x=±1.
Two critical points: (1,0) and (−1,0).
Hessian H(x,y)=[6x002] (since fxy=0, eigenvalues are the diagonal here).
At (1,0): H=[6002], eigenvalues 6,2 both >0 ⇒ minimum (blue bowl panel).
At (−1,0): H=[−6002], eigenvalues −6,2 opposite signs ⇒ saddle (yellow panel).
Same function, different curvature at different points — this is why H must be evaluated per point.
Recall Solution
H=[2kk2] (constant — independent of the point).
Need positive definite: a=fxx=2>0 (always true) andD=detH=4−k2>0.
4−k2>0⟺k2<4⟺−2<k<2.
So the origin is a minimum exactly for ==−2<k<2==. At k=±2, D=0 (inconclusive — a flat valley direction, exactly the L3.4 situation); beyond, D<0 (saddle).
Recall Solution
At (0,0): f=e0cos0=1.
Gradient: fx=excosy⇒fx(0,0)=1; fy=−exsiny⇒fy(0,0)=0. So ∇f=(1,0).
Hessian entries: fxx=excosy⇒1; fyy=−excosy⇒−1; fxy=−exsiny⇒0.
H(0,0)=[100−1].
With Δx=(0.1,0.2), the Taylor formula
f≈1+∇f⊤Δx(1)(0.1)+(0)(0.2)+2121Δx⊤HΔx[(0.1)2(1)+(0.2)2(−1)]=1+0.1+21(0.01−0.04)=1.1+21(−0.03)=1.1−0.015===1.085==.
(True value e0.1cos0.2≈1.0834 — the estimate is close, as expected for small steps.)
∇f=(2x+y,x+2y)⇒∇f(1,1)=(3,3).
H=[2112] (constant). Its inverse: det=3, so
H−1=31[2−1−12].
Compute H−1∇f=31[2−1−12][33]=31[33]=[11].
Update: x1=(1,1)−(1,1)=(0,0), i.e. the origin — we land exactly at (0,0).
Why one step suffices: Newton's method minimizes the local quadratic model exactly. Here fis exactly quadratic, so the model equals the true function — one step lands on the true minimum (0,0).
Recall Solution
H=[200200], eigenvalues 2 and 200.
κ=2200=100.
A large condition number (κ=100) means a long, thin valley: curvature is 100× steeper across the valley (y) than along it (x). Gradient descent takes big steps across and tiny steps along, so it zig-zags slowly toward the minimum. This is exactly the pathology Newton's method cures by rescaling with H−1.
Recall Solution
fx=2x+y,fy=4y3+x. Second partials: fxx=2,fyy=12y2,fxy=1.
H(x,y)=[21112y2].
Apply the hint. The top-left entry a=fxx=2≥0always, so the only condition that can fail is the determinant.
Determinant: D=detH=(2)(12y2)−(1)(1)=24y2−1.
Convex (positive semidefinite) needs D≥0:24y2−1≥0⟺y2≥241. ✓ This is exactly the claimed region.
Near y=0: plug in y=0 → D=24(0)−1=−1<0 ⇒ eigenvalues have opposite signs ⇒ the Hessian is indefinite ⇒ f is not convex there (locally saddle-shaped).
Conclusion: convexity is a local, point-dependent property here. For y2≥241 (i.e. ∣y∣≥241≈0.204) the Hessian is positive semidefinite and f is convex; in the strip ∣y∣<241 around the x-axis it is not. So f is convex on that region but not convex everywhere — which is what we were asked to show. ■
Recall Quick self-test (cloze)
A positive determinant of a 2×2 Hessian means the eigenvalues ::: share the same sign (could be a max or a min).
To distinguish max from min when D>0 you check ::: the sign of a diagonal entry a=fxx (or the trace).
When D=0 the second-derivative test is ::: inconclusive — you must use higher-order terms.
The condition number λmax/λmin being large predicts ::: gradient descent will zig-zag in a long, thin valley.
Newton's method reaches the minimum of a purely quadratic function in ::: exactly one step.