Definition:Vectorization of Matrix

Definition
Let $S$ be a set.

Let $m, n \ge 1$ be natural numbers.

Let $A = \left({a_{i j} }\right)$ be a $m \times n$ matrix over $S$.

Definition 1
The vectorization of $A$ is the $mn \times 1$ column matrix:
 * $\operatorname{vec}(A) = [a_{11}, \ldots, a_{m1}, a_{12}, \ldots, a_{m2}, \ldots, a_{1n}, \ldots, a_{mn}]^\intercal$

informally obtained by stacking the columns of $A$, that is:
 * $\operatorname{vec}(A)_k = a_{\lfloor k/m\rfloor, k \bmod m}$

where:
 * $\lfloor \cdot \rfloor$ is the floor function
 * $\bmod$ is the modulo operation.

Definition 2
Let $R$ be a ring with unity.

Let $A$ be an $m\times n$ matrix over $R$.

The vectorization of $A$ is its coordinate vector with respect to the standard matrix basis.

Also see

 * Equivalence of Definitions of Vectorization of Matrix
 * Vectorization of Product of Three Matrices
 * Vectorization of Product of Two Matrices