Differenzierensregeln für Matrizen

Differenzierensregeln für Matrizen

Für eine Matrix C\mathbf{C} gilt

C(aCb)=ab \frac{\partial}{\partial \mathbf{C}}\left(\underline{a}^{\top} \cdot \mathbf{C} \cdot \underline{b}\right)=\underline{a} \cdot \underline{b}^{\top}

Beispiel

Q=[a1a2]a[c11c12c21c22][b1b2]b=a1b1c11+a2b1c21+a1b2c12+a2b2c22=ab Q=\underbrace{\left[\begin{array}{ll} a_{1} & a_{2} \end{array}\right]}_{\boldsymbol{a}^\top}\left[\begin{array}{ll} c_{11} & c_{12} \\ c_{21} & c_{22} \end{array}\right]\underbrace{\left[\begin{array}{l} b_{1} \\ b_{2} \end{array}\right]}_{\boldsymbol{b}}=a_{1} b_{1} \cdot c_{11}+a_{2} b_{1} c_{21}+a_{1} b_{2} c_{12}+a_{2} b_{2} c_{22} = \boldsymbol{a} \cdot \boldsymbol{b}^\top QC=[QC12QC12QC21QC22]=[a1b1a1b2a2b1a2b2]=[a1a2][b1b2] \frac{\partial Q}{\partial \mathbf{C}}=\left[\begin{array}{ll} \frac{\partial Q}{\partial C_{12}} & \frac{\partial Q}{\partial C_{12}} \\ \frac{\partial Q}{\partial C_{21}} & \frac{\partial Q}{\partial C_{22}} \end{array}\right]=\left[\begin{array}{ll} a_{1} b_{1} & a_{1} b_{2} \\ a_{2} b_{1} & a_{2} b_{2} \end{array}\right]=\left[\begin{array}{l} a_{1} \\ a_{2} \end{array}\right]\left[\begin{array}{ll} b_{1} & b_{2} \end{array}\right]

Für eine symmetrische Matrix C\mathbf{C}:

  • Mit a=e\underline{a}=\underline{e} und b=De\underline{b} = D \cdot \underline{e}:

    C(eCDe)=eeD \frac{\partial}{\partial \mathbf{C}} (\underline{e}^\top \mathbf{C} D \underline{e}) = \underline{e} \cdot \underline{e}^\top \cdot D^\top
  • Mit a=De\underline{a}=D \cdot \underline{e} und b=e\underline{b} = \underline{e}:

    C(eDCe)=Dee \frac{\partial}{\partial \mathbf{C}} (\underline{e}^\top D^\top \mathbf{C} \underline{e}) = D\cdot \underline{e}\cdot \underline{e}^\top
K(aKCKb)=abKC+baKC \frac{\partial}{\partial \mathbf{K}}\left(\boldsymbol{a}^{\top} \cdot \mathbf{K} \cdot \mathbf{C} \cdot \mathbf{K}^{\top} \boldsymbol{b} \right)=\boldsymbol{a} \boldsymbol{b}^{\top} \mathbf{K} \mathbf{C}^{\top}+\boldsymbol{b} \boldsymbol{a}^{\top} \mathbf{K} \mathbf{C}

Seien a=e,b=e\boldsymbol{a} = \boldsymbol{e}, \boldsymbol{b} = \boldsymbol{e}, C\mathbf{C} symmetrisch, dann gilt

K(eKCKe)=eeKC+eeKC=2eeKC \frac{\partial}{\partial \mathbf{K}}\left(\boldsymbol{e}^{\top} \cdot \mathbf{K} \cdot \mathbf{C} \cdot \mathbf{K}^{\top} \boldsymbol{e} \right)=\boldsymbol{e} \boldsymbol{e}^{\top} \mathbf{K} \mathbf{C}^{\top}+\boldsymbol{e} \boldsymbol{e}^{\top} \mathbf{K} \mathbf{C} = 2\boldsymbol{e} \boldsymbol{e}^{\top} \mathbf{K} \mathbf{C}