Solution (source code)

= Solution

At a <critical point> $p$ of a twice continuously differentiable function, the linear term in the <Taylor expansion> vanishes:
$$
f(p+h)=f(p)+\frac12h^THh+o(\|h\|^2).
$$
The real symmetric <Hessian matrix> has an <orthonormal basis> of <eigenvectors>. If all its <eigenvalues> are positive, its quadratic term is bounded below by a positive multiple of $\|h\|^2$, giving a \b[strict <local minimum>]. If all are negative, it gives a \b[strict <local maximum>]. If positive and negative <eigenvalues> both occur, directions along their <eigenvectors> give values on both sides of $f(p)$, so the point is a \b[saddle point of a scalar function]. The non-singularity assumption excludes zero <eigenvalues>; with them the quadratic test may be inconclusive and higher-order terms are needed.