Jump to content

matrix trace derivatives

Featured Replies

Hope this is in the right section. Having trouble ironing out an apparent inconsistency in matrix trace derivative rules.

 

Two particular rules for matrix trace derivatives are

 

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

 

and

 

[math] \frac{\partial}{\partial\mathbf{X}} Tr(\mathbf{X}\mathbf{A}\mathbf{X}^T)=\mathbf{X}\mathbf{A}^T+\mathbf{X}\mathbf{A}[/math]

 

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

 

However, the first rule returns the derivative

 

[math]- (\mathbf{X}\mathbf{A}+\mathbf{A}\mathbf{X})[/math]

 

and the second returns

 

[math] 2\mathbf{X}\mathbf{A}[/math].

 

The two matrices do not commute, so the results are different. Am I missing something?

Perhaps there is a typo in your rules? Where did you get them from? And are you sure that A and X are arbitrary matrices or at least allowed to be symmetric and antisymmetric, respectively?

Archived

This topic is now archived and is closed to further replies.

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.