English
The function vec stacks all entries of a matrix into a single column, ordering them by columns: entry (i,j) of the input matrix becomes the (j,i)th component of the vector.
Русский
Функция vec складывает все элементы矩atrix в один столбец, упорядочивая по столбцам: элемент (i,j) превращается в компонент (j,i) вектора.
LaTeX
$$$\mathrm{vec}(A):= (A_{j i})_{(i,j)\in n\times m}$$$
Lean4
/-- All the matrix entries, arranged into one column. -/
@[simp]
def vec (A : Matrix m n R) : n × m → R := fun ij => A ij.2 ij.1