Are there any generalization of chain rule of differentiation to tensors? For example, how can I differentiate f(g(X)) where: $g: Matrix(d_1, d_2) \to Matrix(d_3, d_4)$ and $f: Matrix(d_3, d_4) \to Matrix (d_5, d_6)$.

P.S. I understand how to compute derivative, I want a rule which takes a tensor derivative of f and a tensor derivative of g and combines them in a short step.

  • $\begingroup$ I presume "$Matrix(d_1,d_2)$" is the set of real $d_1\times d_2$ matrices? Then these are vector spaces, so you can just treat them as vector spaces. $\endgroup$ Jan 19 '18 at 5:34
  • $\begingroup$ @LordSharktheUnknown I understand how to differentiate them. I want an easy way to do this in tensor form. $\endgroup$ Jan 19 '18 at 6:03

Use Leibniz' Rule $$(M_{ij}N_{jk})_{,r}=M_{ij,r}N_{jk}+M_{ij}N_{jk,r}$$ where ${}_{,r}$ means differentiation. One writes $M_{ij}N_{jk}$ (for matrix multiplication) which is used to calculate composition.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.