A multivariable function \(f\colon \mathbf{R}^2 \to \mathbf{R}\) has a local extrema (a minimum or a maximum) at \((a,b)\) if \(f(a,b) \lt f(x,y)\) (minimum) or \(f(a,b) \gt f(x,y)\) (maximum) for all points \((x,y)\) in some neighborhood around \((a,b).\) The number \(f(a,b)\) is the local extreme value. If \(f\) has a local extrema at \((a,b)\) and \(f_x(a,b)\) and \(f_y(a,b)\) exist, then \(f_x(a,b) = 0\) and \(f_y(a,b) = 0.\) I.e. \(\nabla f(a,b) = \bm{0}.\) I.e. the tangent plane to the graph \({z = f(x,y)}\) must be horizontal at an minimum or maximum. While an extreme value must occur where \(\nabla f(a,b) = \bm{0},\) it’s not necessary that every point \((a,b)\) for which \(\nabla f(a,b) = \bm{0}\) correspond to an extreme value; such a point may also correspond to a saddle point at which the function is “minimal in one direction but maximal in another”. We refer to all points \((a,b)\) either on the boundary of \(\nabla f\) or at which \(\nabla f(a,b) = \bm{0}\) as the critical points of \(f.\) If \(f\) has extreme values, they must occur at these points.
The Hessian matrix of \(f\) is the matrix of partial derivatives \( \operatorname{\mathbf{H}}_f = \bigl(\begin{smallmatrix} f_{xx} & f_{xy} \\ f_{yx} & f_{yy} \end{smallmatrix}\bigr).\) The determinant of the Hessian matrix at a point \((a,b),\) called the discriminant of \(f\) at \((a,b)\) and denoted simply \(\operatorname{H}_f(a,b),\) can be written explicitly as \( f_{xx}(a,b)f_{yy}(a,b) - \bigl(f_{xy}(a,b)\bigr)^2\,. \)
If \((a,b)\) is a critical point of \(f\) (so \(\nabla f(a,b) = \bm{0}\)) and the second partial derivatives of \(f\) are continues in a neighborhood of \((a,b),\) then
- if \(\operatorname{H}_f(a,b) \gt 0\) and \(f_{xx}(a,b) \gt 0,\) then \(f(a,b)\) is a local minimum;
- if \(\operatorname{H}_f(a,b) \gt 0\) and \(f_{xx}(a,b) \lt 0,\) then \(f(a,b)\) is a local maximum;
- if \(\operatorname{H}_f(a,b) \lt 0\) then \((a,b)\) corresponds to a saddle point.
If \(\operatorname{H}_f(a,b) = 0\) then we say \((a,b)\) is a degenerate critical point. A value \(f(a,b)\) is a global extremum (or absolute extremum) if \(f(a,b) \leq f(x,y)\) (minimum) or \(f(a,b) \geq f(x,y)\) (maximum) for all points \((x,y)\) in the domain of \(f.\)