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)=[a1,1,…,am,1,a1,2,…,am,2,…,a1,n,…,am,n]⊤ Here, ai,j represents the element in the i-th row and j-th column of A, and the superscript ⊤ denotes the transpose. In other words, vec(A) is a vector containing the entries of A in column-major order.
Vectorization expresses, through coordinates, the isomorphism 𝐑m×n≅𝐑mn between these (i.e., of matrices and vectors) as vector spaces. For example, for the 2×2 matrix A=[abcd], the vectorization is vec(A)=[acbd]. The connection between the vectorization of A and the vectorization of its transpose is given by the commutation matrix.
Wikipedia contributors, "Vectorization (mathematics)", Wikipedia, revision 1360801425, retrieved 20 November 2026, source, CC BY-SA 4.0.