Consider this constrained optimization problem: $$f(x, y) = xy, x + y = 2$$ Let $g(x, y) = x + y - 2$. We have $\frac{\partial f}{\partial x} = y$, $\frac{\partial f}{\partial y} = x$, $\frac{\partial g}{\partial x} = 1$ and $\frac{\partial g}{\partial y} = 1$. Thus, we get $x = y = \lambda$. Putting this into $x + y = 2$, we get $x = 1$ and $y = 1$. We want to know whether (1, 1) is a maximum or a minimum.
The Lagrangian function for this is: $$L(x, y, \lambda) = xy - \lambda(x + y - 2)$$ The first derivatives are $\frac{\partial L}{\partial x} = y - \lambda$ and $\frac{\partial L}{\partial y} = x - \lambda$. The second derivatives are $\frac{\partial^2L}{\partial x^2} = 0$, $\frac{\partial^2L}{\partial x^2} = 0$ and $\frac{\partial^2L}{\partial x\partial y} = 1$. Thus, $$D(x, y, \lambda) = (\frac{\partial^2L}{\partial x^2})(\frac{\partial^2L}{\partial x^2}) - (\frac{\partial^2L}{\partial x\partial y})^2 = -1 <0$$ At first, it seems like a saddle point, but we find that $f(1, 1) = 1$, $f(0.9, 1.1) = 0.99$ and $f(1.1, 0.9) = 0.99$. Now, $(1, 1)$ is actually a local maximum under the constraint $g(x, y) = 0$. What is the explanation for this finding?