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

graph theorylinear algebramatrices

I was reading up on Kronecker products and vec operator from couple of sources and landed on the equation:

vec(AXB) = (transpose(B) ⊗ A) vec(X)

suppose A is [0 1 0; 1 0 1; 0 1 0] (3×3 matrix), B is [0 1 1 0; 1 0 1 0; 1 1 0 1; 0 0 1 0] (4×4 matrix),

then X must be a (3×4) matrix for a valid matrix multiplication right?

so AXB results in a (3×4) matrix vec(AXB) results in vectors of (4×1)

(transpose(B) ⊗ A) results in (12×12) matrix and vec(X) is a (4×1) matrix. I dont see how is this possible. Again, if we pad it with 0's even then the resulting matrix has a bigger dimension.

Am I missing something here? Any answers would be much appreciated.

Best Answer

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.