One step of Gauss-Jordan elimination involves taking a non-zero element of a matrix (the pivot) and adding multiples of its row to the other rows to get zeros above and below the pivot. The pivot command performs this operation.
pivot([[1,2],[3,4],[5,6]],1,1) |
|
pivot([[1,2],[3,4],[5,6]],0,1) |
|