Row echelon form

In linear algebra, a matrix is in echelon form if it has the shape resulting from a Gaussian elimination.

A matrix being in row echelon form means that Gaussian elimination has operated on the rows, and column echelon form means that Gaussian elimination has operated on the columns. In other words, a matrix is in column echelon form if its transpose is in row echelon form. Therefore, only row echelon forms are considered in the remainder of this article. The similar properties of column echelon form are easily deduced by transposing all the matrices. Specifically, a matrix is in row echelon form if

  • All rows consisting of only zeroes are at the bottom.
  • The leading coefficient (also called the pivot) of a nonzero row is always strictly to the right of the leading coefficient of the row above it.

Some texts add the condition that the leading coefficient must be 1.

These two conditions imply that all entries in a column below a leading coefficient are zeros.

The following is an example of a 3×5 matrix in row echelon form, which is not in reduced row echelon form (see below):
[ 1 a 0 a 1 a 2 a 3 0 0 2 a 4 a 5 0 0 0 1 a 6 ] {\displaystyle \left[{\begin{array}{ccccc}1&a_{0}&a_{1}&a_{2}&a_{3}\\0&0&2&a_{4}&a_{5}\\0&0&0&1&a_{6}\end{array}}\right]} 100a000a120a2a41a3a5a6
Many properties of matrices may be easily deduced from their row echelon form, such as the rank and the kernel.

1 Reduced row echelon form

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

  • It is in row echelon form.
  • The leading entry in each nonzero row is a 1 1 1 (called a leading 1 1 1).
  • Each column containing a leading 1 has zeros in all its other entries.

The reduced row echelon form of a matrix may be computed by Gauss–Jordan elimination. Unlike the row echelon form, the reduced row echelon form of a matrix is unique and does not depend on the algorithm used to compute it. For a given matrix, despite the row echelon form not being unique, all row echelon forms and the reduced row echelon form have the same number of zero rows and the pivots are located in the same indices.

This is an example of a matrix in reduced row echelon form, which shows that the left part of the matrix is not always an identity matrix:
[ 1 0 a 1 0 b 1 0 1 a 2 0 b 2 0 0 0 1 b 3 ] {\displaystyle \left[{\begin{array}{ccccc}1&0&a_{1}&0&b_{1}\\0&1&a_{2}&0&b_{2}\\0&0&0&1&b_{3}\end{array}}\right]} 100010a1a20001b1b2b3

For matrices with integer coefficients, the Hermite normal form is a row echelon form that may be calculated using Euclidean division and without introducing any rational number or denominator. On the other hand, the reduced echelon form of a matrix with integer coefficients generally contains non-integer coefficients.

2 Transformation to row echelon form

Main article: Gaussian elimination

By means of a finite sequence of elementary row operations, called Gaussian elimination, 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; any matrix that is in echelon form can be put in an (equivalent) echelon form by adding a scalar multiple of a row to one of the above rows, for example:
[ 1 3 − 1 0 1 7 ] → add row 2 to row 1 [ 1 4 6 0 1 7 ] . {\displaystyle {\begin{bmatrix}1&3&-1\\0&1&7\\\end{bmatrix}}{\xrightarrow {\text{add row 2 to row 1}}}{\begin{bmatrix}1&4&6\\0&1&7\\\end{bmatrix}}.} [103117]add row 2 to row 1 [104167].

However, every matrix has a unique reduced row echelon form. In the above example, the reduced row echelon form can be found as
[ 1 3 − 1 0 1 7 ] → subtract 3 × (row 2) from row 1 [ 1 0 − 22 0 1 7 ] . {\displaystyle {\begin{bmatrix}1&3&-1\\0&1&7\\\end{bmatrix}}\xrightarrow {{\text{subtract 3}}\times {\text{(row 2) from row 1}}} {\begin{bmatrix}1&0&-22\\0&1&7\\\end{bmatrix}}.} [103117]subtract 3×(row 2) from row 1 [1001227].

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.

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

The canonical form may be viewed as an explicit solution of the linear system. In fact, the system is inconsistent if and only if one of the equations of the canonical form is reduced to 0 = 1 0 = 1 0=1. Otherwise, regrouping in the right hand side all the terms of the equations but the leading ones, expresses the variables corresponding to the pivots as constants or linear functions of the other variables, if any.

4 Pseudocode for reduced row echelon form

The following pseudocode converts a matrix into a reduced row echelon form:

function ToReducedRowEchelonForm(Matrix M) is
    lead := 0
    rowCount := the number of rows in M
    columnCount := the number of columns in M
    for 0 ≤ r < rowCount do
        if columnCount ≤ lead then
            stop function
        end if
        i = r
        while M[i, lead] = 0 do
            i = i + 1
            if rowCount = i then
                i = r
                lead = lead + 1
                if columnCount = lead then
                    stop function
                end if
            end if
        end while
        if i ≠ r then Swap rows i and r
        Divide row r by M[r, lead]
        for 0 ≤ j < rowCount do
            if j ≠ r do
                Subtract M[j, lead] multiplied by row r from row j
            end if
        end for
        lead = lead + 1
    end for
end function

The following pseudocode converts the matrix to a row echelon form (not reduced):

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
            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)
                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 p ≤ c < 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

5 Notes

@Skip

6 References

@Skip

7 External links

@Skip

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值