# 【转载】Hessian矩阵与多元函数极值

• 多元函数极值问题
• 泰勒展开式与Hessian矩阵

## 多元函数极值问题

$\frac{\mathrm{\partial }f}{\mathrm{\partial }x}=0\phantom{\rule{0ex}{0ex}}\frac{\mathrm{\partial }f}{\mathrm{\partial }y}=0\phantom{\rule{0ex}{0ex}}\frac{\mathrm{\partial }f}{\mathrm{\partial }x}=0$

$\mathbf{H}=\left[\begin{array}{ccc}\frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }x\mathrm{\partial }x}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }x\mathrm{\partial }y}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }x\mathrm{\partial }z}\\ \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }y\mathrm{\partial }x}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }y\mathrm{\partial }y}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }y\mathrm{\partial }z}\\ \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }z\mathrm{\partial }x}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }z\mathrm{\partial }y}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }z\mathrm{\partial }z}\end{array}\right]$

$\mathbf{H}=\left[\begin{array}{cccc}\frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{1}^{2}}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{1}\mathrm{\partial }{x}_{2}}& \cdots & \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{1}\mathrm{\partial }{x}_{n}}\\ \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{2}\mathrm{\partial }{x}_{1}}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{2}^{2}}& \cdots & \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{2}\mathrm{\partial }{x}_{n}}\\ ⋮& ⋮& \ddots & ⋮\\ \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{n}\mathrm{\partial }{x}_{1}}& \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{n}\mathrm{\partial }{x}_{2}}& \cdots & \frac{{\mathrm{\partial }}^{2}f}{\mathrm{\partial }{x}_{n}^{2}}\end{array}\right]$

• 如果是正定矩阵，则临界点处是一个局部极小值
• 如果是负定矩阵，则临界点处是一个局部极大值
• 如果是不定矩阵，则临界点处不是极值

$f\left({x}_{1},{x}_{2},\cdots ,{x}_{n}\right)={a}_{11}{x}_{1}^{2}+{a}_{22}{x}_{2}^{2}+\cdots +{a}_{nn}{x}_{n}^{2}+2{a}_{12}{x}_{1}{x}_{2}+2{a}_{13}{x}_{1}{x}_{3}+\cdots +2{a}_{n-1,n}{x}_{n-1}{x}_{n}$

$\begin{array}{rl}f=& {a}_{11}{x}_{1}^{2}+{a}_{12}{x}_{1}{x}_{2}+\cdots +{a}_{1n}{x}_{1}{x}_{n}\\ & +{a}_{21}{x}_{2}{x}_{1}+{a}_{22}{x}_{2}^{2}+\cdots +{a}_{2n}{x}_{2}{x}_{n}+\cdots \\ & +{a}_{n1}{x}_{n}{x}_{1}+{a}_{n2}{x}_{n}{x}_{2}+\cdots +{a}_{nn}{x}_{n}^{2}\\ =& \sum _{i,j=1}^{n}{a}_{ij}{x}_{i}{x}_{j}\end{array}$

$\begin{array}{rl}f=& {x}_{1}\left({a}_{11}{x}_{1}+{a}_{12}{x}_{2}+\cdots +{a}_{1n}{x}_{n}\right)+\\ & {x}_{2}\left({a}_{21}{x}_{1}+{a}_{22}{x}_{2}+\cdots +{a}_{2n}{x}_{n}\right)+\cdots +\\ & {x}_{n}\left({a}_{n1}{x}_{1}+{a}_{n2}{x}_{2}+\cdots +{a}_{nn}{x}_{n}\right)\\ =& \left({x}_{1},{x}_{2},\cdots ,{x}_{n}\right)\left[\begin{array}{c}{a}_{11}{x}_{1}+{a}_{12}{x}_{2}+\cdots +{a}_{1n}{x}_{n}\\ {a}_{21}{x}_{1}+{a}_{22}{x}_{2}+\cdots +{a}_{2n}{x}_{n}\\ ⋮\\ {a}_{n1}{x}_{1}+{a}_{n2}{x}_{2}+\cdots +{a}_{nn}{x}_{n}\end{array}\right]\\ =& \left({x}_{1},{x}_{2},\cdots ,{x}_{n}\right)\left[\begin{array}{cccc}{a}_{11}& {a}_{12}& \cdots & {a}_{1n}\\ {a}_{21}& {a}_{22}& \cdots & {a}_{2n}\\ ⋮& ⋮& \ddots & ⋮\\ {a}_{n1}& {a}_{n2}& \cdots & {a}_{nn}\end{array}\right]\left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ ⋮\\ {x}_{n}\end{array}\right]\end{array}$

$\mathbf{A}=\left[\begin{array}{cccc}{a}_{11}& {a}_{12}& \cdots & {a}_{1n}\\ {a}_{21}& {a}_{22}& \cdots & {a}_{2n}\\ ⋮& ⋮& \ddots & ⋮\\ {a}_{n1}& {a}_{n2}& \cdots & {a}_{nn}\end{array}\right],\mathbf{x}=\left[\begin{array}{c}{x}_{1}\\ {x}_{2}\\ ⋮\\ {x}_{n}\end{array}\right]$

## 泰勒展开式与Hessian矩阵

$f\left(x\right)=f\left({x}_{0}\right)+{f}^{\prime }\left({x}_{0}\right)\left(x-{x}_{0}\right)+\frac{{f}^{″}\left({x}_{0}\right)}{2!}\left(x-{x}_{0}{\right)}^{2}+\cdots +\frac{{f}^{\left(n\right)}\left({x}_{0}\right)}{n!}\left(x-{x}_{0}{\right)}^{n}+{R}_{n}\left(x\right)$

${R}_{n}\left(x\right)=\frac{{f}^{\left(n+1\right)}\left(\xi \right)}{\left(n+1\right)!}\left(x-{x}_{0}{\right)}^{n+1}$

$\begin{array}{rl}f\left(x,y\right)& =f\left({x}_{0},{y}_{0}\right)+\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}\right]f\left({x}_{0},{y}_{0}\right)\\ & +\frac{1}{2!}\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}{\right]}^{2}f\left({x}_{0},{y}_{0}\right)+\cdots +\\ & +\frac{1}{n!}\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}{\right]}^{n}f\left({x}_{0},{y}_{0}\right)\\ & +\frac{1}{\left(n+1\right)!}\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}{\right]}^{\left(n+1\right)}f\left[{x}_{0}+\theta \left(x-{x}_{0}\right),{y}_{0}+\theta \left(y-{y}_{0}\right)\right]\end{array}$

$\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}\right]f\left({x}_{0},{y}_{0}\right)$

$\left(x-{x}_{0}\right){f}_{x}\left({x}_{0},{y}_{0}\right)+\left(y-{y}_{0}\right){f}_{y}\left({x}_{0},{y}_{0}\right)$

$\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}{\right]}^{2}f\left({x}_{0},{y}_{0}\right)$

$\left(x-{x}_{0}{\right)}^{2}{f}_{xx}\left({x}_{0},{y}_{0}\right)+2\left(x-{x}_{0}\right)\left(y-{y}_{0}\right){f}_{xy}\left({x}_{0},{y}_{0}\right)+\left(y-{y}_{0}{\right)}^{2}{f}_{yy}\left({x}_{0},{y}_{0}\right)$

$\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}{\right]}^{m}f\left({x}_{0},{y}_{0}\right)$

$\sum _{p=0}^{m}{C}_{m}^{p}\left(x-{x}_{0}{\right)}^{p}\left(y-{y}_{0}{\right)}^{\left(m-p\right)}\frac{{\mathrm{\partial }}^{m}f}{\mathrm{\partial }{x}^{p}\mathrm{\partial }{y}^{\left(m-p\right)}}{|}_{\left({x}_{0},{y}_{0}\right)}$

$\begin{array}{rl}f\left(x,y\right)& =\sum _{k=0}^{n}\frac{1}{k!}\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}{\right]}^{k}f\left({x}_{0},{y}_{0}\right)\\ & +\frac{1}{\left(n+1\right)!}\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}{\right]}^{\left(n+1\right)}f\left[{x}_{0}+\theta \left(x-{x}_{0}\right),{y}_{0}+\theta \left(y-{y}_{0}\right)\right],\left(0<\theta <1\right)\end{array}$

$f\left(x,y\right)=\sum _{k=0}^{n}\frac{1}{k!}\left[\left(x-{x}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }x}+\left(y-{y}_{0}\right)\frac{\mathrm{\partial }}{\mathrm{\partial }y}{\right]}^{k}f\left({x}_{0},{y}_{0}\right)+o\left({\rho }^{n}\right)$

$f\left(\mathbf{X}\right)=f\left({\mathbf{X}}_{0}\right)+\left(\mathbf{X}-{\mathbf{X}}_{0}{\right)}^{T}\mathrm{\nabla }f\left({\mathbf{X}}_{0}\right)+\frac{1}{2!}\left(\mathbf{X}-{\mathbf{X}}_{0}{\right)}^{T}{\mathrm{\nabla }}^{2}f\left({\mathbf{X}}_{0}\right)\left(\mathbf{X}-{\mathbf{X}}_{0}\right)+o\left(‖\mathbf{X}-{\mathbf{X}}_{0}{‖}^{2}\right)$

$f\left(\mathbf{X}\right)=f\left({\mathbf{X}}_{0}\right)+\left(\mathbf{X}-{\mathbf{X}}_{0}{\right)}^{T}\mathrm{\nabla }f\left({\mathbf{X}}_{0}\right)+\frac{1}{2}\left(\mathbf{X}-{\mathbf{X}}_{0}{\right)}^{T}\mathbf{H}\left({\mathbf{X}}_{0}\right)\left(\mathbf{X}-{\mathbf{X}}_{0}\right)+o\left(‖\mathbf{X}-{\mathbf{X}}_{0}{‖}^{2}\right)$

$\mathrm{\nabla }f\left(M\right)={\left\{\frac{\mathrm{\partial }f}{\mathrm{\partial }{x}_{1}},\frac{\mathrm{\partial }f}{\mathrm{\partial }{x}_{2}},\cdots ,\frac{\mathrm{\partial }f}{\mathrm{\partial }{x}_{n}}\right\}}_{M}=0$

posted @ 2019-10-30 21:10  Veagau  阅读(6940)  评论(1编辑  收藏  举报