I need this for my semester exams, unfortunately I was absent the day this topic was "talked about".
My function is the real-valued $$f(x,y)=x-xy+x^2+y^2$$, interpreted on $\mathbb{R}^2$.
Single-valued functions could be handled easily by derivations, but what to do with two variables?
To find the extrems of a function of two (or more) variables, you need:
In your case, $\nabla f(x,y)=(1-y+2x,-x+2y)=(0,0) \iff x=-2/3,\ y=-1/3$.
In your case, $H(x,y)=\begin{pmatrix}2&-1\cr -1&2\end{pmatrix}$.
$Det(H(1,1))=5>0$ and $\frac{d^2f}{dx^2}(1,1)=2>0$, so it is definite positive and you get a minimum.