0
$\begingroup$

I am very new to matrix calculus, but I can't seem to figure this out. Suppose $\pmb{X}$ is a non-square $m \times n$ matrix and $\pmb{Y}$ is a symmetrical positive definite $n \times n$ matrix that is not a function of $\pmb{X}$. I need to differentiate: $$ \frac{\partial }{\partial \mathrm{vec}\left( \pmb{X} \right)} \mathrm{vec}\left( \pmb{X} \pmb{Y} \pmb{X}^{\top} \right) $$ which should lead to a $n^2 \times nm$ matrix I think. My first thought was to make use of $\mathrm{vec}\left( \pmb{X} \pmb{Y} \pmb{X}^{\top} \right) = (\pmb{X} \otimes \pmb{X}) \mathrm{vec}(\pmb{Y})$, but post-multiplying $\mathrm{vec}(\pmb{Y})$ with any result of differentiating $\pmb{X} \otimes \pmb{X}$ with respect to $\mathrm{vec}\left( \pmb{X} \right)$ doesn't seem to give a reult of the right dimensions.

$\endgroup$
  • $\begingroup$ Differentiating with respect to a function seems to be fraught with issues... $\endgroup$ – copper.hat Feb 11 at 18:23
3
$\begingroup$

Consider the vector $$\eqalign{ w &= {\rm vec}(XYZ) \cr &= (Z^TY^T\otimes I)\,{\rm vec}(X) &= (Z^T\otimes X)\,{\rm vec}(Y) &= (I\otimes XY)\,{\rm vec}(Z) \cr &= (Z^TY^T\otimes I)\,x &= (Z^T\otimes X)\,y &= (I\otimes XY)\,z \cr }$$ and its differential $$\eqalign{ dw &= (Z^TY^T\otimes I)\,dx + (Z^T\otimes X)\,dy + (I\otimes XY)\,dz \cr }$$ Now assume $Y$ is constant and $Z=X^T$, i.e. $$dy=0,\quad dz=K\,dx$$ where $K$ is the Commutation Matrix associated with the vec-operation.

Substituting this into the differential expression yields $$\eqalign{ dw &= \Big(\big(XY^T\otimes I\big) + \big(I\otimes XY\big)K\Big)\,dx \cr \frac{\partial w}{\partial x} &= \big(XY^T\otimes I\big) + \big(I\otimes XY\big)K \cr }$$

$\endgroup$
  • $\begingroup$ This is great! Thanks! $\endgroup$ – Sacha Epskamp Feb 11 at 20:09
  • 1
    $\begingroup$ Just a question, shouldn't the + signs in the first three lines be = signs instead? $\endgroup$ – Sacha Epskamp Feb 11 at 20:49
  • $\begingroup$ You're absolutely correct! I've replaced them with = signs. $\endgroup$ – lynn Feb 12 at 1:55

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.