R = reducedRowEchelonForm A
A matrix over a field is in reduced row echelon form if (1) all rows consisting only of zeros are at the bottom, (2) the leading coefficient (called the pivot) of a nonzero row is always strictly to the right of the leading coefficient of the row above it, and (3) the leading coefficient of each nonzero row is 1. See Row echelon form for more discussion.
Given a matrix A (over a field), there is a unique matrix R such that (1) the row spans of A and R are the same, and (2) R is in reduced row echelon form.
If the matrix A is over either a finite field, or the rationals, then this returns the unique reduced row echelon form for the matrix, which is unique.
|
|
|
|
|
|
|
|
|
This function is useful while learning the concepts and algorithms of linear algebra. In practice though, one tends to use LU decompositions rather than reduced row echelon forms.
In fact, this function doesn't work over the reals or complexes (due to often poor numerical stability), as an LU decomposition is better for solving systems over the real numbers. If numerical stability is an issue, using a singular value decomposition (SVD) is also a good idea.
|
|
|
|
|
|
This function also works over finite fields.
|
|
It is not yet implemented over fraction fields and extension fields. Use LUdecomposition instead.
|
|
|
|
|
Even though it is not implemented currently as a canned routine, we can put A into reduced row echelon form using elementary row operations. Recall that rows and columns in Macaulay2 are indexed starting with 0.
|
|
|
|
|
At this point the matrix is in row echelon form. We clear out the entries above the pivots to place it into reduced row echelon form.
|
|
|
|
The object reducedRowEchelonForm is a method function.