In the paper Log-Euclidean metrics for fast and simple calculus on diffusion tensors, the geodesic distance between SPD matrices $A,B$ is defined as $$d(A,B)=||\log A- \log B||_F,$$ where $F$ is the Frobenius norm. I did not find more information on the other aspects of the Riemannian structure.
I am interested in the gradient (on Riemannian manifold) of the distance function $$ f(X) = d(X,A_0). $$ I am not familiar with geometry other than some basics, $\langle grad f,X\rangle = Xf $ for all smooth vector field $X$.
How can I derive $grad f$?
This could be derived step by step, using chain rules
Getting rid of the square $$ \frac{\partial d(A(t),B)}{\partial t} = \frac{1}{2} d^{-1/2}\cdot 2tr((A-B)^T\frac{\partial A}{\partial t}) = d^{-1/2}tr((A-B)^T\frac{\partial A}{\partial t}) $$
matrix logrithm (See Derivative of matrix logarithm) $$ \frac{\partial \log(X(t))}{\partial t} = X(t)^{-1} \frac{\partial X(t)}{\partial t} $$ We can think of the entry $X_{ij}$ as a parameter of $X$, then we get $$\frac{\partial X(t)}{\partial X_{ij}}=E_{ij}$$ .$E_{ij}$ is a matrix which only $i,j$ element is 1, others are all $0$.
Using chain rule
$$ \frac{\partial d(X,A_0)^2}{\partial X_{ij}} =\partial_{X_{ij}} \|\log X -\log A_0\|^2_F \\ = 2tr\left((\log X -\log A_0)^T \frac{\partial \log X}{\partial X}\frac{\partial X} {\partial X_{ij}}\right)\\ =2 tr\left((\log X -\log A_0)^T (X^{-1}E_{ij})\right) $$
Note that the effect $E_{ij}$ in the trace operator is quite unique Since $$ tr(A^TB) = \sum{ij} A_{ij}B_{ij}\\ tr(M^TE_{kl}) = \sum{ij} M_{ij}E_{ij} = M_{kl} $$ $E_{ij}$ works as a delta function in getting the entry.
Thus taking the element wise derivative together and form a matrix $$ \left(\frac{\partial d(X,A_0)^2}{\partial X}\right)_{ij} = 2 tr((\log X -\log A_0)^T (X^{-1}E_{ij}))\\ \frac{\partial d(X,A_0)^2}{\partial X} = 2 X^{-1}(\log X -\log A_0)\\ \frac{\partial d(X,A_0)}{\partial X} = d^{-1/2} X^{-1}(\log X -\log A_0) $$