Vectorization of matrices #
This file defines Matrix.vec A, the vectorization of a matrix A,
formed by stacking the columns of A into a single large column vector.
Since mathlib indices matrices by arbitrary types rather than Fin n,
the result of Matrix.vec on A : Matrix m n R is indexed by n ร m.
The Fin (n * m) interpretation can be restored by composing with finProdFinEquiv.symm:
-- ![1, 2, 3, 4]
#eval vec !![1, 3; 2, 4] โ finProdFinEquiv.symm
While it may seem more natural to index by m ร n, keeping the indices in the same order,
this would amount to stacking the rows into one long row, and goes against the literature.
If you want this function, you can write Matrix.vec Aแต instead.
References #
All the matrix entries, arranged into one column.
Equations
Instances For
Technical lemma shared with kronecker_mulVec_vec and vec_mul_eq_mulVec.
Technical lemma shared with vec_vecMul_kronecker and vec_mul_eq_vecMul.