Multivariate functions
For a function $f(x,y)$, its gradient is $$ \mrm{grad}(f) \equiv \v\nabla f \equiv \Big(\pdfd fx, \pdfd fy\Big).$$
The directional derivative of $f(x,y)$ in the direction $\vhat s$ is $$ \dfd fs = \vhat s\cdot\v\nabla f. $$
-
Direction of $\v\nabla f$ is that in which $f$ increases most rapidly.
-
Magnitude of $\v\nabla f$ is the maximum rate of change of $f$.
-
When $0 = \dfd fs = \vhat s\cdot\v\nabla f$, we have $\hat s$ being along a contour of $f$, so $\v\nabla f$ is perpendicular to the contours of $f$.
The first three terms of the Taylor series around $\v x = \v x_0$ is $$ f(\v x_0 + \delta\v x) = f(\v x_0) + \delta\v x\cdot\v\nabla f\big|_{\v x_0} + \frac12 \delta\v x\ (\vnabla\vnabla f)\big|_{\v x_0}\ \delta\v x^T + \ldots $$ where $\delta\v x$ is a row vector and $\vnabla\vnabla f$ is the Hessian matrix $$ H \equiv \vnabla\vnabla f \equiv \pmat{f_{xx} & f_{xy} \\ f_{yx} & f_{yy}}. $$
If $f_{xy}$ is continuous, then $f_{xy} = f_{yx}$ so $H$ is symmetric.
What is on the lecture notes has $f_{xy}$ and $f_{yx}$ swapped compared to Wikipedia, but I guess no one really cares which is which since it's usually symmetric.
$\v x_0$ is a stationary point of a function $f(\v x)$ if $$ \vnabla f\big|_{\v x_0} = \v 0. $$
Equivalently, the directional derivative $\dfd fs\big|_{\v x_0} = 0$ for all $\vhat s$.
A real symmetric matrix $H$ is
-
positive definite if $\v x H\v x^T > 0$ for all real (row) vector $\v x\neq 0$;
-
negative definite if $\v x H\v x^T < 0$ for all real (row) vector $\v x\neq 0$; or
-
indefinite if otherwise.
The nature of a stationary point can sometimes be determined by the Hessian $H$:
-
$H$ is positive definite $\implies$ local minimum.
-
$H$ is negative definite $\implies$ local maximum.
-
If $H$ is indefinite, then we don't know.
Let $\lambda_i$ be the eigenvalues of $H$.
-
$\lambda_i > 0$ for all $i$ $\iff$ $H$ is positive definite $\implies$ local minimum;
-
$\lambda_i < 0$ for all $i$ $\iff$ $H$ is negative definite $\implies$ local maximum;
-
$\lambda_i\neq 0$ for all $i$ and with mixed signs $\implies$ saddle point;
-
Otherwise don't know.
The signature of a matrix $H$ is the pattern of signs of the ordered subdeterminant of the leading principle minors of $H$.
The following is a human-readable definition: for an $n\times n$ matrix $H$, its signature is the list of the signs of $$ |H_1|, |H_2|, |H_3|, \ldots, |H_n| $$ where $$\begin{align*} H_1 &= \pmat{ H_{11} }, \\ H_2 &= \pmat{H_{11} & H_{12} \\ H_{21} & H_{22}}, \\ H_3 &= \pmat{H_{11} & H_{12} & H_{13} \\ H_{21} & H_{22} & H_{23} \\ H_{31} & H_{32} & H_{33} \\ }, \\ \vdots \\ H_n &= H = \pmat{H_{11} & H_{12} & \ldots & H_{1n} \\ H_{21} & H_{22} & \ldots & H_{2n} \\ \vdots & \vdots & & \vdots \\ H_{n1} & H_{n2} & \ldots & H_{nn}}. \end{align*}$$
For a real symmetric $n\times n$ matrix $H$,
-
$H$ is positive definite $\iff$ signature is $+, +, +, \ldots, +$.
-
$H$ is negative definite $\iff$ signature is $-, +, -, +, \ldots, (-1)^n$.
If the eigenvalues of $H$ is non-zero,
-
near a local maximum or minimum, the contours are elliptical;
-
near a saddle point, the contours are hyperbolic.