Simultaneous basis exchange from a nonzero minor (source code)

= Simultaneous basis exchange from a nonzero minor

If the columns $v_1,\ldots,v_m$ of an $n$ by $m$ matrix are independent, some $m$ by $m$ row minor is nonzero. A nonzero term of that minor's determinant selects distinct nonzero coordinates $f(i)$, and replacing the corresponding standard basis vectors $e_{f(i)}$ by the $v_i$ leaves a basis.