Reduced Row Echelon Form (rref) Matrix in MATLAB
Reduced Row Echelon Form of a matrix is used to find the rank of a matrix and further allows to solve a system of linear equations. A matrix is in Row Echelon form if
- All rows consisting of only zeroes are at the bottom.
- The first nonzero element of a nonzero row is always strictly to the right of the first nonzero element of the row above it.
A matrix can have several row echelon forms. A matrix is in Reduced Row Echelon Form if
- It is in row echelon form.
- The first nonzero element in each nonzero row is a 1.
- Each column containing a nonzero as 1 has zeros in all its other entries.
Where a1,a2,b1,b2,b3 are nonzero elements.
A matrix has a unique Reduced row echelon form. Matlab allows users to find Reduced Row Echelon Form using rref() method. Different syntax of rref() are:
- R = rref(A)
- [R,p] = rref(A)
Let us discuss the above syntaxes in detail:
It returns the Reduced Row Echelon Form of the matrix A using the Gauss-Jordan method.
- It returns Reduced Row Echelon Form R and a vector of pivots p
- p is a vector of row numbers that has a nonzero element in its Reduced Row Echelon Form.
- The rank of matrix A is length(p).
- R(1:length(p),1:length(p)) (First length(p) rows and length(p) columns in R) is an identity matrix.
Finding solutions to a system of linear equations using Reduced Row Echelon Form:
The System of linear equations is
Coefficient matrix A is
Constant matrix B is
Then Augmented matrix [AB] is
Then the reduced equations are
It has infinite solutions, one can be .