Vectorization (mathematics)
In mathematics, especially in linear algebra and matrix theory, the vectorization of a matrix is a linear transformation which converts the matrix into a vector. Specifically, the vectorization of a m × n matrix A, denoted vec(A), is the mn × 1 column vector obtained by stacking the columns of the matrix A on top of one another: vec ( A ) = [ a 1 , 1 , … , a m , 1 , a 1 , 2 , … , a m , 2 , … , a 1 , n , … , a m , n ] ⊤ {\displaystyle \operatorname {vec} (A)=[a_{1,1},\ldots ,a_{m,1},a_{1,2},\ldots ,a_{m,2},\ldots ,a_{1,n},\ldots ,a_{m,n}]^{\mathrm {\top } }} Here, a i , j {\displaystyle a_{i,j}} represents the element in the i-th row and j-th column of A, and the superscript ⊤ {\displaystyle {}^{\mathrm {\top } }} denotes the transpose.
Source: Wikipedia — Vectorization (mathematics) (CC BY-SA 4.0)