Solving Kronecker product equation I am trying to solve for $\mathbf{X}$ the following equation
$\mathbf{A}\otimes \mathbf{X}=\mathbf{B}$
Is there a closed form solution to this?
Thank you very much in advance!

Assume the following dimensions for the variables
$$\eqalign{
\def\sz{\operatorname{size}}
m,n=\sz(A) \qquad p,q=\sz(X) \qquad mp,nq=\sz(B) \\
}$$
and let $K_{m,n}$ denote the Commutation Matrix which satisfies
$$\eqalign{
\def\vc{\operatorname{vec}}
\vc(A^T) &= K_{m,n}\vc(A) \\
mn,mn &= \sz(K_{m,n})
}$$
Then the Kronecker product term can be vectorized
$$\eqalign{
\def\LR#1{\left(#1\right)}
\def\BR#1{\Big(#1\Big)}
a &= \vc(A), \qquad x = \vc(X), \qquad b = \vc(B) \\
b &= \vc(A\otimes X) \\
  &= \LR{I_n\otimes K_{q,m}\otimes I_p}\LR{a\otimes I_{pq}}x \\
b &= Rx \\
}$$
Since $R$ is rectangular $\big(\sz(R)=mnpq,pq\big)$
the solution requires the pseudoinverse $R^+$
$$\eqalign{
R^+ &= \LR{\frac{a}{\|a\|^2}\otimes I_{pq}}^T\BR{I_n\otimes K_{m,q}\otimes I_p} \\
x &= R^+b \\
X &= \operatorname{Reshape}(x, p,q) \\
}$$
The Reshape() operation can be expressed using even more Kronecker products.
Update
A computationally and conceptually simpler approach is to

*

*Partition $B$ into blocks of size $p\times q$

*Locate any non-zero component of $A,\:$ e.g. $\,A_{ij}$

*Note that the $(i,j)^{th}$ block of $B$ must equal $A_{ij}X$

Therefore
$$
\def\m#1{\begin{bmatrix}#1\end{bmatrix}}
\def\R{{\mathbb R}}
X=\frac{{\large\tt[}B{\large\tt]}_{ij}}{A_{ij}}
 \;=\; \frac{(e_i\otimes I_p)^TB\,(f_j\otimes I_q)}{e_i^TAf_j}
$$
where $\big\{e_i\in\R^m,\;f_j\in\R^n\big\}$ are the standard basis vectors for their respective dimensions.
