# Matrix identity involving Kronecker product

It is well-known that, given real matrices $$\mathbf{A}_1$$, $$\mathbf{A}_2$$ and $$\mathbf{B}$$ with dimensions $$m_1 \times n_1$$, $$m_2 \times n_2$$ and $$n_1 \times n_2$$, respectively, then $$(\mathbf{A}_2 \otimes\mathbf{A}_1)\text{vec}(\mathbf{B}) = \text{vec}(\mathbf{A}_1\mathbf{B}\mathbf{A}_2^\top),$$ where $$\text{vec}$$ denotes the vectorization operator, $$\otimes$$ is the Kronecker product and $$^\top$$ is the transposition operation.

I wonder that similar relations can be deduced when more matrices $$\mathbf{A}_i$$, $$i=1,\ldots, m$$, are involved (and hence, $$\mathbf{B}$$ is a tensor with order $$m$$), that is to say, how can we express the product $$(\mathbf{A}_m \otimes \cdots \otimes\mathbf{A}_1)\text{vec}(\mathbf{B}) = \quad ?$$

Any help would be appreciated.

$$\def\v{\operatorname{vec}}\def\o{\otimes}\def\B{\,\color{red}{B}\,}$$By reshaping $$\v(B)$$ we can create a matrix $$\B$$
Consider the case for $$m=4$$ \eqalign{ \v\Big((A_1) \B (A_4^T\o A_3^T\o A_2^T)\Big) &= (A_4\o A_3\o A_2\o A_1)\v(B) \\ \v\Big((A_2\o A_1) \B(A_4^T\o A_3^T)\Big) &= (A_4\o A_3\o A_2\o A_1)\v(B) \\ \v\Big((A_3\o A_2\o A_1) \B(A_4^T)\Big) &= (A_4\o A_3\o A_2\o A_1)\v(B) \\ } Extrapolating, if the number of $$A$$ matrices is $$m$$, then there are $$(m-1)$$ locations where the $$\color{red}{B}$$ matrix can be placed, which will yield the same result upon vectorization. The $$A$$ matrices are cyclically permuted to accommodate the shifting $$\color{red}{B}$$ matrix.
Another approach is calculate the Kronecker factorization of the vector into constituent vectors whose dimensions are compatible with the $$A$$ matrices \eqalign{ &\v(B) = b_4\o b_3\o b_2\o b_1 \\ &(A_4\o A_3\o A_2\o A_1)\v(B) = (A_4b_4\o A_3b_3\o A_2b_2\o A_1b_1) \\ } Although it may not be possible to find a monomial factor, it is always possible to find a sum of such factors, e.g. \eqalign{ \v(B) &= \sum_{k=1}^K b_{4k}\o b_{3k}\o b_{2k}\o b_{1k} \\ }