
algorithm, and just jump directly to the critical point by solving the equation ∇
x
f(x) =
0 for x.
Sometimes we need to find all of the partial derivatives of all of the elements of a
vector-valued function. The matrix containing all such partial derivatives is known as
a Jacobian matrix. Specifically, if we have a function f : R
m
→ R
n
, then the Jacobian
matrix J ∈ R
n×m
of f is defined such that J
i,j
=
∂
∂x
j
f(x)
i
.
We are also sometimes interested in a derivative of a derivative. This is known
as a second derivative. For example,
∂
2
∂x
i
∂x
j
f is the derivative with respect to x
i
of the
derivative of f with respect to x
j
. Note that the order of derivativation can be swapped,
so that
∂
2
∂x
i
∂x
j
f =
∂
2
∂x
j
∂x
i
f. In a single dimension, we can denote
d
2
dx
2
f by f
(x).
The second derivative tells us how the first derivative will change as we vary the
input. This means it can be useful for determining whether a critical point is a local
maximum, a local minimum, or saddle point. Recall that on a critical point, f
(x) = 0.
When f
(x) > 0, this means that f
(x) increases as we move to the right, and f
(x)
decreases as we move to the left. This means f
(x − ) < 0 and f
(x + ) > 0 for small
enough . In other words, as we move right, the slope begins to point uphill to the right,
and as we move left, the slope begins to point uphill to the left. Thus, when f
(x) = 0
and f
(x) > 0, we can conclude that x is a local minimum. Similarly, when f
(x) = 0
and f
(x) < 0, we can conclude that x is a local maximum. This is known as the second
derivative test. Unfortunately, when f
(x) = 0, the test is inconclusive. In this case x
may be a saddle point, or a part of a flat region.
In multiple dimensions, we need to examine all of the second derivatives of the
function. These derivatives can be collected together into a matrix called the Hessian
matrix. The Hessian matrix H(f)(x) is defined such that
H(f )(x)
i,j
=
∂
2
∂x
i
∂x
j
f(x).
Equivalently, the Hessian is the Jacobian of the gradient. Using the Hessian matrix,
we can generalize the second derivative test to multiple dimensions. At a critical point,
where ∇
x
f(x) = 0, we can examine the eigenvalues of the Hessian to determine whether
the critical point is a local maximum, local minimum, or saddle point. When the Hessian
is positive definite
1
, the point is a local minimum. This can be seen by observing that the
directional second derivative in any direction must be positive, and making reference to
the univariate second derivative test. Likewise, when the Hessian is negative definite
2
,
the point is a local maximum. In multiple dimensions, it is actually possible to find
positive evidence of saddle points in some cases. When at least one eigenvalue is positive
and at least one eigenvalue is negative, we know that x is a local maximum on one cross
section of f but a local minimum on another cross section. See Fig. 4.4 for an example.
Finally, the multidimensional second derivative test can be inconclusive, just like the
univariate version. The test is inconclusive whenever all of the non-zero eigenvalues have
1
all its eigenvalues are positive
2
all its eigenvalues are negative
60