1
$\begingroup$

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] (3x3 matrix), B is [0 1 1 0; 1 0 1 0; 1 1 0 1; 0 0 1 0] (4x4 matrix),

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

so AXB results in a (3x4) matrix vec(AXB) results in vectors of (4x1)

(transpose(B) ⊗ A) results in (12x12) matrix and vec(X) is a (4x1) 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.

$\endgroup$
1
  • $\begingroup$ the matrices are in Matlab/Julia format. $\endgroup$ Aug 28, 2014 at 20:37

2 Answers 2

2
$\begingroup$

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.

$\endgroup$
2
  • 4
    $\begingroup$ It doesn't stack the rows into a column, it stacks the columns into one long column. $\endgroup$
    – greg
    Jun 12, 2019 at 16:27
  • $\begingroup$ The link to the paper is broken $\endgroup$
    – Danfoa
    Jan 10, 2022 at 8:56
1
$\begingroup$

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.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .