<s>[INST] 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?
 [/INST] 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.
</s>