2

What is the derivative of $trace(|A|)$ with respect to $A$ ?
where:
$|A|$ represents absulote value of $A$
and $A$ is an $n \times n$ matrix

$\mathbf{Or}$

What is the derivative of $trace(A\ .* \ A)$ with respect to $A$ ?
$A\ .* \ A$ represents elementwise production of $A$

Mohsen
  • 93

1 Answers1

2

Locally $g:A\mapsto |A|$ is linear. Therefore $d(Tr\circ g)_A(H) = Tr(JH)$ where $J$ is the diagonal matrix giving the signs ($\pm 1$) of the diagonal coefficient (if they are 0, it's not differentiable).

Astyx
  • 3,883
  • What I understand, if for example, $A = \begin{bmatrix} 2 & 1\ 3 & -1 \end{bmatrix}\ $then $\ \frac{\partial trace(|A|)}{\partial A}= trace \left(\begin{bmatrix} 1 & 0\ 0 & -1 \end{bmatrix}\right) = 0$
    Is it right?
    – Mohsen Apr 16 '17 at 14:13
  • 1
    Not quite, ${\partial \operatorname{trace}(|A|)\over \partial A}(H) = \operatorname{trace}(JH) = h_{1,1} - h_{2,2}$ where $J$ is the matrix you wrote on the right. – Astyx Apr 16 '17 at 14:15
  • Excuse me, what is $H$? – Mohsen Apr 16 '17 at 14:18
  • 1
    Any $2\times 2$ matrix. The differential of a function taking a matrix as variable is a linear operator (whiches variable I chose to denote $H$), not a number. – Astyx Apr 16 '17 at 14:27