How to approach solving a matrix equation in $M_{n}(R)$?

78 Views Asked by At

Let A, B ∈ $M_{n}(ℝ)$ be given. $M_{n}(ℝ)$ stands for the set of n x n matrices with real entries. Solve in $M_{n}(ℝ)$ the matrix equation:

$X = Tr(X)A + B$

Note Tr denotes the trace of the matrix.

What I've done so far:

$Tr(X) = Tr(Tr(X)A + B)$

$Tr(X) = Tr(X)Tr(A) + Tr(B)$

I don't know how to proceed from here.

3

There are 3 best solutions below

2
On

Write the given matrix equation component wise

$X_{ij} = (\displaystyle \sum_{k=1}^n X_{kk} ) A_{ij} + B_{ij} $

This gives you a linear system of $n^2$ equations in $n^2$ variables, so it can be solved using the standard Gauss-Jordan elimination method.

2
On

Say $X=[x_1,...,x_n]$ where $x_i\in\mathbb{R}^n$ for each $1\le i\le n$. Because you impose no restriction on the solution, we can treat matrices just as vectors. Define the vectorization function being stacking columns, i.e., $$\mathrm{vec}(X)=\begin{pmatrix}x_1\\\vdots\\ x_n\end{pmatrix}\in\mathbb{R}^{n^2}.$$

You can check this function is linear. Let $e_i$ be the $i$th column of the identity matrix $I_n$. Then, the trace function can be written as $$\mathrm{tr}(X)=\sum_{i=1}^nX_{ii}=\sum_{i=1}^ne_i'x_i=[e_1'\ \cdots\ e_n']\begin{pmatrix}x_1\\\vdots\\ x_n\end{pmatrix}=\begin{pmatrix}e_1\\\vdots\\ e_n\end{pmatrix}'\begin{pmatrix}x_1\\\vdots\\ x_n\end{pmatrix}=\mathrm{vec}(I_n)'\mathrm{vec}(X).$$

Thus, your equation can be written as \begin{align*} \mathrm{vec}(X)&=\mathrm{vec}(\mathrm{tr}(X)A+B)=\mathrm{tr}(X)\mathrm{vec}(A)+\mathrm{vec}(B)\\ &=\{\mathrm{vec}(I_n)'\mathrm{vec}(X)\}\mathrm{vec}(A)+\mathrm{vec}(B)\\ &= \mathrm{vec}(A)\mathrm{vec}(I_n)'\mathrm{vec}(X) + \mathrm{vec}(B)\\ \implies& (I_{n^2}-\mathrm{vec}(A)\mathrm{vec}(I_n)')\mathrm{vec}(X)=\mathrm{vec}(B)\\ \implies &\mathrm{vec}(X)=(I_{n^2}-\mathrm{vec}(A)\mathrm{vec}(I_n)')^-\mathrm{vec}(B) \end{align*} where $^-$ means the generalized inverse. Then putting it back to the matrix form.

0
On

If $\operatorname{tr}(A)\ne1$, as you have already shown, we have $\operatorname{tr}(X)=\operatorname{tr}(X)\operatorname{tr}(A)+\operatorname{tr}(B)$. Therefore $\operatorname{tr}(X)=\frac{\operatorname{tr}(B)}{1-\operatorname{tr}(A)}$ and hence $X= \frac{\operatorname{tr}(B)}{1-\operatorname{tr}(A)}A+B$.

If $\operatorname{tr}(A)=1$, the equation is solvable only if $\operatorname{tr}(B)=0$. In this case, any $X$ of the form $X=tA+B$ is a solution (and $\operatorname{tr}(X)$ will be equal to $t$).