How to compute $\frac{\partial}{\partial X}tr(BXX^tA)$?

70 Views Asked by At

I know that $\frac{\partial}{\partial X}tr(BXX^t) = BX + B^tX$ according to the matrix cookbook equation 109.

However, I need to calculate $\frac{\partial}{\partial X}tr(BXX^tA)$. Is there a simple way to derive this formula from the previous one?

1

There are 1 best solutions below

0
On BEST ANSWER

The trace is traditionally defined for a square matrix. Assuming that is the case, let $B \in \mathbb{R}^{k \times n}$, $X \in \mathbb{R}^{n \times p}$, and $A \in \mathbb{R}^{n \times k}$. Then by commutative property of trace

\begin{align*} tr(BXX^{\top}A) = tr(ABXX^{\top}) = tr(CXX^{\top}) \end{align*}

for $C = AB \in \mathbb{R}^{n \times n}$. From there, you can directly apply the derivative equation. The definition of trace and its commutative property should be easily encountered by any math or applied math major ;)