# How to compute the derivative of $\frac{\partial AB^T }{\partial{A}}$ and $\frac{\partial AB^T }{\partial{B}}$

How to compute the derivative of $$\frac{\partial AB^T }{\partial{A}}$$ and $$\frac{\partial AB^T }{\partial{B}}$$

where $$A \in R^{m \times n}$$ and $$B \in R^{r \times n}$$.

Also, how can we analysis the dimension of final result? such as $$\frac{\partial AB^T }{\partial{A}}$$ is a matrix or tensor?

Thanks a lot.

• It will be 4th order tensor – user550103 May 4 '19 at 17:08

Write the function using index notation (with the summation convention). \eqalign{ F_{ik} &= A_{ij} B_{jk}^T = A_{ij} B_{kj} \\ dF_{ik} &= dA_{ij}\,B_{kj} + A_{ij}\,dB_{kj} \\ } Holding $$B$$ constant (i.e. $$dB_{kj}=0$$) yields the derivative with respect to $$A$$. \eqalign{ \frac{\partial F_{ik}}{\partial A_{pq}} &= (\delta_{ip}\delta_{jq})\,B_{kj} = \delta_{ip}\,B_{kq} \\ } Similarly holding $$A$$ constant yields the derivative with respect to $$B$$. \eqalign{ \frac{\partial F_{ik}}{\partial B_{pq}} &= A_{ij}\,(\delta_{kp}\delta_{jq}) = A_{iq}\,\delta_{kp} \\ } These derivatives require 4 indices for their description. So they are not matrices but 4th order tensors.