TITLE: Solving matrix equation involving trace
QUESTION [5 upvotes]: Let $A$ and $B$ be two symmetric and positive definite matrices and $c\in \mathbb{R}$. Consider the following matrix equation ($A$, $B$, and $c$ are known):
$$A=X+c^2\,tr(BX)B$$ 
Solution of the equation can be obtained by using $vec$ operator and it is clear that it is symmetric. Is it positive definite? It seems the answer is "yes", but how can I prove it?

REPLY [5 votes]: Instead of vectorizing the matrices, it's nicer to rewrite to
$$BX=BA−c^2\operatorname{tr}(BX)B^2$$
then set $\lambda =\operatorname{tr} BX$ to get
$$\lambda =\operatorname{tr}(BA−c^2\lambda B^2)=\operatorname{tr}BA−c^2\lambda \operatorname{tr}B^2$$
which you can then solve for $\lambda$ and plug into the original equation to get $$X = A - \frac{c^2 \operatorname{tr} BA}{1+c^2\operatorname{tr} B^2}B$$
Having this expression, it is not difficult to puzzle out a case where $X$ is not positive definite, for example
$$ A = \begin{pmatrix}5&0\\0&1\end{pmatrix} \quad
B=\begin{pmatrix}1&0\\0&1\end{pmatrix} \quad
c=1 \qquad
X=\begin{pmatrix}3&0\\0&-1\end{pmatrix} $$