I am looking an analytical solution for a least-squares solution of the following equation for $X$:
$(A \ (I_{J} \otimes X)) \ \textrm{vec}(X) = b, $
where $A \in \mathbb{R}^{I\times J^2}$, $I_J$ is the $\mathbb{R}^{J\times J}$ identity matrix, $X\in \mathbb{R}^{J\times K}$ and $b\in \mathbb{R}^{I}$.
Here $\textrm{vec}(\cdot)$ is the vectorization (flattening) operator. My approach so far consisted in taking the singular value decomposition (SVD) of $X$ and trying to proceed from there in terms of pseudo-inverse of $(A \ (I_{J} \otimes X))$, but I am stuck.
Collect both $X$ variables into the
vec()term $${ \def\A{A^{\bf+}} \def\BR#1{\Big(#1\Big)} \def\LR#1{\left(#1\right)} \def\vc#1{\operatorname{vec}\LR{#1}} \def\unvc#1{\operatorname{Unvec}\left(#1\right)} A\LR{I\otimes X}\vc{X} \;=\; A\vc{X^TX} \;=\; b \\ }$$ and write the least-squares solution in terms of the pseudoinverse $\A,\,$ the nullspace projector $P=\LR{I-\A A}\,$ and an arbitrary vector $w$ $$\eqalign{ \vc{X^TX} &= \LR{\A b + Pw} \;=\; f \\ X^TX &= \unvc{f} \;=\; F }$$ whereUnvec()reverses the action ofvec()and $w$ is chosen to make $F$ symmetric.The Commutation matrix $K$ is defined such that $$\vc{M^T} = K \vc{M}$$ and it can be used to solve for the $w$ vector which will make $F$ symmetric $$\eqalign{ f &= Kf \\ \LR{\A b + Pw} &= K\LR{\A b + Pw} \\ {\LR{I-K}P}\,w &= \LR{K-I}\A b \\ w &= \BR{\LR{I-K}\LR{I-\A A}}^{\bf+}\LR{K-I}\A b \\ }$$
The problem has been reduced to finding a symmetric SVD factorization of $F$ $\LR{{\rm i.e.\:}VDV^T},$ then dropping rows/cols associated with singular values of zero $\LR{V\to V_r,\:D\to D_r}.\;$ This is usually called the Compact SVD
The solution for $X$ can be expressed as $$X = D_r^{1/2}\,V_r^T$$