Solving a matrix equation with unknown inside trace

339 Views Asked by At

Given $n \times n$ symmetric matrices $A, B, C$, how to solve the following matrix equation in $n \times n$ matrix $X$?

$$\mbox{tr} (AX) B + \mbox{tr} (BX) C + \mbox{tr} (CX) A = \mbox{tr} (AX) C + \mbox{tr} (BX) A + \mbox{tr} (CX) B$$

2

There are 2 best solutions below

0
On BEST ANSWER

Rewrite the equation as $$ \operatorname{tr}\left((A-C)X\right)B +\operatorname{tr}\left((B-A)X\right)C +\operatorname{tr}\left((C-B)X\right)A=0.\tag{1} $$ When $A,B,C$ are linearly independent, we must have $$ \operatorname{tr}\left((A-C)X\right) =\operatorname{tr}\left((B-A)X\right) =\operatorname{tr}\left((C-B)X\right)=0. $$ Since the three traces always sum up to zero, the above is equivalent to $\operatorname{tr}\left((A-C)X\right)=\operatorname{tr}\left((B-A)X\right)=0$. Thus the equation is equivalent to one in the form of $$ \operatorname{tr}(PX)=\operatorname{tr}(QX)=0\tag{2} $$ for some constant matrices $P$ and $Q$.

When $\dim\operatorname{span}\{A,B,C\}=2$, by writing one of $A,B,C$ as a linear combination of the other two, $(1)$ can also be rewritten in the form of $(2)$ (for some other $P$ and $Q$, of course). Therefore, the general solution can hence be obtained from any $\operatorname{vec}(X)$ in the null space of $\pmatrix{\operatorname{vec}(P^T)&\operatorname{vec}(Q^T)}^T$ when $\dim\operatorname{span}\{A,B,C\}\ge2$.

Similarly, when $\dim\operatorname{span}\{A,B,C\}\le1$, $(1)$ reduces to $\operatorname{tr}(PX)=0$ for some appropriate matrix $P$. Therefore, the general solution in this case is obtained from any $\operatorname{vec}(X)$ in the null space of $\operatorname{vec}(P^T)^T$.

0
On

Define the linear map $f: \operatorname{Mat}_n \to \operatorname{Mat}_n$, by $$ f(X) = \operatorname{tr}((A-C)X)B + \operatorname{tr}((B-A)X)C + \operatorname{tr}((C-B)X)A.$$ Then, the solution to the problem is the kernel of $f$. We can see that the image of $f$ is always a symmetric matrix, and so the image is at most $\left(\frac{1}{2} n^2 + \frac{1}{2}n\right)$-dimensional, hence the kernel of $f$ is at least $\left( \frac{1}{2}n^2 - \frac{1}{2}n\right)$-dimensional, so there will always be solutions for $n \geq 2$.

You could find the solutions by writing down the linear map $f$ in some basis, and finding its null space.