\(D\succ0 \quad\Longleftrightarrow\quad d_i>0\) for all \(i\)
\(D\succeq0 \quad\Longleftrightarrow\quad d_i\geq0\) for all \(i\)
Eigenpairs of symmetric matrices
Let \(H\) be a \(n\)-by-\(n\) matrix. Then \((x,\lambda)\in\Rn\times\R\) is an eigenvector/eigenvalue pair of \(H\) if \[Hx = \lambda x\]
Theorem 1 (Eigenvalues of symmetric matrices) If \(H\) is \(n\)-by-\(n\) and symmetric, then there exists \(n\) orthogonal eigenvectors and all eigenvalues are real.
\[
\left\{
\begin{aligned}
Hx_1 &= \lambda_1 x_1\\
Hx_2 &= \lambda_2 x_2\\
&\vdots\\
Hx_n &= \lambda_n x_n
\end{aligned}
\right\}
\textt{or}
H X = X\Lambda\
\] where \(X\T = X^{-1}\) (orthogonal) and \(\Lambda\) is a diagonal matrix of eigenvalues: \[
X = \begin{bmatrix}x_1 & x_2 & \cdots & x_n\end{bmatrix}
\quad\text{and}\quad
\Lambda = \begin{bmatrix}\lambda_1 & 0 & \cdots & 0\\
0 & \lambda_2 & \cdots & 0\\
\vdots & \vdots & \ddots & \vdots\\
0 & 0 & \cdots & \lambda_n
\end{bmatrix}
\]
Eigenvalues and definiteness
The matrix \(H\) is positive (semi) definite if and only if all of its eigenvalues are (nonnegative) positive.
proof (positive definite)
by spectral theorem, \[ X\T H X = \Lambda \textt{where} X\T = X^{-1}
\textt{and} \Lambda=\Diag(\lambda_1,\lambda_2,\ldots,\lambda_n)\]
for any \(x\in\Rn\) there exists \(y=(y_1,\ldots,y_n)\) such that \(x=Xy\) and \[
x\T Hx = y\T X\T H X y = y\T \Lambda y = \sum_{i=1}^n \lambda_i y_i^2
\]
thus, \(x\T Hx>0\) for all \(x\neq 0\) (ie, \(H\) positive definite) if and only if \[
\sum_{i=1}^n \lambda_i y_i^2 > 0 \quad\text{for all}\quad y\neq 0
\quad\Longleftrightarrow\quad \lambda_i > 0 \quad\text{for all}\quad i=1:n
\]
Example
usingLinearAlgebra
\[
H = \begin{bmatrix}4 & 1\\ 1& 3\end{bmatrix}
\]
Quadratic functions over \(\Rn\) have the form \[
f(x) = \half x\T H x + b\T x + \gamma
\] where \(H\) is symmetric and \(b\in\Rn\) and \(\gamma\in\R\).
Given \(f:\Rn\to\R\), recall the directional derivative \[
f'(x;d) = \lim_{\alpha\to 0^+}\frac{f(x+\alpha d)-f(x)}{\alpha}
=
d\T\nabla f(x)
\]
Definition 1 The directional second derivative of \(f\) at \(x\) in the direction \(d\) is \[
f''(x;d) = \lim_{\alpha\to0^+} \frac{f'(x+\alpha d;d) - f'(x;d)}{\alpha}
=
d\T\nabla^2 f(x)d
\]
partial 2nd derivatives are the directional 2nd derivatives along each canonical basis vector \(e_i\): \[
\frac{\partial^2 f}{\partial x_i^2}(x) = f''(x;e_i)
\textt{with}
e_i(j) = \begin{cases}
1 & \text{if } j=i\\
0 & \text{if } j\ne i
\end{cases}
\]
Linear and quadratic approximations
Suppose \(f:\Rn\to\R\) is twice continuously differentiable.
Theorem 2 (Linear approximation) For all \(x\in\Rn\) and \(\epsilon>0\), for each \(y\in\epsilon\Ball(x)\) there exists \(z\in[x,y]\) such that \[
f(y) = f(x) + \nabla f(x)\T (y-x) + \half (y-x)\T\nabla^2 f(z)(y-x)
\]
Theorem 3 (Quadratic approximation) For all \(x\) and \(d\) in \(\Rn\), \[
f(x+d) = f(x) + \nabla f(x)\T d + \half d\T\nabla^2 f(x)d + o(\|d\|^2)
\]
Second-order necessary conditions
For \(f:\Rn\to\R\) twice continuously differentiable and \(\bar x\in\Rn\)stationary (ie, \(\nabla f(\bar x)=0\))
\(\bar x\) is a local min\(\quad\Longrightarrow\quad\)\(\nabla^2f(\bar x) \succeq0\)
\(\bar x\) is a local max\(\quad\Longrightarrow\quad\)\(\nabla^2f(\bar x) \preceq0\)
proof sketch for local min (analogous for local max). If \(\bar x\) is a local min, then for all \(d\ne0\)
Divide both sides by \(\alpha^2\) and take the limit as \(\alpha\to0^+\). Because \(\omicron(\alpha^2\|d\|^2)/\alpha^2\to0\), \[
0\le d\T\nabla^2 f(\bar x)d
\]
Because this hold for all \(d\ne0\), \[
\nabla^2 f(\bar x) \succeq0
\]
Sufficient conditions for optimality
For \(f:\Rn\to\R\) twice continuously differentiable and \(\bar x\in\Rn\)stationary, ie, \(\nabla f(\bar x)=0\),
\(\nabla f(\xbar)\succ0 \quad\Longrightarrow\quad\)\(\xbar\) is a local min
\(\nabla f(\xbar)\prec0 \quad\Longrightarrow\quad\)\(\xbar\) is a local max
proof sketch for local min (analogous for local max). By linear approximation theorem and continuity of \(\nabla^2 f\), for any \(x\) close enough to \(\xbar\) there exists \(z\in[\xbar,x]\) such that