# Second derivative test and hessian matrix

1. Feb 20, 2014

### clairaut

How does one derive the second derivative test for three variables?

It's clear that

D(a,b) = fxx * fyy - (fxy)^2

AND

fxx(a,b)

Tells us almost all we need to know about local maxima and local minima for a function of 2 variables x and y, but how do I make sense of the second directional derivative of a function of 3 variables x,y,z to form the simple conclusions seen above????

I can easily take the second directional derivative of f(x,y) to derive the above.

2. Feb 20, 2014

### HallsofIvy

The basic idea is this: with a real valued function of two variables, f(x,y), the derivative at a point is, in a strict sense, the linear function that maps the pair (x,y) to a real number that "best approximates" f around that point. That can be represented as a dot product, $(f_x, f_y)\cdot (x, y)$, and so we can represent the derivative as the gradient vector $(f_x, f_y)$.

So the first derivative function maps (x, y) to the vector $(f_x , f_y) and its derivative, the second derivative of f, can best be represented as a 2 by 2 matrix $$\begin{bmatrix}\frac{\partial^2 f}{\partial x^2} & \frac{\partial^2 f}{\partial x\partial y} \\ \frac{\partial^2 f}{\partial x\partial y} & \frac{\partial^2 f}{\partial y^2}\end{bmatrix}$$ Now, two points from Linear Algebra: 1) Since that is a symmetric matrix, it has two independent eigenvectors and so can be diagonalized. That is, there exist some coordinate system, say x' and y', such that the second derivative matrix can be written $$\begin{bmatrix}\frac{\partial^2f}{\partial x'^2} & 0 \\ 0 & \frac{\partial^2 f}{\partial y'^2}\end{bmatrix}$$ 2) The determinant is invariant. If f(x,y) at a point, [itex](x_0, y_0)$ can be approximated by $(\partial^2f/\partial x'^2)(x'- x_0)^2+ (\partial^2f/\partial y'^2)(y'- y_0)^2+ f(x_0, y_0)$ in that x', y
coordinate system. If the point is a minimum, both those partial derivatives are positive, if it is a maximum, both negative, if a saddle point, one positive and one negative. That is, if either a maximum or minimum, the determinant, $\left(\partial^2 f/\partial x'^2\right)\left(\partial^2 f/\partial y'^2\right)$ is positive, if a saddle point, negative. And because the determinant is "invariant", that is the $f_{xx}f_{yy}- (f_{xy})^2$ you refer to.

Now, here is the problem- and the reason why textbooks do not say what do to in three dimensions. If you go to three variables, x, y, and z, you can still find coordinates, x', y', z', such that the second derivative matrix is diagonal:
$$\begin{bmatrix} \frac{\partial^2 f}{\partial x'^2} & 0 & 0 \\ 0 & \frac{\partial^2 f}{\partial y'^2} & 0 \\ 0 & 0 & \frac{\partial^2 f}{\partial z'^2}\end{bmatrix}$$.

But knowing the determinant of that does NOT tell you anything about the individual signs. If the determinant is positive, it might happen that all three of the signs are positive (a minimum) or that two are negative and the third positive (a saddle point). If the determinant is negative, it might be the case that all three are negative (a maximum) or that two are positive and the third negative (a saddle point). The only thing you really can do is find the individual eigenvalues of the second derivative matrix.

3. Jun 18, 2014

### clairaut

How would you find the critical points of a function with three variables? Let's assume that there are no constraints.

4. Jun 18, 2014

### micromass

5. Jun 18, 2014

### clairaut

That link brings up 2 variable fxns.

6. Jun 18, 2014

### micromass

No, it doesn't.

7. Jun 18, 2014

### clairaut

Never mind. I already know about the determinant from hessian matrix. Some so called helpers are very useless.

Does it hurt you to have a discussion?

8. Jun 18, 2014

### micromass

The information you asked in your previous posts in right there in the link I posted. It has the second derivative test for functions of multiple variables. So what exactly is it that you want to discuss?

9. Jun 18, 2014

### clairaut

Oh I dunno.... The wonderful symmetry that Hess found to make his matrix....? The universal application of isomorphism found in his matrix... Stuff like that

10. Jun 18, 2014

### micromass

You asked about a general test for functions of three variables, I posted it. How am I supposed to know you wanted to talk about the symmetry of the matrix and other stuff? If you have a specific question then please post it. I'm not psychic, so I really don't know what kind of answers you are looking for.