0

Is there a way to rewrite the matrix below using operations like $vec$, $\otimes$, etc?

$$\left[\begin{array}{c} I_n\otimes e_1\\ \vdots \\ I_n \otimes e_T \end{array}\right]$$

$e_i$ is the $i$-th column of the matrix $I_T$, $\otimes$ is the Kronecker product.

I need to rewrite this matrix to make it faster to work with when programming.

StubbornAtom
  • 17,052

1 Answers1

1

Is your goal to compute matrix-vector products involving this matrix? If this is the case, you could restructure the computation as follows. We have $$\begin{bmatrix}I_n \otimes e_1 \newline I_n \otimes e_2 \newline \vdots \newline I_n \otimes e_T\end{bmatrix} x = \begin{bmatrix}(I_n \otimes e_1)x \newline (I_n \otimes e_2)x \newline \vdots \newline (I_n \otimes e_T)x \end{bmatrix}.$$

Using e.g. equation (2) from the Van Loan paper "The ubiquitous Kronecker product" from 2000, we can write $(I_n \otimes e_i) x = \text{vec}(e_i x^\top)$ for each $i$. We therefore have $$\begin{bmatrix}I_n \otimes e_1 \newline I_n \otimes e_2 \newline \vdots \newline I_n \otimes e_T\end{bmatrix} x = \begin{bmatrix} \text{vec}(e_1 x^\top) \newline \text{vec}(e_2 x^\top) \newline \vdots \newline \text{vec}(e_T x^\top) \end{bmatrix}.$$ This avoids having to form the full Kronecker product.

That Van Loan paper I cited above contains lots of useful information about Kronecker products if you deal with them a lot.

OtZman
  • 101