Derivative of matrix products

112 Views Asked by At

Let $a\in\mathbb{R}^{1\times2}, X\in\mathbb{R}^{2n\times 2m}$, and $b\in\mathbb{R}^{2m}$. How can I calculate

$$\frac{\partial[(a\otimes I_n)Xb]}{\partial X}$$

where $\otimes$ denotes the Kronecker product?

2

There are 2 best solutions below

3
On

You can apply the formula $\dfrac{\partial AXB}{\partial X} = B^T \otimes A$ for $A = a \otimes I_n$ and $B=b$. Then $$\dfrac{\partial[(a\otimes I_n)Xb]}{\partial X} = b^T \otimes (a\otimes I_n) \ .$$

0
On

Let linear function $\mathrm f : \mathbb R^{m \times n} \to \mathbb R^p$ be defined by

$$\mathrm f (\mathrm X) := \mathrm A \mathrm X \mathrm b$$

Vectorizing, we obtain a $\mathbb R^{m n} \to \mathbb R^p$ linear function in $\mbox{vec} (\mathrm X)$

$$\mbox{vec} (\mathrm A \mathrm X \mathrm b) = \left( \color{blue}{\mathrm b^{\top} \otimes \mathrm A} \right) \mbox{vec} (\mathrm X)$$

where $\mathrm b^{\top} \otimes \mathrm A$ is the $p \times m n$ Jacobian matrix of the $\mathbb R^{m n} \to \mathbb R^p$ function.