Conjugating elimination matrices across a row permutation (source code)

= Conjugating elimination matrices across a row permutation

For a <permutation matrix> $P$ and elimination <matrices> $E_i$, put $F_i=PE_iP^{-1}$. Cancellation of adjacent $P^{-1}P$ gives $PE_k\cdots E_1M=F_k\cdots F_1(PM)$. If the $F_i$ and their inverses are lower triangular, then $PM=LU$ with $U=PE_k\cdots E_1M$ and $L=F_1^{-1}\cdots F_k^{-1}$. Lower triangularity needs checking: an arbitrary permutation does not preserve it.