Kronecker product and the vec operator: confusion on proof of vec(AXB) = (transpose(B) ⊗ A) vec(X)

Cleared my confusions reading this paper. So the point is that vec(.) operator stacks ALL the rows into one long column and not just a row. Thus, in the above case, it would create a 12x1 vector making it possible for the multiplication.


Given a set of three matrices $$A \in \mathbb{R}^{m\times n}, X\in \mathbb{R}^{n\times p}, B \in \mathbb{R}^{p\times l}$$

Their product $$C = AXB \in \mathbb{R}^{m\times l}$$

The $\text{vec}(.)$ operator is a transformation that simply converts (reshapes) a given matrix into a column vector, by stacking its columns into one long column.

So

$$\text{vec}(C) = \text{vec}(AXB) = (B^T \otimes A)\text{vec}(X)$$ or $$c = (B^T \otimes A)x$$ where $$c \in \mathbb{R}^{ml\times 1}, \ x \in \mathbb{R}^{np\times 1}$$ are two column vectors.