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: Here, 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 between these (i.e., of matrices and vectors) as vector spaces.

For example, for the 2×2 matrix , the vectorization is .

The connection between the vectorization of A and the vectorization of its transpose is given by the commutation matrix.