向量的导数
A A A为 m × n m \times n m×n的矩阵, x x x为 n × 1 n \times 1 n×1的列向量,则 A x Ax Ax为 m × 1 m \times 1 m×1的列向量,记作 y ⃗ = A ⋅ x ⃗ \vec y = A \cdot \vec x y=A⋅x
A = [ a 11 a 12 ⋯ a 1 n a 21 a 22 ⋯ a 2 n ⋮ ⋮ ⋮ ⋮ a m 1 a m 2 ⋯ a m n ] x ⃗ = [ x 1 x 2 ⋮ x n ] y ⃗ = A ⋅ x ⃗ = [ a 11 x 1 + a 12 x 2 + ⋯ + a 1 n x n a 21 x 1 + a 22 x 2 + ⋯ + a 2 n x n ⋮ a m 1 x 1 + a m 2 x 2 + ⋯ + a m n x n ] A = \begin{bmatrix} a_{11} & a_{12} & \cdots & a_{1n} \\ a_{21} & a_{22} & \cdots & a_{2n} \\ \vdots & \vdots & \vdots & \vdots \\ a_{m1} & a_{m2} & \cdots & a_{mn} \end{bmatrix} \\ ~ \\ \vec x = \begin{bmatrix} x_1 \\ x_2 \\ \vdots \\ x_n \end{bmatrix} \\ ~ \\ \vec y = A \cdot \vec x = \begin{bmatrix} 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 \\ \vdots \\ a_{m1}x_1 + a_{m2}x_2 + \cdots + a_{mn}x_n \end{bmatrix} A=⎣⎢⎢⎢⎡a11a21⋮am1a12a22⋮am2⋯⋯⋮⋯a1na2n⋮amn⎦⎥⎥⎥⎤ x=⎣⎢⎢⎢⎡x1x2⋮xn⎦⎥⎥⎥⎤ y=A⋅x=⎣⎢⎢⎢⎡a11x1+a12x2+⋯+a1nxna21x1+a22x2+⋯+a2nxn⋮am1x1+am2x2+⋯+amnxn⎦⎥⎥⎥⎤
∂ y ⃗ ∂ x ⃗ = ∂ A ⋅ x ⃗ ∂ x ⃗ = [ a 11 x 1 + a 12 x 2 + ⋯ + a 1 n x n x 1 a 21 x 1 + a 22 x 2 + ⋯ + a 2 n x n x 1 ⋯ a m 1 x 1 + a 1 m 2 x 2 + ⋯ + a m n x 1 x 1 a 11 x 1 + a 12 x 2 + ⋯ + a 1 n x n x 2 a 21 x 1 + a 22 x 2 + ⋯ + a 2 n x n x 2 ⋯ a m 1 x 1 + a m 2 x 2 + ⋯ + a m n x n x 2 ⋮ ⋮ ⋮ ⋮ a 11 x 1 + a 12 x 2 + ⋯ + a 1 n x n x n a 21 x 1 + a 22 x 2 + ⋯ + a 2 n x n x n ⋯ a m 1 x 1 + a m 2 x 2 + ⋯ + a m n x n x n ] = [ a 11 a 21 ⋯ a m 1 a 12 a 22 ⋯ a m 2 ⋮ ⋮ ⋮ ⋮ a 1 n a 2 n ⋯ a m n ] = A T \frac{\partial \vec y}{\partial \vec x} = \frac{\partial A \cdot \vec x}{\partial \vec x} = \begin{bmatrix} \frac{a_{11}x_1 + a_{12}x_2 + \cdots + a_{1n}x_n}{x_1} & \frac{a_{21}x_1 + a_{22}x_2 + \cdots + a_{2n}x_n}{x_1} & \cdots & \frac{a_{m1}x_1 + a_{1m2}x_2 + \cdots + a_{mn}x_1}{x_1}\\ \frac{a_{11}x_1 + a_{12}x_2 + \cdots + a_{1n}x_n}{x_2} & \frac{a_{21}x_1 + a_{22}x_2 + \cdots + a_{2n}x_n}{x_2} & \cdots & \frac{a_{m1}x_1 + a_{m2}x_2 + \cdots + a_{mn}x_n}{x_2}\\ \vdots & \vdots & \vdots& \vdots \\ \frac{a_{11}x_1 + a_{12}x_2 + \cdots + a_{1n}x_n}{x_n} & \frac{a_{21}x_1 + a_{22}x_2 + \cdots + a_{2n}x_n}{x_n} & \cdots & \frac{a_{m1}x_1 + a_{m2}x_2 + \cdots + a_{mn}x_n}{x_n}\\ \end{bmatrix} \\ ~ \\ = \begin{bmatrix} a_{11} & a_{21} & \cdots & a_{m1} \\ a_{12} & a_{22} & \cdots & a_{m2} \\ \vdots & \vdots & \vdots & \vdots \\ a_{1n} & a_{2n} & \cdots & a_{mn} \end{bmatrix} = A^T ∂x∂y=∂x∂A⋅x=⎣⎢⎢⎢⎡x1a11x1+a12x2+⋯+a1nxnx2a11x1+a12x2+⋯+a1nxn⋮xna11x1+a12x2+⋯+a1nxnx1a21x1+a22x2+⋯+a2nxnx2a21x1+a22x2+⋯+a2nxn⋮xna21x1+a22x2+⋯+a2nxn⋯⋯⋮⋯x1am1x1+a1m2x2+⋯+amnx1x2am1x1+am2x2+⋯+amnxn⋮xnam1x1+am2x2+⋯+amnxn⎦⎥⎥⎥⎤ =⎣⎢⎢⎢⎡a11a12⋮a1na21a22⋮a2n⋯⋯⋮⋯am1am2⋮amn<