# matrix pseudoinverse with additional term

I would like to solve:

$M =ABC$ for $B$ where $M$, $A$, and $C$ are known rectangular matrices of compatible dimensions.

e.g. $(1000\times 200) = (1000\times 30)\cdot B\cdot (14000\times 200)$

I am familiar with the process for solving for $B$ when there is no term $C$.

Thank you.

There are two options. First if $A$ is injective and $C$ is surjective, then $A$ has a left inverse and $C$ has a right inverse, which can be computed as discussed here. Then, if $A^+A=I$ and $CC^+=I$, we have $B=A^+MC^+$.

Otherwise, $B\mapsto ABC$ is a linear map, so the equation $ABC = M$ can be solved using standard techniques for solving linear equations. Namely, let $M$ be $n\times m$, $A$ be $n\times p$, $B$ be $p\times q$ and $C$ be $q\times m$. Then write $B\mapsto ABC$ as a matrix by using the matrices $E_{ij}$, where $[E_{ij}]_{k\ell}=\delta_{ik}\delta_{j\ell}$ and $1\le i\le p$, $1\le j\le q$, as a basis for $M_{p\times q}$ (the matrices of size $p\times q$) and the analogous basis $F_{ij}$ of $M_{n\times m}$. Then $$[AE_{ij}C]_{k\ell}=\sum_{r=1}^p \sum_{s=1}^q a_{kr}[E_{ij}]_{rs}c_{s\ell} = \sum_{r=1}^p\sum_{s=1}^q a_{kr}\delta_{ri}\delta_{sj}c_{s\ell} = a_{ki}c_{j\ell}.$$

Now you can use this to write the linear map $B\mapsto ABC$ as a matrix, and solve it using standard matrix techniques like row reduction or something.


• Your first answer gives great results. Thank you. The second answer is difficult for me to penetrate. I would very much appreciate an example with small matrices (or a link to one). – Neuromancer Jan 23 '18 at 3:24

@jgon implicitly uses the Kronecker product in order to solve the considered equation. When the matrices $A,C$ are large, this method has a great complexity and, consequently, should be avoided.

Is there any risk to transform to $(B^{T} \otimes A)\operatorname{vec}(X)=\operatorname{vec}(C)$ for solving $AXB=C$ for X
for an effective method when the matrices $A,C$ are square. In particular, ref ii) theorem 7.1. gives a unicity theorem for the solution of $AXD+EXB=C$.