Swap matrices #
A swap matrix indexed by i and j is the matrix that, when multiplying another matrix
on the left (resp. on the right), swaps the i-th row with the j-th row
(resp. the i-th column with the j-th column).
Swap matrices are a special case of elementary matrices. For transvections see
Mathlib/LinearAlgebra/Matrix/Transvection.lean.
Implementation detail #
This is a thin wrapper around (Equiv.swap i j).permMatrix.
The swap matrix swap R i j is the identity matrix with the
i-th and j-th rows modified such that multiplying by it on the
left (resp. right) corresponds to swapping the i-th and j-th row (resp. column).
Equations
Instances For
Multiplying with swap R i j on the left swaps the i-th row with the j-th row.
Multiplying with swap R i j on the left swaps the j-th row with the i-th row.
Multiplying with swap R i j on the right swaps the i-th column with the j-th column.
Multiplying with swap R i j on the right swaps the j-th column with the i-th column.
Swap matrices are self inverse.
Matrix.swap as an element of GL n R.