Vectorization of Matrix in Tensor Notation

486 Views Asked by At

How can I express the vecorization of a matrix A (vec(A)) in tensor notation? I have problems finding the correct use of indices such that the contraction runs correctly.

1

There are 1 best solutions below

0
On BEST ANSWER

Suppose you have an element of $F^{m \times n}$ and you vectorize to an element of $F^{(m \cdot n)}$ where $F$ is some field (likely $\mathbb{R}$ or $\mathbb{C}$).

With $i \in [1,m\cdot n]$ an index for your vector and $j \in [1,m], k \in [1,n]$ indices for your matrix, contract along $j$ and $k$ with $$ \epsilon_{ik}^j = \delta_{i,(j-1)n+k} = \begin{cases} 1 &, i = (j-1)n+k \\ 0 &, \text{otherwise} \end{cases} \text{.} $$ For instance $\mathrm{vec}(M) = M^j_i \epsilon^{ik}_j$

(Haven't tested this. Off-by-one errors are likely.)