Invert a matrix mapping i have following mapping $X \rightarrow M^TXM - X$, where $M$ and $X$ are matrices. Is there a inversion for this mapping? If no, could it be proven that there is no such inversion?
Best regards
Mat
 A: The mapping $L(X)= M^TXM-X$ is clearly linear, so it is invertible iff it is bijective, i.e. iff it is injective (as it is a linear transformation of a finitely dimensional space). So $L$ is invertible iff $Ker(L)=0$, i.e. iff $M^TXM=X$ has no nontrivial solutions.
For a matrix $A$, denote by $vec(A)$ its vectorization (see https://en.wikipedia.org/wiki/Vectorization_(mathematics)), and for matrices $A,B$, denote by $A\otimes B$ their Kronecker product (see https://en.wikipedia.org/wiki/Kronecker_product).
Since $vec(M^TXM)=(M^T\otimes M^T) vec(X)$, $M^TXM=X$ is equivalent to $(M^T\otimes M^T)vec(X)=vec(X)$, so $M^TXM=X$ has a nontrivial solution iff $(M^T\otimes M^T)Y= Y$ has a nontrivial solution, i.e. iff $1$ is an eigenvalue of $M^T\otimes M^T=(M\otimes M)^T$, i.e. iff $1$ is an eigenvalue of $M\otimes M$. Since eigenvalues of $M\otimes M$ are $\lambda_i\lambda_j$, where $\lambda_i$'s are eigenvalues of $M$, $1$ is an eigenvalue of $M\otimes M$ iff there exists $\lambda$ such that both $\lambda$ and $1/\lambda$ are eigenvalues of $M$.
So, $L$ is invertible iff there is no $\lambda$ such that both $\lambda$ and $1/\lambda$ are eigenvalues of $M$. I am not sure if this answers your question.

Generally, to solve matrix equation $AXB=X+C$, where all matrices are $n\times n$, do the following: $AXB=X+C$ is equivalent to $vec(AXB)=vec(X+C)$, i.e. to $(B^T\otimes A)vec (X)=vec(X)+vec(C)$, or $(B^T\otimes A-I_{n^2})vec(X)=vec(C)$. This is the matrix equation $Dx=c$, where $D=B^T\otimes A-I_{n^2}$ is an $n^2\times n^2$ matrix, and $x=vec(X)$ and $c=vec(C)$ are $n^2\times 1$ matrices, i.e. this is an usual system of linear equations. The equation $AXB=X+C$ has a solution iff $Dx=c$ has a solution, and if $x$ is a solution of the latter equation, you obtain a solution $X$ of the former equation directly by $x=vec(X)$.
