「高等数学」雅可比矩阵和黑塞矩阵的异同
雅可比矩阵,Jacobi matrix 或者 Jacobian,是向量值函数( f : R n → R m f:\mathbb{R}^n \to \mathbb{R}^m f:Rn→Rm)的一阶偏导数按行排列所得的矩阵。
黑塞矩阵,又叫海森矩阵,Hesse matrix,是多元函数( f : R n → R f:\mathbb{R}^n \to \mathbb{R} f:Rn→R)的二阶偏导数组成的方阵。
1、雅可比矩阵 J m × n J_{m\times n} Jm×n
雅可比矩阵通常是一个mxn的矩阵。
给出一个向量值函数: h ( x ) = ( h 1 ( x ) , h 2 ( x ) , ⋯ , h m ( x ) ) T h(\mathbf{x}) = (h_1(\mathbf{x}),h_2(\mathbf{x}),\cdots,h_m(\mathbf{x}))^T h(x)=(h1(x),h2(x),⋯,hm(x))T
它的雅可比矩阵是:
J = [ ∂ h ∂ x 1 ⋯ ∂ h ∂ x n ] = [ ∂ h 1 ∂ x 1 ⋯ ∂ h 1 ∂ x n ⋮ ⋱ ⋮ ∂ h m ∂ x 1 ⋯ ∂ h m ∂ x n ] {\displaystyle \mathbf {J} ={\begin{bmatrix}{\dfrac {\partial \mathbf {h} }{\partial x_{1}}}&\cdots &{\dfrac {\partial \mathbf {h} }{\partial x_{n}}}\end{bmatrix}}={\begin{bmatrix}{\dfrac {\partial h_{1}}{\partial x_{1}}}&\cdots &{\dfrac {\partial h_{1}}{\partial x_{n}}}\\\vdots &\ddots &\vdots \\{\dfrac {\partial h_{m}}{\partial x_{1}}}&\cdots &{\dfrac {\partial h_{m}}{\partial x_{n}}}\end{bmatrix}}} J=[∂x1∂h⋯∂xn∂h]= ∂x1∂h1⋮∂x1∂hm⋯⋱⋯∂xn∂h1⋮∂xn∂hm
矩阵的每一行相当于每个向量值函数的分量的梯度的转置,或者叫一阶偏导数按行(row)排列。
一个n元实值函数的梯度的雅可比矩阵:
J
=
D
[
∇
f
(
x
)
]
=
[
∂
2
f
∂
x
1
2
∂
2
f
∂
x
2
∂
x
1
⋯
∂
2
f
∂
x
n
∂
x
1
∂
2
f
∂
x
1
∂
x
2
∂
2
f
∂
x
2
2
⋯
∂
2
f
∂
x
n
∂
x
2
⋮
⋮
⋱
⋮
∂
2
f
∂
x
1
∂
x
n
∂
2
f
∂
x
2
∂
x
n
⋯
∂
2
f
∂
x
n
2
]
{\displaystyle \mathbf {J} = D[\nabla f(\mathbf{x})] = {\begin{bmatrix}{\frac {\partial ^{2}f}{\partial x_{1}^{2}}}&{\frac {\partial ^{2}f}{\partial x_{2}\,\partial x_{1}}}&\cdots &{\frac {\partial ^{2}f}{\partial x_{n}\,\partial x_{1}}}\\ \\{\frac {\partial ^{2}f}{\partial x_{1}\,\partial x_{2}}}&{\frac {\partial ^{2}f}{\partial x_{2}^{2}}}&\cdots &{\frac {\partial ^{2}f}{\partial x_{n}\,\partial x_{2}}}\\ \\\vdots &\vdots &\ddots &\vdots \\\\{\frac {\partial ^{2}f}{\partial x_{1}\,\partial x_{n}}}&{\frac {\partial ^{2}f}{\partial x_{2}\,\partial x_{n}}}&\cdots &{\frac {\partial ^{2}f}{\partial x_{n}^{2}}}\end{bmatrix}}\,}
J=D[∇f(x)]=
∂x12∂2f∂x1∂x2∂2f⋮∂x1∂xn∂2f∂x2∂x1∂2f∂x22∂2f⋮∂x2∂xn∂2f⋯⋯⋱⋯∂xn∂x1∂2f∂xn∂x2∂2f⋮∂xn2∂2f
2、黑塞矩阵 H n × n H_{n\times n} Hn×n
黑塞矩阵一定是一个方阵。
二阶混合偏导数:
∂
2
f
∂
y
∂
x
=
∂
∂
y
(
∂
f
∂
x
)
=
f
x
y
\frac{\partial^2 f}{\partial y \, \partial x} = \frac{\partial}{\partial y} \left( \frac{\partial f}{\partial x} \right) = f_{xy}
∂y∂x∂2f=∂y∂(∂x∂f)=fxy
对于一个n元实值函数
f
(
x
)
f(\mathbf{x})
f(x),它的梯度为一个列向量:
∇
f
(
x
)
=
(
f
x
1
(
x
)
,
f
x
2
(
x
)
,
⋯
,
f
x
n
(
x
)
)
T
\nabla f(\mathbf{x}) = (f_{x_1}(\mathbf{x}),f_{x_2}(\mathbf{x}),\cdots,f_{x_n}(\mathbf{x}))^T
∇f(x)=(fx1(x),fx2(x),⋯,fxn(x))T
对其求二阶偏导数,并将偏导数按列(col)排列。
H
=
[
∂
2
f
∂
x
1
2
∂
2
f
∂
x
1
∂
x
2
⋯
∂
2
f
∂
x
1
∂
x
n
∂
2
f
∂
x
2
∂
x
1
∂
2
f
∂
x
2
2
⋯
∂
2
f
∂
x
2
∂
x
n
⋮
⋮
⋱
⋮
∂
2
f
∂
x
n
∂
x
1
∂
2
f
∂
x
n
∂
x
2
⋯
∂
2
f
∂
x
n
2
]
{\displaystyle \mathbf {H} ={\begin{bmatrix}{\frac {\partial ^{2}f}{\partial x_{1}^{2}}}&{\frac {\partial ^{2}f}{\partial x_{1}\,\partial x_{2}}}&\cdots &{\frac {\partial ^{2}f}{\partial x_{1}\,\partial x_{n}}}\\\\{\frac {\partial ^{2}f}{\partial x_{2}\,\partial x_{1}}}&{\frac {\partial ^{2}f}{\partial x_{2}^{2}}}&\cdots &{\frac {\partial ^{2}f}{\partial x_{2}\,\partial x_{n}}}\\\\\vdots &\vdots &\ddots &\vdots \\\\{\frac {\partial ^{2}f}{\partial x_{n}\,\partial x_{1}}}&{\frac {\partial ^{2}f}{\partial x_{n}\,\partial x_{2}}}&\cdots &{\frac {\partial ^{2}f}{\partial x_{n}^{2}}}\end{bmatrix}}\,}
H=
∂x12∂2f∂x2∂x1∂2f⋮∂xn∂x1∂2f∂x1∂x2∂2f∂x22∂2f⋮∂xn∂x2∂2f⋯⋯⋱⋯∂x1∂xn∂2f∂x2∂xn∂2f⋮∂xn2∂2f
因此:
-
对于一个二阶可微的n元实值函数,它的黑塞矩阵的转置🟰它的梯度的雅可比矩阵。
-
对于一个二阶连续可微的n元实值函数,其二阶混合偏导数: ∂ 2 f ∂ y ∂ x = ∂ 2 f ∂ x ∂ y \frac{\partial^2 f}{\partial y \, \partial x} = \frac{\partial^2 f}{\partial x \, \partial y} ∂y∂x∂2f=∂x∂y∂2f。此时,其黑塞矩阵🟰它的梯度的雅可比矩阵。文章来源:https://www.toymoban.com/news/detail-695841.html
-
在很多地方,遇到的都是二阶连续可微的情况,因此有些地方对雅可比矩阵和黑塞矩阵不加以区分。文章来源地址https://www.toymoban.com/news/detail-695841.html
到了这里,关于「高等数学」雅可比矩阵和黑塞矩阵的异同的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!