A matrix inequality involving trace norm of a matrix and its inverse Let $A,B \succeq 0$ be two positive semidefinite matrices. Can we get a closed form expression for the following quantity?
$$ \inf_{X \succ 0} \mathrm{tr}(XA) + \mathrm{tr}(X^{-1}B) $$
We assume all matrices involved are symmetric.
 A: We assume that $B$ symmetric $\geq 0$ and $A,X$ symmetric $>0$. Indeed, if $\det(A)=0,\det(B)\not= 0$, then the lower bound is not reached. For example, when $A=0$, the lower bound $0$ is "reached" for $X$ s.t. $||X||=\infty$.
$\textbf{Part 1}$. Consider the function $f:X>0\rightarrow tr(XA)+tr(X^{-1}B)$. The tangent space to $S_n^{++}$ is $S_n$, the vector space of symmetric matrices. Then 
$Df_X:H\in S_n\rightarrow tr(HA)-tr(X^{-1}HX^{-1}B)=tr(H(A-X^{-1}BX^{-1}))$.
If $X$ reaches a local minimum of $f$, then $Df_X=0$, that is, $A-X^{-1}BX^{-1}$ is skew symmetric; that is equivalent to 
$A=X^{-1}BX^{-1}$ or $(*)$ $XAX-B=0$.
The Riccati equation $(*)$ has a unique symmetric $\geq 0$ solution $X_0$; since the term of degree $1$ in $X$ does not exist, there is a closed form 
$X_0=A^{-1/2}(A^{1/2}BA^{1/2})^{1/2}A^{-1/2}$.
Note that $f(X_0)=2tr((A^{1/2}BA^{1/2})^{1/2})$.
$\textbf{Part 2}$. $D^2f_X:(H,K)\in S_n\times S_n\rightarrow tr(X^{-1}KX^{-1}HX^{-1}B)+tr(X^{-1}HX^{-1}KX^{-1}B)$,
and $D^2f_X(H,H)=2tr((X^{-1}HX^{-1}HX^{-1})B)$.
The matrix $S=X^{-1}HX^{-1}HX^{-1}$ is symmetric $\geq 0$ because
$y^TSy=(HX^{-1}y)^TX^{-1}(HX^{-1}y)\geq 0$.
Then $D^2f_X(H,H)=2tr(SB)\geq 0$ and $f$ is convex (recall that $S_n^{++}$ is convex). Finally, $f(X_0)$ is the required minimum because (for a convex function $f$), $Df_{X_0}=0$ implies that $inf(f)=f(X_0)$.
A: This is a partial answer only for commuting $A,B$. We claim that the infimum is attained by $2 tr \sqrt{AB}$. Since $A$ and $B$ are symmetric commuting matrices, we can assume without loss of generality that they are diagonal real matrices. 
We prove our claim by induction on $n$. For $n=1$, the claim is easily checked. Suppose the claim is true for $n$ and suppose that $A$ and $B$ are diagonal $(n+1)\times (n+1)$ matrices with diagonal entries $a$ and $b$ at the bottom-right corners. We denote the top-left $n\times n$ blocks in $A$ and $B$ by $A'$ and $B'$. 
Let $Z$ be an arbitrary positive definite $(n+1)\times (n+1)$ matrix. Write $Z$ and its inverse as
$$Z=\begin{bmatrix} X & U \\ U^T & x \end{bmatrix},Z^{-1}=\begin{bmatrix}Y & V \\ V^T & y \end{bmatrix},$$
where $X$ and $Y$ are $n\times n$ positive definite matrices. 
Therefore, we have these equaitons:
$$XY+UV^T=I,XV+yU=0,U^TY+xV^T=0,U^TV+xy=1.$$
From these equations and some algebra, we conclude that
$$Y=X^{-1}+\dfrac{1}{y}VV^T,~x=\dfrac{1}{y}-\dfrac{1}{y}U^TV.$$
Since $X$ is positive definite, we have 
$$V^TXV \geq 0 \Rightarrow yV^TU=-V^TXV \leq 0.~~~~~~~~~~~~~~~(1)$$
Next, we compute $tr(ZA+Z^{-1}B)$ as follows:
$$tr(ZA+Z^{-1}B)=tr(XA+YB)+xa+yb=tr(XA+(X^{-1}+\dfrac{1}{y}VV^T)B)+xa+yb$$
$$=tr(XA+X^{-1}B)+\dfrac{1}{y}tr(VV^TB)+(\dfrac{1}{y}-\dfrac{1}{y}U^TV)a+yb$$
$$=tr(XA+X^{-1}B)+ \dfrac{1}{y}a+yb +\dfrac{1}{y}tr(VV^TB) -\dfrac{a}{y}U^TV$$
$$\geq 2 tr\sqrt{A'B'}+2\sqrt{ab}+\dfrac{1}{y}tr(V^TBV) -\dfrac{a}{y}U^TV$$
$$\geq 2 tr \sqrt{AB},$$
since $tr(V^TBV)\geq 0$ and $yU^TV \leq 0$ by (1). Note that $x,y>0$ since diagonal entries of a symmetric positive definite matrix are all positive. 
Also it is easy to see that the value $2 tr \sqrt{AB}$ can be attained by letting $X$ be a diagonal matrix with diagonal entries $x_i=\sqrt{b_i/a_i}$ if $a_i \neq 0$ and $x_i \rightarrow \infty$ otherwise. 
