矩阵的导数运算

2019-07-18  本文已影响0人  SoSurprise

1.矩阵对标量求导

相当于每个元素求导
\frac{d \mathbf{Y}}{d x}=\begin{bmatrix} \frac{d f_{1 1}(x)}{d x} & \frac{d f_{1 2}(x)}{d x} &\dots & \frac{d f_{1 n}(x)}{d x} \\ \frac{d f_{2 1}(x)}{d x} &\frac{d f_{2 2}(x)}{d x} & \dots& \frac{d f_{2 n}(x)}{d x} \\ \dots & \dots & \dots & \dots \\ \frac{d f_{m 1}(x)}{d x} &\frac{d f_{m 2}(x)}{d x}&\dots &\frac{d f_{m n}(x)}{d x} \end{bmatrix}

2.矩阵对列向量求导

\mathbf{Y} = \mathbf{F}({\mathbf{x}})\rightarrow \frac{d \mathbf{Y}}{d \mathbf{x}}= \begin{bmatrix} \frac{\partial \mathbf{F}}{\partial x_1}\\ \frac{\partial \mathbf{F}}{\partial x_2}\\ \dots \\ \frac{\partial \mathbf{F}}{\partial x_{m}}\end{bmatrix}

3.矩阵对矩阵求导

\frac{d \mathbf{Y}}{d \mathbf{X}} = \begin{bmatrix} \frac{\partial {\begin{bmatrix} a&b&c \end{bmatrix}}}{\partial \begin{bmatrix} u\\v\\w \end{bmatrix}} & \frac{\partial {\begin{bmatrix} a&b&c \end{bmatrix}}}{\partial \begin{bmatrix} x\\y\\z \end{bmatrix}} \\ \frac{\partial {\begin{bmatrix} d&e&f \end{bmatrix}}}{\partial \begin{bmatrix} u\\v\\w \end{bmatrix}} & \frac{\partial {\begin{bmatrix} d&e&f \end{bmatrix}}}{\partial \begin{bmatrix} x\\y\\z \end{bmatrix}} \end{bmatrix}=\begin{bmatrix} \frac{\partial a}{\partial u} & \frac{\partial b}{\partial u} & \frac{\partial c}{\partial u}&\frac{\partial a}{\partial x}&\frac{\partial b}{\partial x}&\frac{\partial c}{\partial x}\\ \frac{\partial a}{\partial v} & \frac{\partial b}{\partial v} & \frac{\partial c}{\partial v}&\frac{\partial c}{\partial y} & \frac{\partial c}{\partial y}&\frac{\partial c}{\partial y}\\ \frac{\partial a}{\partial w} & \frac{\partial b}{\partial w} & \frac{\partial c}{\partial w}&\frac{\partial c}{\partial z}&\frac{\partial c}{\partial z}&\frac{\partial c}{\partial z}\\ \frac{\partial d}{\partial u} & \frac{\partial e}{\partial u} & \frac{\partial f}{\partial u}&\frac{\partial d}{\partial x}&\frac{\partial e}{\partial x}&\frac{\partial f}{\partial x}\\\frac{\partial d}{\partial v} & \frac{\partial e}{\partial v} & \frac{\partial f}{\partial v}&\frac{\partial d}{\partial y}&\frac{\partial e}{\partial y}&\frac{\partial f}{\partial y}\\\frac{\partial d}{\partial w} & \frac{\partial e}{\partial w} & \frac{\partial f}{\partial w}&\frac{\partial d}{\partial z}&\frac{\partial e}{\partial z}&\frac{\partial f}{\partial z}\end{bmatrix}

4.标量对列向量求导

y = f({\mathbf{x}})\rightarrow \frac{d y}{d \mathbf{x}}= \begin{bmatrix} \frac{\partial y}{\partial x_1} \\ \frac{\partial y}{\partial x_2} \\ \dots \\ \frac{\partial y}{\partial x_{m}}\end{bmatrix}

5.标量对矩阵求导

\frac{d y}{d \mathbf{X}} = \begin{bmatrix} \frac{\partial f}{\partial x_{1 1}} &\frac{\partial f}{\partial x_{1 2}} &\dots & \frac{\partial f}{\partial x_{1 n}} \\ \frac{\partial f}{\partial x_{2 1}} &\frac{\partial f}{\partial x_{2 2}} & \dots& \frac{\partial f}{\partial x_{2 n}} \\ \dots & \dots & \dots & \dots \\ \frac{\partial f}{\partial x_{m 1}} &\frac{\partial f}{\partial x_{m 2}}&\dots & \frac{\partial f}{\partial x_{m n}} \end{bmatrix}

6.行向量对列向量求导

\frac{d \mathbf{y^T}}{d \mathbf{x}} = \begin{bmatrix} \frac{\partial f_1(x)}{\partial x_1} &\frac{\partial f_2(x)}{\partial x_1} &\dots & \frac{\partial f_n(x)}{\partial x_1} \\ \frac{\partial f_1(x)}{\partial x_2} &\frac{\partial f_2(x)}{\partial x_2} & \dots& \frac{\partial f_n(x)}{\partial x_2} \\ \dots & \dots & \dots & \dots \\ \frac{\partial f_1(x)}{\partial x_m} &\frac{\partial f_2(x)}{\partial x_m}&\dots &\frac{\partial f_n(x)}{\partial x_m} \end{bmatrix}

7.列向量对行向量求导

\frac{d \mathbf{y}}{d \mathbf{x^T}}= \Big(\frac{d \mathbf{y^T}}{d \mathbf{x}}\Big)^T = \begin{bmatrix} \frac{\partial f_1(x)}{\partial x_1} &\frac{\partial f_2(x)}{\partial x_1} &\dots & \frac{\partial f_m(x)}{\partial x_1} \\ \frac{\partial f_1(x)}{\partial x_2} &\frac{\partial f_2(x)}{\partial x_2} & \dots& \frac{\partial f_n(x)}{\partial x_2} \\ \dots & \dots & \dots & \dots \\ \frac{\partial f_1(x)}{\partial x_n} &\frac{\partial f_2(x)}{\partial x_n}&\dots &\frac{\partial f_m(x)}{\partial x_n} \end{bmatrix}^T

8.行向量对矩阵求导

\frac{d \mathbf{y}^T}{d \mathbf{X}} = \begin{bmatrix} \frac{\partial \mathbf{y}^T}{\partial x_{1 1}}&\dots&\frac{\partial \mathbf{y}^T}{\partial x_{1 n}} \\ \dots&&\dots\\ \frac{\partial \mathbf{y}^T}{\partial x_{m 1}}&\dots& \frac{\partial \mathbf{y}^T}{\partial x_{m n}} \end{bmatrix}

9.列向量对矩阵求导

\frac{d \mathbf{y}}{d \mathbf{X}} = \begin{bmatrix} \frac{\partial y_1}{\partial \mathbf{X}} \\ \frac{\partial y_2}{\partial \mathbf{X}} \\ \dots \\ \frac{\partial y_m}{\partial \mathbf{X}} \end{bmatrix}

上一篇下一篇

猜你喜欢

热点阅读