# $A,B,C \in M_n$; $AXB=C$; if $A$ or $B$ singular, a solution $X$ exist iff $\text{rank}\{B^T\otimes A\}=\text{rank}\{B^T\otimes A\,\text{ vec}(C)\}$

Let $A,B,C \in M_n$ and the equation $AXB=C$. If either $A$ or $B$ is singular, then a solution $X$ can exist if and only if $\operatorname{rank} \left\{ B^T \otimes A \right\} = \operatorname{rank} \left\{ B^T \otimes A \operatorname{vec}(C ) \right\}$, where $\otimes$ is a Kronecker product.

Thank you so much in advance.

Hint: the key is to note that $$(B^T \otimes A) \operatorname{vec}(X) = \operatorname{vec}(AXB)$$
• yes, that I agree. Perhaps I should have added this relation. However, my question is how the rank condition ensures that $B^T \otimes A$ can be inverted. I am still missing the connection – user550103 May 11 '18 at 17:19
• Just because a solution exists, doesn't mean that $B \otimes A$ can be inverted. The condition ensures that $\operatorname{vec}(C)$ is in the column space of $B^T \otimes A$. – Omnomnomnom May 11 '18 at 17:26
• In fact, it's easy to show that if either $A$ or $B$ is not an invertible square matrix, then $B^T \otimes A$ will not be invertible. – Omnomnomnom May 11 '18 at 17:27
• Does this solution $\textrm{vec}(X) = B^{-T} \otimes A^{-1} \textrm{vec}(C)$ make sense when both $A$ and $B$ are nonsingular. Correct? – user550103 May 11 '18 at 17:28
• Perhaps you should take a closer look at the definition of the column space. In particular, the equation $Ax = b$ has a solution if and only if $b$ is in the column space of $A$. – Omnomnomnom May 11 '18 at 17:38