and without introducing any rational number or denominator. On the other hand, the reduced echelon form of a matrix with integer coefficients generally contains non-integer coefficients. Transformation to row echelon form By means of a finite sequence of elementary row operations, called Gaussian elimination, any matrix can be transformed to row echelon form. Since elementary row operations preserve the row space of the matrix, the row space of the row echelon form is the same as that of the original matrix. The resulting echelon form is not unique; any matrix that is in echelon form can be put in an (equivalent) echelon form by adding a scalar multiple of a row to one of the above rows, for example: However, every matrix has a unique reduced row echelon form. In the above example, the reduced row echelon form can be found as This means that the nonzero rows of the reduced row echelon form are the unique reduced row echelon generating set for the row space of the original matrix. Systems of linear equations A system of linear equations is said to be in row echelon form if its augmented matrix is in row echelon form. Similarly, a system of linear equations is said to be in reduced row echelon form or in canonical form if its augmented matrix is in reduced row echelon form. The canonical form may be viewed as an explicit solution of the linear system. In fact, the system is inconsistent if and only if one of the equations of the canonical form is reduced to 0 = 1. Otherwise, regrouping in the right hand side all the terms of the equations but the leading ones, expresses the variables corresponding to the pivots as constants or linear functions of the other variables, if any. Pseudocode for reduced row echelon form The following pseudocode converts a matrix into a reduced row echelon form: function ToReducedRowEchelonForm(Matrix M) is lead := 0 rowCount := the number of rows in M columnCount := the number of columns in M for 0 ≤ r < rowCount do if columnCount ≤ lead then stop function end if i = r while M[i, lead] = 0 do i = i + 1 if rowCount = i then i = r lead = lead + 1 if columnCount = lead then stop function end if end if end while if i ≠ r then