PDA

View Full Version : matrix trace derivatives


em12
Aug12-11, 08:40 AM
Hope this is the right section. I'm having trouble ironing out an apparent inconsistency in matrix trace derivative rules.

Two particular rules for matrix trace derivatives are

\frac{\partial}{\partial\mathbf{X}} Tr(\mathbf{X}^2\mathbf{A})=(\mathbf{X} \mathbf{A}+\mathbf{A} \mathbf{X})^T

and

\frac{\partial}{\partial\mathbf{X}} Tr(\mathbf{X}\mathbf{A}\mathbf{X}^T)=\mathbf{X} \mathbf{A}^T+\mathbf{X}\mathbf{A}

Now assume that \mathbf{A} is diagonal (or maybe even just symmetric) and \mathbf{X} is anti-symmetric. Then by the cyclic property of the trace, -Tr(\mathbf{X}^2\mathbf{A})=Tr(\mathbf{X}\mathbf{A} \mathbf{X}^T). So the two derivatives should be equal up to a minus sign, no?

However, the first rule returns the derivative

- (\mathbf{X}\mathbf{A}+\mathbf{A}\mathbf{X})

and the second returns

2\mathbf{X}\mathbf{A}.


Am I missing something?

Stephen Tashi
Aug14-11, 10:10 AM
I don't know the answer to your question, but it prompted me to look at the "Matrix calculus" article in the Wikipedia. If you look at the "discussion" page for that article, you see some interesting comments that say (to me) that the notation for taking the derivative with respect to a matrix is not completely standardized. If you explain the system of notation that you are using, perhaps someone will answer your question.