Let $A,B\succeq 0$ be two p.s.d. matrices. What is the derivative of $\mathrm{tr}((A^{1/2}BA^{1/2})^{1/2})$ w.r.t $A$?
- 23,788
- 365
-
Nice problem. Any ideas? – A. Pongrácz Aug 18 '18 at 12:51
-
@A.Pongrácz Tried to use the chain rule and some results in the matrix cookbook... – O. Richard Aug 18 '18 at 12:52
-
All right then, good luck! – A. Pongrácz Aug 18 '18 at 12:53
-
@A.Pongrácz Got stuck in dealing with the square root. – O. Richard Aug 18 '18 at 12:54
-
what is the meaning of derivative with respect to a matrix? – Multigrid Aug 18 '18 at 13:10
-
1@PerelmanJr The derivative w.r.t each of the element. See https://www.math.uwaterloo.ca/~hwolkowi/matrixcookbook.pdf. – O. Richard Aug 18 '18 at 13:31
1 Answers
We assume that $B$ is symmetric $>0$ ($B\in S_n^{++}$) and we consider the functions $f:X\in S_n^{++}\rightarrow Y=X^{1/2}BX^{1/2},g:Y\in S_n^{++}\rightarrow tr(Y^{1/2}),h=g\circ f$.
$\textbf{Proposition 1}$. There is no closed form for $Dh_X$.
$\textbf{Proof}$. Note that $Dg_Y:K\in S_n\rightarrow 1/2tr(KY^{-1/2})$; indeed, LOCALLY, $Y^{1/2}=\sum_{i=0}^{\infty}a_iY^i$; the key is
$(tr(Y^i))'=tr(\sum_{p< i} Y^pY'Y^{i-p-1})=itr(Y'Y^{i-1})$ (since $Y'$ is always at the left place, we may use a term by term differentiation of the series giving $Y^{1/2}$). Beware, $(Y^{1/2})'$ has no closed form!!
If $H\in S_n$, then $Dh_X(H)=1/2tr(KY^{-1/2})$ where $K=Df_X(H)$; the problem stands here. Note that $Y'=(X^{1/2})'BX^{1/2}+X^{1/2}B(X^{1/2})'$ is a sum of two series, the terms of the first being in the form $X^pX'X^{i-p-1}BX^{1/2}$; finally $h'(X)$ contains terms in the form
$tr(X^pX'X^{i-p-1}BX^{1/2}Y^{-1/2})=tr(X'X^{i-p-1}BX^{1/2}Y^{-1/2}X^p)$.
Now, we cannot join the factors $X^{i-p-1}$ and $X^p$ (except if $X$ goes through $C(B)\cap S_n^{++}$, where $C(B)$ is the vector space of matrices that commute with $B$) and we cannot (in general) use a term by term differentiation. $\square$
We deduce that follows
$\textbf{Proposition 2}$. Let $\bar{h}:X\in C(B)\cap S_n^{++}\rightarrow h(X)=tr(X^{1/2}B^{1/2})$.
Then $D\bar{h}_X:H\in C(B)\cap S_n\rightarrow 1/2tr(HX^{-1/2}B^{1/2})$.