Is there an Kronecker Product Identity that allows for factorisation?
If $\textbf{A},\textbf{B}$ are $50\times50$ dim-matrices (B is diagonal), and $\textbf{C},\textbf{D}$ are $100\times100$ dim-matrices (D is diagonal). Normally I would do $$R=A^TB\otimes C^TD$$ where R is a $5000\times5000$ dim-matrix.
Is there a way to factorise out the $D$ matrix like, $$R=D(A^TB\otimes C^TI)$$ where I is $100\times100$ dim-matrix.
The reason is that I have an algorithm where only $D$ changes at each iteration, whilst the others are constant. $$\textbf{for n 0 to N:}\quad\quad\quad$$ $$\quad R_n=A^TB\otimes C^TD_n$$ $$\text{stuff}...$$
Thus, it would be be computationally quicker calculating the matrices and then looping only doing 1 multiplication. I thought maybe turning $D$ into $5000\times5000$, then doing element wise multiplication, that would be: $$\textbf{C} = (\textbf{A}^T\textbf{B}\otimes \textbf{C}^T\textbf{I})$$ $$\textbf{for n 0 to N:}\quad\quad\quad$$ $$\quad \textbf{R_n}=\textbf{D}_n^{new}\text{*} \textbf{C}$$ $$\text{stuff}...$$ where * is element multiplication, and $\textbf{D}_n^{new}$ is $5000\times5000$ (that is $D$ repeated 50 by 50 times), but that doesn't seem to work.
$ \def\R#1{{\mathbb R}^{#1}} \def\k{\otimes} \def\m{\times} \def\BR#1{\Big(#1\Big)} \def\LR#1{\left(#1\right)} \def\op#1{\operatorname{#1}} \def\vc#1{\op{vec}\LR{#1}} \def\qiq{\quad\implies\quad} $Let $I_n\in\R{n\m n}$ denote the identity matrix and $\,K^{(m,n)}\in\R{mn\m mn}\:$ the Commutation Matrix and $\,\{A,B\}$ arbitrary matrices with dimensions $$\eqalign{ &A \in\R{m\m n} \qquad B\in\R{p\m q} \\ }$$ The Kronecker product can be vectorized as $$\eqalign{ \vc{A\k B} &= \LR{I_n\k K^{(q,m)}\k I_p}\BR{I_m\k I_n\k\vc B}\vc A \\ &= \LR{I_n\k K^{(q,m)}\k I_p}\BR{\vc A\k I_p\k I_q}\,\vc B \\ }$$ Applying this to the current problem yields $$\eqalign{ R &= A^TB\k C^TD \\ \vc R &= \BR{I_{50}\k K^{(100,\ 50)}\k I_{100}} \BR{\vc{A^TB}\k I_{10000}}\vc D \\ }$$ The matrix on the RHS is large but extremely sparse.