Row echelon form

From Wikipedia, the free encyclopedia
  (Redirected from Reduced row echelon form)
Jump to: navigation, search

In linear algebra a matrix is in row echelon form if

  • All nonzero rows (rows with at least one nonzero element) are above any rows of all zeroes [All zero rows, if any, belong at the bottom of the matrix]
  • The leading coefficient (the first nonzero number from the left, also called the pivot) of a nonzero row is always strictly to the right of the leading coefficient of the row above it.
  • All entries in a column below a leading entry are zeroes (implied by the first two criteria).

This is an example of 3×4 matrix in row echelon form:


\left[ \begin{array}{ccc|c}
1 & a_1 & a_2 & a_3 \\
0 & 1 & a_4 & a_5 \\
0 & 0 & 1 & a_6
\end{array} \right]

A matrix is in reduced row echelon form (also called row canonical form) if it satisfies the additional condition:

  • Every leading coefficient is 1 and is the only nonzero entry in its column, like in this example:


\left[ \begin{array}{ccc|c}
1 & 0 & 0 & b_1 \\
0 & 1 & 0 & b_2 \\
0 & 0 & 1 & b_3
\end{array} \right]

Note that this does not always mean that the left of the matrix will be an identity matrix. For example, the following matrix is also in reduced row-echelon form:


\left[ \begin{array}{cccc|c}
1 & 0 & 1/2  & 0 & b_1 \\
0 & 1 & -1/3 & 0 & b_2 \\
0 & 0 & 0    & 1 & b_3
\end{array} \right]

because the constants in the third column do not lead any rows.

Contents

[edit] Transformation to row echelon form

By means of a finite sequence of elementary row operations, 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; for example, any multiple of a matrix in echelon form is also in echelon form. However, it has been proven that any matrix can be transformed to exactly one matrix in reduced row echelon form. 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.

[edit] 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 equations is said to be in reduced row echelon form or canonical form if its augmented matrix is in reduced row echelon form.

[edit] Pseudocode

The following pseudocode converts a matrix to (non-reduced) row-echelon form[citation needed]:

function ToRowEchelonForm(Matrix M) is
    nr := number of rows in M
    nc := number of columns in M
    
    for 0 ≤ r < nr do
        allZeros := true
        for 0 ≤ c < nc do
            if M[r, c] != 0 then
                allZeros := false
                exit for
            end if
        end for
        if allZeros = true then
            In M, swap row r with row nr - 1
            nr := nr - 1
        end if
    end for
    
    p := 0
    while p < nr and p < nc do
        label nextPivot:
            r := 1
            while M[p, p] = 0 do 
                if (p + r) <= nr then
                    p := p + 1
                    goto nextPivot
                end if
                In M, swap row p with row (p + r) <-- bug. nr < p+r at this point
                r := r + 1
            end while
            for 1 ≤ r < (nr - p) do 
                if M[p + r, p] != 0 then
                    x := -M[p + r, p] / M[p, p]
                    for pc < nc do
                        M[p + r, c] := M[p , c] * x + M[p + r, c]
                    end for
                end if
            end for
            p := p + 1
    end while
end function

[edit] See also

[edit] External links

Personal tools
Namespaces

Variants
Actions
Navigation
Interaction
Toolbox
Print/export
Languages