Tutorials › Calculus III › Classifying Three-Variable Hessians by Eigenvalues

Critical Points and Local Extrema · Tutorial 417 of 999

Classifying Three-Variable Hessians by Eigenvalues

Use eigenvalues and orthogonal diagonalization to classify a three-variable Hessian and interpret its curvature at a critical point.

Intermediate 9 min read

What You'll Learn

  • Identify why a Hessian matrix is symmetric and has real eigenvalues
  • Use an orthogonal change of coordinates to read the signs of a Hessian’s quadratic form
  • Classify a Hessian as positive definite, negative definite, or indefinite from its eigenvalues
  • Work through three-variable matrix examples with exact eigenvalue calculations
  • Connect definite Hessians at critical points to local minima and maxima
  • Recognize why the diagonal entries alone do not determine definiteness

Why Classify a Hessian by Its Eigenvalues?

A Hessian records the second-order behavior of a function near a point. In three variables, it is a \(3\times 3\) matrix, and the associated quadratic form describes how the function curves in different directions. Eigenvalues offer a direct way to classify that quadratic form: their signs reveal whether it is always positive, always negative, or takes both positive and negative values.

This classification is useful at a critical point, where the gradient is zero. The three-variable second derivative test uses the Hessian there to identify a strict local minimum or maximum when the Hessian is definite. An indefinite Hessian records curvature of opposite signs; at a critical point, the second derivative test identifies a saddle point in that case.

Definition: A real symmetric matrix \(\mathbf{H}\) is positive definite if \(\mathbf{v}^{\top}\mathbf{H}\mathbf{v}>0\) for every nonzero vector \(\mathbf{v}\). It is negative definite if \(\mathbf{v}^{\top}\mathbf{H}\mathbf{v}<0\) for every nonzero \(\mathbf{v}\). It is indefinite if its quadratic form takes both positive and negative values.

Why the Eigenvalues Are Real

If \(f:\mathbb{R}^3\to\mathbb{R}\) has continuous second partial derivatives near a point \(\mathbf{a}\), its Hessian at that point is the matrix of second partial derivatives. Equality of the mixed partial derivatives makes this matrix symmetric:

$$ \mathbf{H}_f(\mathbf{a})= \begin{pmatrix} f_{xx}(\mathbf{a}) & f_{xy}(\mathbf{a}) & f_{xz}(\mathbf{a})\\ f_{xy}(\mathbf{a}) & f_{yy}(\mathbf{a}) & f_{yz}(\mathbf{a})\\ f_{xz}(\mathbf{a}) & f_{yz}(\mathbf{a}) & f_{zz}(\mathbf{a}) \end{pmatrix}. $$

A standard result for real symmetric matrices, the spectral theorem, says that such a matrix has real eigenvalues and an orthonormal basis of eigenvectors. Equivalently, there is an orthogonal matrix \(\mathbf{Q}\) such that \(\mathbf{Q}^{\top}\mathbf{Q}=\mathbf{I}\) and

$$ \mathbf{H}=\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}, \qquad \boldsymbol{\Lambda}= \begin{pmatrix} \lambda_1&0&0\\ 0&\lambda_2&0\\ 0&0&\lambda_3 \end{pmatrix}. $$

The numbers \(\lambda_1,\lambda_2,\lambda_3\), counted with multiplicity, are the eigenvalues of \(\mathbf{H}\). For a \(3\times3\) matrix, they can be found by solving the characteristic equation \(\det(\mathbf{H}-\lambda\mathbf{I})=0\).

The Sign Test from Orthogonal Diagonalization

To see why the eigenvalues classify the quadratic form, set \(\mathbf{u}=\mathbf{Q}^{\top}\mathbf{v}\). Because \(\mathbf{Q}\) is orthogonal, \(\mathbf{u}\neq\mathbf{0}\) whenever \(\mathbf{v}\neq\mathbf{0}\). Substituting the diagonalization gives

$$ \mathbf{v}^{\top}\mathbf{H}\mathbf{v} =\mathbf{v}^{\top}\mathbf{Q}\boldsymbol{\Lambda}\mathbf{Q}^{\top}\mathbf{v} =\mathbf{u}^{\top}\boldsymbol{\Lambda}\mathbf{u} =\lambda_1u_1^2+\lambda_2u_2^2+\lambda_3u_3^2. $$

Each squared coordinate is nonnegative. If all three eigenvalues are positive, every nonzero \(\mathbf{u}\) makes this sum positive. If they are all negative, the sum is negative for every nonzero \(\mathbf{u}\). If at least one eigenvalue is positive and another is negative, choosing \(\mathbf{u}\) along the corresponding coordinate directions makes the sum positive in one direction and negative in another.

Theorem: For a real symmetric \(3\times3\) matrix, all three eigenvalues positive means the matrix is positive definite; all three negative means it is negative definite; and eigenvalues of both signs mean it is indefinite. An eigenvalue equal to zero rules out both forms of definiteness; the strict sign test alone then does not settle the local behavior of a function.

This argument also works in reverse. If all eigenvalues are positive, the quadratic form is positive for every nonzero vector; if it were positive definite, an eigenvector \(\mathbf{v}\) with eigenvalue \(\lambda\) would satisfy \(\mathbf{v}^{\top}\mathbf{H}\mathbf{v}=\lambda\mathbf{v}^{\top}\mathbf{v}>0\), forcing \(\lambda>0\). The same reasoning with inequalities reversed applies to negative definiteness. Thus the eigenvalue conditions are exact, not merely sufficient.

Worked Examples

Worked Example: A Positive-Definite Hessian

Consider the function \(f(x,y,z)=x^2+xy+y^2+2z^2\). Its gradient is \(\nabla f=(2x+y,\ x+2y,\ 4z)\), so the origin is a critical point. Its Hessian, which is constant, is

$$ \mathbf{H}= \begin{pmatrix} 2&1&0\\ 1&2&0\\ 0&0&4 \end{pmatrix}. $$

The characteristic determinant is

$$ \det(\mathbf{H}-\lambda\mathbf{I}) = \begin{vmatrix} 2-\lambda&1&0\\ 1&2-\lambda&0\\ 0&0&4-\lambda \end{vmatrix} =(4-\lambda)\big((2-\lambda)^2-1\big). $$

Factor the remaining term:

$$ (2-\lambda)^2-1 =(2-\lambda-1)(2-\lambda+1) =(1-\lambda)(3-\lambda). $$

Thus the eigenvalues are \(1,3,4\), all positive. The Hessian is positive definite, so the second derivative test gives a strict local minimum at the origin. In this example, \(f(x,y,z)\) is a sum of positive terms after completing the square: \(f=(x+y/2)^2+3y^2/4+2z^2\). It is positive for every nonzero triple and equals zero at the origin, confirming the classification.

Worked Example: A Negative-Definite Hessian

Consider \(g(x,y,z)=-x^2+xy-y^2-\frac{5}{2}z^2\). Its gradient is \(\nabla g=(-2x+y,\ x-2y,\ -5z)\), which vanishes at the origin. Its Hessian is

$$ \mathbf{H}_g= \begin{pmatrix} -2&1&0\\ 1&-2&0\\ 0&0&-5 \end{pmatrix}. $$

The characteristic determinant is

$$ \det(\mathbf{H}_g-\lambda\mathbf{I}) =(-5-\lambda)\big((-2-\lambda)^2-1\big). $$

Factoring the two-dimensional block gives

$$ (-2-\lambda)^2-1 =(-3-\lambda)(-1-\lambda). $$

The eigenvalues are therefore \(-5,-3,-1\), all negative. The Hessian is negative definite, and the second derivative test gives a strict local maximum at the origin. Directly, the function can be written as

$$ g(x,y,z) =-\left(x-\frac{y}{2}\right)^2-\frac{3}{4}y^2-\frac{5}{2}z^2. $$

Each term on the right is nonpositive, and at least one is strictly negative for every nonzero triple. Hence \(g(x,y,z)<0=g(0,0,0)\) away from the origin, which checks the conclusion.

Worked Example: An Indefinite Hessian

Let \(h(x,y,z)=xy+z^2\). Its gradient is \(\nabla h=(y,x,2z)\), so the origin is critical. The Hessian is

$$ \mathbf{H}_h= \begin{pmatrix} 0&1&0\\ 1&0&0\\ 0&0&2 \end{pmatrix}. $$

Its characteristic determinant is

$$ \det(\mathbf{H}_h-\lambda\mathbf{I}) =(2-\lambda) \begin{vmatrix} -\lambda&1\\ 1&-\lambda \end{vmatrix} =(2-\lambda)(\lambda^2-1) =(2-\lambda)(\lambda-1)(\lambda+1). $$

The eigenvalues are \(-1,1,2\). Since there is at least one positive and one negative eigenvalue, the Hessian is indefinite. For a direct check, take \((x,y,z)=(t,t,0)\); then \(h=t^2>0\) for \(t\neq0\). Taking \((x,y,z)=(t,-t,0)\) gives \(h=-t^2<0\). Thus the function has values above and below its value at the origin arbitrarily close to that point, confirming the saddle-point conclusion.

How Eigenvalues Connect to Local Extrema

The eigenvalue sign test classifies the Hessian’s quadratic form. To connect that result to a function, suppose \(f\) has continuous second partial derivatives near a critical point \(\mathbf{a}\). For a small displacement \(\mathbf{v}\), the second-order Taylor expansion is

$$ f(\mathbf{a}+\mathbf{v})-f(\mathbf{a}) =\frac12\mathbf{v}^{\top}\mathbf{H}_f(\mathbf{a})\mathbf{v} +o(\|\mathbf{v}\|^2), $$

because \(\nabla f(\mathbf{a})=\mathbf{0}\). The final term means that its ratio to \(\|\mathbf{v}\|^2\) tends to zero as \(\mathbf{v}\) tends to \(\mathbf{0}\).

If the smallest eigenvalue is \(\lambda_{\min}>0\), write \(\mathbf{u}=\mathbf{Q}^{\top}\mathbf{v}\). Then

$$ \mathbf{v}^{\top}\mathbf{H}_f(\mathbf{a})\mathbf{v} =\sum_{i=1}^{3}\lambda_i u_i^2 \geq \lambda_{\min}\sum_{i=1}^{3}u_i^2 =\lambda_{\min}\|\mathbf{v}\|^2. $$

The Taylor remainder has absolute value less than \(\frac14\lambda_{\min}\|\mathbf{v}\|^2\) for all sufficiently small nonzero \(\mathbf{v}\). Therefore the change in \(f\) is at least \(\frac14\lambda_{\min}\|\mathbf{v}\|^2>0\), proving a strict local minimum. If every eigenvalue is negative, apply the same argument to \(-f\); the result is a strict local maximum. This explains why definiteness of the Hessian determines the local-extremum conclusion under the stated differentiability and critical-point conditions.

A Common Mistake: Reading Eigenvalues from the Diagonal

The diagonal entries of a symmetric matrix are not generally its eigenvalues. For example, consider

$$ \mathbf{A}= \begin{pmatrix} 1&2&0\\ 2&1&0\\ 0&0&3 \end{pmatrix}. $$

A mistaken calculation might treat the diagonal entries \(1,1,3\) as the eigenvalues and conclude that \(\mathbf{A}\) is positive definite. That conclusion is wrong because the off-diagonal entries affect the eigenvalues. The correct characteristic determinant is

$$ \det(\mathbf{A}-\lambda\mathbf{I}) =(3-\lambda)\big((1-\lambda)^2-4\big) =(3-\lambda)(-1-\lambda)(3-\lambda). $$

The eigenvalues are \(-1,3,3\), so \(\mathbf{A}\) is indefinite. Indeed, \((1,-1,0)\) is an eigenvector with eigenvalue \(-1\), while \((1,1,0)\) has eigenvalue \(3\). The correction is to calculate the characteristic equation (or otherwise determine the eigenvalues), not to infer them from the diagonal entries.

Using the Classification Carefully

For a symmetric three-variable Hessian, the practical procedure is to find its three eigenvalues, record their signs, and apply the sign test. Keep the hypotheses in view: the Hessian must be symmetric, and conclusions about local extrema apply when it is evaluated at a critical point of a sufficiently smooth function. If an eigenvalue is zero, the strict positive/negative-definite tests do not apply; the eigenvalue signs alone do not settle the function’s local behavior.

1
Find the Hessian at the point.
For a function with continuous second partial derivatives, form the symmetric matrix of second partial derivatives.
2
Compute its eigenvalues.
Solve \(\det(\mathbf{H}-\lambda\mathbf{I})=0\), keeping all three roots and their multiplicities.
3
Read the signs.
Three positive eigenvalues mean positive definite; three negative eigenvalues mean negative definite; both positive and negative signs mean indefinite.
4
Apply the second derivative test when its conditions hold.
At a critical point, positive definite gives a strict local minimum and negative definite gives a strict local maximum. An indefinite Hessian gives the saddle-point case.

Check Your Understanding

Use the eigenvalue sign test in each question, and pay attention to whether a conclusion concerns a matrix or a function at a critical point.

  1. A real symmetric Hessian has eigenvalues \(2,5,7\). How is its quadratic form classified?
  2. A symmetric Hessian has eigenvalues \(-4,-2,-1\) at a critical point of a twice continuously differentiable function. What does the second derivative test conclude?
  3. A symmetric matrix has eigenvalues \(-3,0,6\). Is it positive definite, negative definite, or indefinite?
  4. Why does an orthogonal change of coordinates preserve the signs of the quadratic form?
  5. Why can the diagonal entries of a symmetric matrix not generally be used as its eigenvalues?