Transform M into row reduced echelon form (rref)

Gauss-Jordan Elimination

Mark first row (*) as next result row
M = * 00000000000000000000000000000001
      00000000000000000000000110000010
      00000000000000000000010100000100
      00000000000000000000010001001000
      00000000000000000000011010010000
Highlight next pivot row and column
Find first row with leftmost bit set starting from next result row.
M = * 00000000000000000000000000000001
      00000000000000000000000110000010
      00000000000000000000010100000100
      00000000000000000000010001001000
      00000000000000000000011010010000

Swap pivot row and next result row; Increment next result row.
M =   00000000000000000000010100000100
    * 00000000000000000000000110000010
      00000000000000000000000000000001
      00000000000000000000010001001000
      00000000000000000000011010010000

Clear pivot column.
Add pivot row to all other rows with bit set in pivot column
M =   00000000000000000000010100000100
    * 00000000000000000000000110000010
      00000000000000000000000000000001
      00000000000000000000000101001100
      00000000000000000000001110010100

Highlight next pivot row and column
Find first row with leftmost bit set starting from next result row.
M =   00000000000000000000010100000100
    * 00000000000000000000000110000010
      00000000000000000000000000000001
      00000000000000000000000101001100
      00000000000000000000001110010100

Swap pivot row and next result row; Increment next result row.
M =   00000000000000000000010100000100
      00000000000000000000001110010100
    * 00000000000000000000000000000001
      00000000000000000000000101001100
      00000000000000000000000110000010

Clear pivot column.
Add pivot row to all other rows with bit set in pivot column
M =   00000000000000000000010100000100
      00000000000000000000001110010100
    * 00000000000000000000000000000001
      00000000000000000000000101001100
      00000000000000000000000110000010

Highlight next pivot row and column
Find first row with leftmost bit set starting from next result row.
M =   00000000000000000000010100000100
      00000000000000000000001110010100
    * 00000000000000000000000000000001
      00000000000000000000000101001100
      00000000000000000000000110000010

Swap pivot row and next result row; Increment next result row.
M =   00000000000000000000010100000100
      00000000000000000000001110010100
      00000000000000000000000101001100
    * 00000000000000000000000000000001
      00000000000000000000000110000010

Clear pivot column.
Add pivot row to all other rows with bit set in pivot column
M =   00000000000000000000010001001000
      00000000000000000000001011011000
      00000000000000000000000101001100
    * 00000000000000000000000000000001
      00000000000000000000000011001110

Highlight next pivot row and column
Find first row with leftmost bit set starting from next result row.
M =   00000000000000000000010001001000
      00000000000000000000001011011000
      00000000000000000000000101001100
    * 00000000000000000000000000000001
      00000000000000000000000011001110

Swap pivot row and next result row; Increment next result row.
M =   00000000000000000000010001001000
      00000000000000000000001011011000
      00000000000000000000000101001100
      00000000000000000000000011001110
    * 00000000000000000000000000000001

Clear pivot column.
Add pivot row to all other rows with bit set in pivot column
M =   00000000000000000000010001001000
      00000000000000000000001000010110
      00000000000000000000000101001100
      00000000000000000000000011001110
    * 00000000000000000000000000000001

Highlight next pivot row and column
Find first row with leftmost bit set starting from next result row.
M =   00000000000000000000010001001000
      00000000000000000000001000010110
      00000000000000000000000101001100
      00000000000000000000000011001110
    * 00000000000000000000000000000001

Increment next result row.
M =   00000000000000000000010001001000
      00000000000000000000001000010110
      00000000000000000000000101001100
      00000000000000000000000011001110
      00000000000000000000000000000001

Clear pivot column.
Add pivot row to all other rows with bit set in pivot column
M =   00000000000000000000010001001000
      00000000000000000000001000010110
      00000000000000000000000101001100
      00000000000000000000000011001110
      00000000000000000000000000000001

Done.
M = 00000000000000000000010001001000
    00000000000000000000001000010110
    00000000000000000000000101001100
    00000000000000000000000011001110
    00000000000000000000000000000001


See also: