I read some conflicting material in lecture slides, where one slide says you must compute the hessian matrix to determine the nature of a stationary point.
Another slide says that you only need the top left and bottom right partial derivatives of the Hessian matrix to determine the nature of a stationary point.
Can someone please clarify?
There are only 3 partial derivatives, since the cross partials are equal. The Hessian is therefore a symmetric matrix. Now, consider the symmetric matrix $\begin{bmatrix} a&b\\b&c\end{bmatrix}$. We know that the determinant and trace are the product and sum of the eigenvalues respectively. That is, $\lambda_1+\lambda_2=a+c$ and $\lambda_1\lambda_2=ac-b^2$. If we only know $a$ and $c$, we can't determine the eigenvalues, but the symmetry of the matrix means we can determine a few things about them based on their signs.
If they are both positive (or both negative), then the trace tells us the eigenvalues can't both be negative (positive) and this critical point is not a local maximum (minimum).
If they are of opposite sign, the determinant must be negative, so the eigenvalues must also be of opposite sign, meaning the critical point is a saddle point.
This is the best we can do, as there are saddles like $x^2+3xy+y^2$ that have diagonal Hessian entries of the same sign. So in the $2\times 2$ case, there are times where you can determine the nature of the critical point just from the diagonal entries, but not in general.
For higher dimensions, if we know the diagonal terms, we can only get the weaker result that a local minimum (maximum) must have positive (negative) trace, but we don't have a condition that rules out an extremum like in the 2D case. The trace condition also requires knowing every diagonal term, not just the two corners.