How to compute the subdifferential of a variational represention of the trace norm? Let $f : {\cal S}_+^n \mapsto \mathbb{R}$ be a function defined as 
$f(Q) := {\rm tr} WQ^{-1}W + {\rm tr} Q$
where $W \in {\cal S}_{+}^{n}$ is a symmetric positive definite matrix.
How to compute a subdifferential of $f$ at a point $Q \in {\cal S}_+^n$ for which $f(Q) < \infty$? 
Note that $f(Q) = \infty$ for $Q$ such that range of $W$ is not contained within the range of Q. Furthermore, we know that $\min_{Q \in {\cal S}_+^n} f(Q) = 2{\rm tr}W$ which is obtained at $Q = W$.
 A: I use the following definition of the  matrix derivative of $f(Q)$
$(\delta f)(Q) = \lim_{t \to 0} f(Q+t \delta Q)-f(Q)$ 
where, $ \delta Q $ is a symmetric not necessarily positive definite matrix.
It is important to notice that the matrix derivative operator $\delta$ obeys the Leibniz rule.
Furthermore, in the following,  the cyclicity of the trace, and the identity
$\delta Q^{-1} = - Q^{-1} \delta Q Q^{-1}$ obtained from the matrix differentiation of $Q Q^{-1} = 1$ are used. 
The first matrix derivative of $f(Q)$ is given by:
$\delta f(Q) = tr(-W Q^{-1} \delta Q Q^{-1} W + \delta Q )= tr((-Q^{-1} W^2 Q^{-1}+1) \delta Q  )$ 
Therefore, the condition $\delta f(Q) = 0$, implies:
$-Q^{-1} W^2 Q^{-1} = 1$
which is equivalent to:
$Q^2 = W^2 $.
Now, $Q = W $ is the only solution, because both $Q$ and $W$ are defined to be positive definite. To verify that this solution is a minimum,
we check the second matrix derivative is positive for an arbitrary $\delta Q$:
$\delta^2 f(Q) = tr((Q^{-1} \delta Q Q^{-1} W^2 Q^{-1}+Q^{-1}  W^2 Q^{-1}\delta Q Q^{-1}) \delta Q  ) = 2 tr(Q^{-1} (\delta Q)^2)$ 
Where, the second equality is obtained after the substitution of the solution. 
