I have the following trace equality:
$\operatorname{tr}(XA)+BX^TC=D $
Where $X\in\mathbb{R}^{m\times r}$, $A\in\mathbb{R}^{r\times m}$, $B\in\mathbb{R}^{1\times r}$, $C\in\mathbb{R}^{m\times 1}$, $D\in\mathbb{R}$.
Is there a way to find $X$?
I have the following trace equality:
$\operatorname{tr}(XA)+BX^TC=D $
Where $X\in\mathbb{R}^{m\times r}$, $A\in\mathbb{R}^{r\times m}$, $B\in\mathbb{R}^{1\times r}$, $C\in\mathbb{R}^{m\times 1}$, $D\in\mathbb{R}$.
Is there a way to find $X$?
Note that $\operatorname{tr}(XA)+BX^TC=\operatorname{tr}\left((A^T+CB)^TX\right)$.
If $A^T+CB=0$, the equation is solvable only when $D=0$, and in this case every matrix $X\in\mathbb R^{m\times r}$ is a solution.
If $A^T+CB\ne0$, the general solution to $\operatorname{tr}\left((A^T+CB)^TX\right)=D$ is given by $$ X=\frac{D(A^T+CB)}{\operatorname{tr}\left((A^T+CB)^T(A^T+CB)\right)}+Y, $$ where $Y$ is any matrix such that $\operatorname{tr}\left((A^T+CB)^TY\right)=0$. So, one particular solution is obtained by putting $Y=0$ in the above.