How to determine whether critical points (of the lagrangian function) are minima or maxima? $f(x,y) = 2x+y$ subject to $g(x,y)=x^2+y^2-1=0$. The Lagrangian function is given by
$$
\mathcal{L}(x,y,\lambda)=2x+y+\lambda(x^2+y^2-1),
$$
with corresponding 
$$
\nabla \mathcal{L}(x,y,\lambda)= \begin{bmatrix}  2 + 2\lambda x \\ 1+2\lambda y \\ x^2+y^2-1 \end{bmatrix}.
$$
From the latter we can see that $x=\frac{-1}{\lambda}$ and $y=\frac{-1}{2\lambda}$, which we can substitute into $x^2+y^2=1$ to obtain $\lambda = \pm\sqrt{\frac{5}{4}}$. Meaning that $x = \pm \dfrac{2}{\sqrt{5}}$ and $y= \pm \dfrac{1}{\sqrt{5}}$. We find the critical points $(\frac{2}{\sqrt{5}}, \frac{1}{\sqrt{5}})$ and $(\frac{-2}{\sqrt{5}}, \frac{-1}{\sqrt{5}})$.
I am confused on how I should proceed to check wether these points or minima or maxima? I know the Hessian is involved, but which one?
 A: In general when optimizing $f(x)$ subject to $g(x)=0$, you solve the problem $\nabla f(x)=\lambda \nabla g(x)$ and the critical points  can be checked by the bordered Hessian matrix:
$$H=\begin{pmatrix}
0 & g_x & g_y\\
g_x & f_{xx}+\lambda g_{xx} & f_{xy}+\lambda g_{xy}\\
g_y & f_{yx}+\lambda g_{yx} & f_{yy}+\lambda g_{yy}
\end{pmatrix}.$$
Define $h:=\det(H)$. If $h>0$ at the critical point, you're at a maximum and if $h<0$ you're at a minimum. Equivalently, you can replace all instances of $g$ in the above Hessian with $-g$ so that the derivatives in the bottom right square become those of $f-\lambda g$. Indeed, consider expanding $f-\lambda g$ around each critical point taking into account that you are moving along $g$. 
A: You've done the hard part. Now check the values of $f(x,y)$ at the two points $(x,y) = (\pm 2/\sqrt{5}, \pm 1/\sqrt{5})$. Since $$f(\pm 2/\sqrt{5}, \pm 1/\sqrt{5}) = 2(\pm2/\sqrt5) \pm1/\sqrt5 = \pm\sqrt{5},$$
you can conclude that $f$ is maximized at $(2/\sqrt5,1/\sqrt5)$ and minimized at $(-2/\sqrt5,-1/\sqrt5)$.
Edit: To clarify, the reason this is enough to make the above conclusion is that the constraint space $x^2 + y^2 = 1$ is a closed curve and $f$ is continuous. Therefore $f$ attains a maximum and minimum on this space, and you can conclude they are the points you solved for using Lagrange multipliers. Since you only found two points, the function $f$ must be maximized at one and minimized at the other. The above work checks which is which.
In general, you need to use a Hessian matrix to determine where you have extrema.
A: Fortunately $\{x^2+y^2-1=0\}$ is compact and $f$ continuous thus $f$ must have a min and max.  Just compare the values of $f$ at the critical values.  In this case the Hessian is not needed.
