# Critical points of a function

If you have a 2 variable function $f(x,y)$ and it has $(0,y)$ as a critical point where y is a variable then how do we know it is maxima or minima or saddle point? For example $$f(x,y)=x^2ye^{-x^2-y^2}?$$

-
You need to find Hessian of your function, which is nothing but the matrix of second partial derivatives with respect to each variable. In your case $$H(x, y) = \left[ \begin{array}{cc} \frac{\partial^2 f }{\partial x^2} & \frac{\partial^2 f }{\partial x \partial y} \\ \frac{\partial^2 f }{\partial y \partial x} & \frac{\partial^2 f }{\partial y^2} \end{array} \right]$$ If it is positive definite at critical point – it's local minimum, if negative definite then local maximum, if the sign is indefinite then it's a saddle point.