This is documentation for Mathematica 3, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)
 Documentation / Mathematica / Built-in Functions / Lists and Matrices / Matrix Operations  /
RowReduce

  • RowReduce[ m ] gives the row-reduced form of the matrix m.
  • Example: RowReduce[ 3, 1, a , 2, 1, b ].
  • RowReduce performs a version of Gaussian elimination, adding multiples of rows together so as to produce zero elements when possible. The final matrix is in reduced row echelon form.
  • If m is a non-degenerate square matrix, RowReduce[ m ] is IdentityMatrix[ m ].
  • If m is a sufficiently non-degenerate rectangular matrix with rows and more than columns, then the first columns of RowReduce[ m ] will form an identity matrix.
  • RowReduce works on both numerical and symbolic matrices.
  • RowReduce[ m , Modulus -> n ] performs row reduction modulo n.
  • RowReduce[ m , ZeroTest -> test ] evaluates test [ m [[ i , j ]] ] to determine whether matrix elements are zero.
  • See the Mathematica book: Section 3.7.8.
  • See also Implementation NotesA.9.44.27MainBookLinkOldButtonDataA.9.44.27.
  • See also: LinearSolve, Inverse, NullSpace, GroebnerBasis.

    Further Examples

    A non-singular matrix can be row-reduced to the identity matrix.

    In[1]:=

    Out[1]//MatrixForm=

    For non-zero singular matrices, the last row reduces to zero and the last column cannot be zeroed (if not zero from the start).

    In[2]:=

    Out[2]//MatrixForm=

    You can use RowReduce to solve a system of linear equations. This gives the solution to the linear system {x + y - z == 1, x + 2y + 5z == 1, 2x + y + 3z == -2}.

    In[3]:=

    Out[3]=

    Column 1 corresponds to the variable x, column 2 to the variable y and column 3 to the variable z. So the solution of the system is x = , y = , and z = .