M408M Learning Module Pages

Main page

Chapter 10: Parametric Equations and Polar Coordinates

Chapter 12: Vectors and the Geometry of Space


Chapter 13: Vector Functions


Chapter 14: Partial Derivatives


Learning module LM 14.1: Functions of 2 or 3 variables:

Learning module LM 14.3: Partial derivatives:

Learning module LM 14.4: Tangent planes and linear approximations:

Learning module LM 14.5: Differentiability and the chain rule:

Learning module LM 14.6: Gradients and directional derivatives:

Learning module LM 14.7: Local maxima and minima:

      Maxima, minima and critical points
      Classifying critical points
      Example problems
      Linear regression

Learning module LM 14.8: Absolute maxima and Lagrange multipliers:

Chapter 15: Multiple Integrals



Classifying critical points

Classifying Critical Points

In the last slide we saw that
  • Critical points are places where $\nabla f = 0$ or $\nabla f$ does not exist.
  • Critical points are where the tangent plane to $z=f(x,y)$ is horizontal or does not exist.
  • All local extrema are critical points.
  • Not all critical points are local extrema. Often, they are saddle points.


Now it's time to classify critical points, and see which are local maxima, which are local minima, and which are saddle points. There are both graphical and algebraic ways of doing this. We'll illustrate both types of methods with the earlier example of $z=f(x,y)=\sin(x)\sin(y)$, which has

  1. Local maxima at $$\Big( \frac{\pi}{2}, \, \frac{\pi}{2} \Big), \quad \Big( -\frac{\pi}{2}, \, -\frac{\pi}{2} \Big),$$   2. Local minima at $$\Big(- \frac{\pi}{2}, \, \frac{\pi}{2} \Big), \quad \Big( \frac{\pi}{2}, \,-\frac{\pi}{2} \Big),$$   3. A saddle point at $(0,\,0)$.


Of course, if you have the graph of a function, you can see the local maxima and minima. However, you can also identify the local extrema from a contour map, or from the gradient. Check out the various choices in the interactive graphic to the right. The critical points are indicated by the red dots. Let's classify them:

     From a contour map: Since height is indicated by color shading with dark being low and light being high, local maxima occur when a red dot is surrounded by shading getting lighter as one approaches the dot, while local minima occur when a red dot dot is surrounded by successively darker shading. Thus the red dots in Quadrants I and III will be local maxima, while the red dots in Quadrants II and IV will be local minima. A saddle point, however, occurs at a red dot when the color darkens as one move in one direction from the point, but lightens as one moves in a different direction from that same point. This occurs at the red dot at the origin.

     From the gradient: Since gradient vectors always point uphill, the gradient vectors near a local maxima will all point in the direction of the maximum, while those near a local minimum will point away from the minimum. The arrows all point inward and get successively smaller at the red dots in Quadrants I and III, so these points are local maxima, while the arrows all point outward and get successively smaller at the red dots in Quadrants II and IV, so these are local minima. At the origin some arrows point inward and others point outward. That's the signature of a saddle point. The origin is a local minimum with respect to motion along the line $y=x$, and a local maximum with respect to motion along the line $y=-x$.

Does this use of the gradient vectors remind you of how you used the First Derivative Test to classify critical points for functions of one variable? It should!

While the previous methods for classifying the critical points make good visuals, using second order partial derivatives is often more convenient, just as the Second Derivative Test was in one variable.

Suppose $f(x, y)$ is a function with continuous second order partial derivatives and let $$A \ = \ f_{xx}(a, b),\qquad B\ = \ f_{xy}(a, b), \qquad C\ = \ f_{yy}(a, b)$$ be the values of these second order derivatives at a point $(a, b)$. To determine whether $(a, b)$ is a local maximum, local minimum or a saddle point, we need to check the sign of the discriminant $$D\ = \ D(a, b) \ = \ AC - B^2$$ as prescribed in the important

  Second Derivative Test:   A critical point $(a, b)$ of function $f$ is a

     Local maximum if $D > 0$ and $f_{xx}(a, b) < 0$,

     Local minimum if $D > 0$ and $f_{xx}(a, b) > 0$,

     Saddle point if $D < 0$.

If $D = 0$, then the test fails. It tells us nothing!!


To see how this works for $f(x, y) = \sin x \sin y$ on $-\pi \le x,\, y\le \pi$, note that $$f_{xx}(x, y) = -\sin x\sin y, \qquad f_{xy}(x, y) = \cos x \cos y, \qquad f_{yy}(x, y) = -\sin x \sin y\,.$$     At three of the critical points of $f$ the Second Derivative Test tells us:

  1. $\displaystyle{\left(\frac{\pi}{2},\,\frac{\pi}{2}\right)}$: $$A = C = -1, \ B = 0,$$ $$ D = 1 > 0,$$ so we have a local maximum;   2. $\displaystyle{\left(-\frac{\pi}{2},\,\frac{\pi}{2}\right)}$: $$A = C = 1, \ B = 0,$$ $$ D = 1 > 0,$$ so we have a local minimum;   3. $\displaystyle{\left(0,\,0\right)}$: $$A = C = 0, \ B = 1,$$ $$ D = -1 < 0,$$ so we have a saddle point.

  Can you see what would happen at the remaining two critical points?

At first glance, the second derivative test may look like black magic, since it is based on results from linear algebra that you probably haven't seen yet. Here is a brief sketch of the ideas behind the formula. Don't worry if you don't see where all of this comes from. Think of it as a reason to learn linear algebra!

Associated to every $2 \times 2$ matrix $\begin{pmatrix} A & B \cr B & C \end{pmatrix}$ are two numbers called eigenvalues. When we slice the surface $z=f(x,y)$ with a vertical plane, the second derivative at $(a,b)$ is always less than or equal to the bigger eigenvalue (call it $\lambda_1$) and greater or equal to the smaller eigenvalue (call it $\lambda_2$). If both eigenvalues are positive, then the second derivative is positive in all directions, and we are at a local minimum. If both eigenvalues are negative, then the second derivative is negative in all directions, and we are at a local maximum. If one eigenvalue is positive and one is negative, then we go up in some directions and down in others -- that's a saddle point.

Note that the discriminant is the same thing as the determinant of the matrix $\begin{pmatrix} A & B \cr B & C \end{pmatrix}$. Eigenvalues are related to determinants by $$\lambda_1\lambda_2 = D = AC-B^2.$$ If $D<0$, then the eigenvalues have opposite signs, and we have a saddle point. If $D>0$, then the eigenvalues have the same sign, and we have either a local maximum or a local minimum. We tell which it is by moving in one direction and seeing if we go up or down. Usually that means looking at $A=f_{xx}$, but $C=f_{yy}$ would work just as well.