Matrix derivative of $Tr(A\log(X))$ I'm trying to work out the derivative of $Tr(A\log(X))$ with respect to $X$. Assume $X$ is positive so the $\log$ is well defined. I know that 
$$Tr(A\log(X)) = A^\dagger: \log(X)$$ 
but what I should be doing is to express it in the form $F : X$ similar to this answer so that I can take $d Tr(A(\log(X)) = F: dX$. How can I proceed? 
 A: $
\def\LR#1{\left(#1\right)}
\def\op#1{\operatorname{#1}}
\def\trace#1{\op{Tr}\LR{#1}}
\def\Diag#1{\op{Diag}\LR{#1}}
\def\diag#1{\op{diag}\LR{#1}}
\def\qiq{\quad\implies\quad}
\def\p{\partial}
\def\grad#1#2{\frac{\p #1}{\p #2}}
\def\c#1{\color{red}{#1}}
\def\CLR#1{\c{\LR{#1}}}
$For typing convenience, define
$$F = \log(X)$$
Then write the function and calculate its differential
$$\eqalign{
\phi &= A:F \qiq
d\phi &= A:\c{dF} \\
}$$
A positive definite matrix can be diagonalized with orthogonal factors
$$\eqalign{
X &= QBQ^T,\quad B=\Diag b,\quad Q^TQ=I \\
}$$
The Daleckii-Krein theorem says that
$$\eqalign{
Q^T dF\:Q &= R\odot\LR{Q^T dX\:Q} \\
dF &=Q\LR{R\odot\LR{Q^T dX\:Q}}Q^T \\
}$$
where $(\odot)$ denotes the Hadamard product.
Substituting into the previous differential yields
$$\eqalign{
d\phi &= A:\c{Q\LR{R\odot\LR{Q^T dX\:Q}}Q^T} \\
 &= Q\LR{R\odot\LR{Q^TAQ}}Q^T:dX \\
\grad{\phi}{X} &= Q\LR{R\odot\LR{Q^TAQ}}Q^T \\
}$$
All that remains is to calculate the symmetric $R$ matrix
which lies at the heart of the theorem
$$\eqalign{
R_{ij} = \begin{cases}
{\Large\frac{f(b_i)-f(b_j)}{b_i-b_j}} \qquad{\rm if}\;b_i\ne b_j \\
\\
\quad f'(b_j) \qquad\qquad {\rm otherwise} \\
\end{cases}
}$$
NB:$\:$ For the current problem
$$f(b_j) = \log(b_j),\qquad f'(b_j) = \frac{\tt1}{b_j}$$
A: $$\DeclareMathOperator{\Tr}{Tr}$$
Let $f$ be a linear map from matrices to matrices. write $f^{\mathsf{T}}$ for the unique linear map from matrices to matrices such that
$$\Tr f^{\mathsf{T}}(A)B=\Tr A f(B)$$
For a differentiable function $\phi$, write $\mathrm{d}X\mapsto \phi'_X(\mathrm{d}X)$ for its Fréchet derivative at $X$ as a matrix function, so that
$$\mathrm{d}\phi(X)=\phi'_X(\mathrm{d}X)\text{.}$$ Then
$$\begin{split}\mathrm{d}\Tr A\,\phi(X)&=\Tr A\,\mathrm{d}\phi(X)\\
&=\Tr A\,\phi_X'(\mathrm{d}X)\\
&=\Tr (\phi'_X)^{\mathsf{T}}(A)\mathrm{d}X\text{.}
\end{split}$$
If you'd like a bit more explicitness, combine
$$\log X=\int_0^{\infty}\frac{\mathrm{d}t}{t}\left(\frac{1}{1+t}-\frac{1}{1+tX}\right)$$
with
$$\mathrm{d}\left(\frac{1}{1+tX}\right)=-\frac{1}{1+tX}t\mathrm{d}X\frac{1}{1+tX}$$
to get
$$\mathrm{d}\Tr A \log X =\Tr \left(\int_0^{\infty}\frac{1}{1+tX}A\mathrm{d}t\frac{1}{1+tX}\right)\mathrm{d}X\text{.}$$
Or, if you like,
$$\int_0^{\infty}\frac{1}{1+tX}A\mathrm{d}t\frac{1}{1+tX}=\int_0^{\infty}\mathrm{d}t\int_0^1\mathrm{d}s \mathrm{e}^{-stX}A\mathrm{e}^{stX}\mathrm{e}^{-tX}\text{.}
$$
