0

Say A and B are two matrices of dimensions such that A can be multiplied by B. I am trying to calculate $\frac{\partial AB}{\partial B}$.

While it is well-known $\frac{\partial AB}{\partial A} = B^T$, but I couldn't find anything on my question.

I tried using chain-rule in various ways, but nothing seemed to work. An alternative question could be, what is known about the transpose of a partial derivative (i.e. does it hold that $\frac{\partial x}{\partial y} = [\frac{\partial x^T}{\partial y^T}]^T)$ or something like that that can be used along with chain rule to solve the problem?).

Thanks in advance to anyone who would answer!

  • The first answer might help: https://math.stackexchange.com/questions/1866757/not-understanding-derivative-of-a-matrix-matrix-product – oli H. Aug 30 '23 at 14:12

1 Answers1

0

Define an isotropic fourth-tensor in terms of Kronecker delta symbols $$\eqalign{ \def\E{{\cal E}} \def\G{{\cal S}} \def\H{{\cal D}} \def\T{{\cal T}} \def\A{{\cal A}} \def\B{{\cal B}} \def\d{\delta} \def\LR#1{\left(#1\right)} \def\qiq{\quad\implies\quad} \def\p{\partial} \def\grad#1#2{\frac{\p #1}{\p #2}} \E_{ikjl} &= \d_{ij}\,\d_{kl} \\ }$$ When doubly contracted with an arbitrary matrix $\,(A)\,$ it acts as the identity tensor $$\eqalign{ A:\E &= \E:A = A \\ }$$ When singly contracted it exhibits useful rearrangement properties $$\eqalign{ A\cdot B\cdot C \;=\; \LR{A\cdot\E\cdot C^T}:B \;=\; B:\LR{A^T\cdot\E\cdot C} \\ }$$ Applying this to your problem $$\eqalign{ F &= A\cdot B \\ dF &= dA\cdot B \;=\; \LR{\E\cdot B^T}:dA \\ \grad FA &= {\E\cdot B^T} \\ }$$ Or in component form $$\eqalign{ \grad{F_{ij}}{A_{kl}} &= \sum_p \E_{ijkp} B^T_{pl} \\ &= \sum_p \d_{ik}\d_{jp}\,B_{lp} \\ &= \d_{ik}\,B_{lj} \\ }$$


In general, the double and single contraction products are defined as $$\eqalign{ \H = \A:\B &\qiq \H_{ijmn} = \sum_k\sum_l \A_{ijkl}B_{klmn} \\ \G = \A\cdot\B &\qiq \G_{ijkmnp} = \sum_l \A_{ijkl}B_{lmnp} \\ }$$ The rightmost indices of the first tensor are summed with the leftmost indices of the second tensor, in the same order.

This idea can be extended to further contractions, e.g. a triple contraction would be $$\eqalign{ \T = \A\therefore\B \qiq \T_{im} = \sum_j\sum_k\sum_l \A_{ijkl}B_{jklm} \\ }$$

greg
  • 35,825