rref_test


rref_test, an Octave code which calls rref(), which evaluates the reduced row echelon form (RREF) of a matrix, which can be singular or rectangular.

While the RREF is often used in introductory linear algebra courses, it is very susceptible to roundoff error, and hence the results of many of the tasks which it is used to illustrate can only be relied on when the matrix is small, contains only integer entries, and care is taken to avoid any division operation that is not exact.

The RREF can be regarded as a form of Gauss-Jordan elimination, applied to a general MxN matrix.

A matrix is in reduced row echelon form if:

MATLAB includes a build in function

        R = rref ( A );
      
which returns in R the RREF of matrix A. It also uses a tolerance to try to mitigate the susceptibility of the algorithm to roundoff.

The RREF can be used to determine:

Licensing:

The computer code and data files described and made available on this web page are distributed under the MIT license

Languages:

rref_test is available in a MATLAB version and an Octave version.

Related Data and Programs:

llsq, an Octave code which solves the simple linear least squares (LLS) problem of finding the formula of a straight line y=a*x+b which minimizes the root-mean-square (RMS) error to a set of N data points.

polyominoes, an Octave code which defines, solves, and plots a variety of polyomino tiling problems, which are solved by a direct algebraic approach involving the reduced row echelon form (RREF) of a specific matrix, instead of the more typical brute-force or backtracking methods.

qr_solve, an Octave code which computes the linear least squares (LLS) solution of a rectangular linear system A*x=b.

row_echelon_integer, an Octave code which carries out the exact computation of the integer row echelon form (IREF) and integer reduced row echelon form (IRREF) of an integer matrix.

test_lls, an Octave code which implements linear least squares (LLS) test problems which seek a vector x which minimizes the error in the rectangular linear system A*x=b.

Reference:

  1. Charles Cullen,
    An Introduction to Numerical Linear Algebra,
    PWS Publishing Company, 1994,
    ISBN: 978-0534936903,
    LC: QA185.D37.C85.

Source Code:


Last revised on 18 June 2023.