From Second Derivatives to Local Shape
A stationary point can be a local minimum, a local maximum, or a saddle point. The first partial derivatives identify candidate stationary points, but they do not, by themselves, tell us which local shape occurs. The second derivatives describe how the function bends near the point.
For a function of two variables, the Hessian matrix collects those second derivatives. Its determinant, combined with the sign of one diagonal entry, gives a practical classification test whenever the determinant is nonzero. The test is intended for a point that is already known to be stationary.
The matrix uses equal mixed partial derivatives, \(f_{xy}=f_{yx}\), which holds when the second partial derivatives are continuous near the point. The determinant \(D\) is evaluated at the stationary point being tested; its sign away from that point does not classify the stationary point.
The Determinant Test
- If \(D(a,b)>0\) and \(f_{xx}(a,b)>0\), then \(f\) has a strict local minimum at \((a,b)\).
- If \(D(a,b)>0\) and \(f_{xx}(a,b)<0\), then \(f\) has a strict local maximum at \((a,b)\).
- If \(D(a,b)<0\), then \((a,b)\) is a saddle point.
A strict local minimum means that, for all sufficiently close points other than \((a,b)\), the function value is greater than \(f(a,b)\). A strict local maximum is defined with the inequality reversed. A saddle point has nearby points where the function is both greater and less than its value at the stationary point.
When \(D>0\), the sign of \(f_{xx}\) distinguishes the two kinds of extrema. The determinant alone does not: a positive determinant may accompany either a minimum or a maximum. When \(D<0\), the point is a saddle, regardless of the sign of \(f_{xx}\).
| Determinant at the stationary point | Sign of \(f_{xx}\) | Classification |
|---|---|---|
| \(D>0\) | \(f_{xx}>0\) | Strict local minimum |
| \(D>0\) | \(f_{xx}<0\) | Strict local maximum |
| \(D<0\) | Either sign | Saddle point |
| \(D=0\) | Any sign, including zero | Inconclusive by this test |
Worked Example: A Strict Local Minimum
Worked Example: A Strict Local Minimum
Classify the stationary point of \(f(x,y)=x^2+xy+y^2\).
First calculate the first partial derivatives:
At a stationary point, both derivatives are zero. From \(2x+y=0\), we have \(y=-2x\). Substituting into \(x+2y=0\) gives \(x-4x=-3x=0\), so \(x=0\) and \(y=0\). Thus the only stationary point is \((0,0)\).
Now calculate the second partial derivatives and determinant:
Since \(D(0,0)=3>0\) and \(f_{xx}(0,0)=2>0\), the test classifies \((0,0)\) as a strict local minimum. The function value there is \(f(0,0)=0\).
As a check, rewrite the function by completing the square:
Both terms are nonnegative, and they are both zero only when \(x=y=0\). Therefore \(f(x,y)>f(0,0)\) at every other point, confirming the strict local minimum.
Worked Example: A Strict Local Maximum
Worked Example: A Strict Local Maximum
Classify the stationary point of \(g(x,y)=12-(x-1)^2-(x-1)(y+2)-2(y+2)^2\).
Set \(u=x-1\) and \(v=y+2\) to make the derivatives easier to read. Then \(g=12-u^2-uv-2v^2\). Since \(du/dx=1\) and \(dv/dy=1\), the first partial derivatives are
At a stationary point, \(-2u-v=0\), so \(v=-2u\). Substitution into \(-u-4v=0\) gives \(-u+8u=7u=0\). Hence \(u=0\), \(v=0\), or equivalently \((x,y)=(1,-2)\).
The second partial derivatives and determinant are
Here \(D(1,-2)=7>0\), but \(g_{xx}(1,-2)=-2<0\). Therefore \((1,-2)\) is a strict local maximum. Its function value is \(g(1,-2)=12\).
To check, the expression subtracted from 12 can be written as
This is positive unless \(u=v=0\). Thus \(g(x,y)<12=g(1,-2)\) at all other points, confirming the strict local maximum.
Worked Example: A Saddle Point
Worked Example: A Saddle Point
Classify the stationary point of \(h(x,y)=(x-2)^2-4(x-2)(y+1)+(y+1)^2\).
Let \(u=x-2\) and \(v=y+1\), so \(h=u^2-4uv+v^2\). The first partial derivatives are
The stationary equations give \(u=2v\) and \(v=2u\). Substitution yields \(u=4u\), so \(u=0\), and then \(v=0\). The stationary point is \((x,y)=(2,-1)\).
The second partial derivatives are \(h_{xx}=2\), \(h_{xy}=-4\), and \(h_{yy}=2\). Therefore
Since \(D(2,-1)<0\), the point is a saddle. To check the change in direction, use \(u=t,\ v=0\): then \(h=t^2>0\) for \(t\ne0\). Along \(u=t,\ v=t\), the value is \(t^2-4t^2+t^2=-2t^2<0\). These points approach the stationary point as \(t\) approaches zero, and the function takes values both above and below \(h(2,-1)=0\).
Why the Conditions Give These Classifications
The second-order Taylor expansion near a stationary point \((a,b)\) has no linear term because \(f_x(a,b)=f_y(a,b)=0\). With \(h\) and \(k\) denoting small changes in \(x\) and \(y\), respectively, it says
where the second derivatives in \(Q\) are evaluated at \((a,b)\). The remainder divided by \(h^2+k^2\) tends to zero as \((h,k)\) tends to \((0,0)\). Thus the signs of the quadratic expression \(Q\) determine the behavior close to the point when \(Q\) is strictly positive or negative in every nonzero direction.
When \(D>0\), \(f_{xx}\) cannot be zero. Completing the square gives
If \(f_{xx}>0\), both coefficients are positive, so \(Q\) is positive for every \((h,k)\ne(0,0)\). If \(f_{xx}<0\), both coefficients are negative, so \(Q\) is negative for every nonzero \((h,k)\). In either case, the second-order term has a fixed sign in every direction. It dominates the smaller Taylor remainder sufficiently close to the stationary point, giving a strict local minimum or maximum, respectively.
If \(D<0\) and \(f_{xx}\ne0\), the same completed-square expression has coefficients of opposite signs. There are therefore directions in which \(Q\) is positive and directions in which it is negative. If \(f_{xx}=0\), then \(D=-f_{xy}^2<0\), so \(f_{xy}\ne0\); taking \(k=1\) gives \(Q(h,1)=2f_{xy}h+f_{yy}\), which takes both signs for sufficiently large positive and negative \(h\). In either case, the Taylor remainder is too small to remove these opposite signs along the corresponding directions near the point. The function takes values above and below its stationary value, which is the saddle behavior.
A Common Mistake: Stopping at the Determinant
A positive determinant does not by itself mean “minimum.” For example, in the maximum example above, \(D(1,-2)=7>0\), but \(g_{xx}(1,-2)=-2\), so the point is a local maximum. Ignoring the sign of \(f_{xx}\) would give the wrong classification.
Another frequent error is to calculate \(D\) as \(f_{xx}f_{yy}-f_{xy}\), omitting the square on the mixed partial derivative. The correct formula subtracts \((f_{xy})^2\). For the saddle example, the incorrect calculation would give \((2)(2)-(-4)=8>0\); the correct calculation is \((2)(2)-(-4)^2=-12\). That change in sign changes the conclusion, so the mixed partial must be squared.
Apply the test only after checking that the point is stationary and evaluating all second derivatives there. If \(D=0\), do not force a classification from this test: its conditions for a conclusion are not met, and further analysis is needed.
Check Your Understanding
For each question, apply the test at the stated stationary point, or explain what information is insufficient.
- If \(D=6\) and \(f_{xx}=3\) at a stationary point, what classification does the test give?
- If \(D=5\) and \(f_{xx}=-2\) at a stationary point, what classification does the test give?
- If \(D=-4\), does the sign of \(f_{xx}\) affect the classification?
- Why is \(D>0\) alone not enough to distinguish a local minimum from a local maximum?
- What does the test conclude when \(D=0\)?