HOME

TheInfoList



OR:

In
linear algebra Linear algebra is the branch of mathematics concerning linear equations such as: :a_1x_1+\cdots +a_nx_n=b, linear maps such as: :(x_1, \ldots, x_n) \mapsto a_1x_1+\cdots +a_nx_n, and their representations in vector spaces and through matrices ...
, 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 In linear algebra, the transpose of a matrix is an operator which flips a matrix over its diagonal; that is, it switches the row and column indices of the matrix by producing another matrix, often denoted by (among other notations). The tr ...
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 entry In mathematics, a coefficient is a multiplicative factor in some Summand, term of a polynomial, a series (mathematics), series, or an expression (mathematics), expression; it is usually a number, but may be any expression (including variables su ...
(that is the left-most nonzero entry) of every nonzero row is to the right the leading entry of every row above. Some texts add the condition that the leading coefficient must be 1 while others regard this as ''reduced'' row echelon form. These two conditions imply that all entries in a column below a leading coefficient are zeros. The following is an example of a 4x5 matrix in row echelon form, which is not in ''reduced'' row echelon form (see below): : \left \begin 1 & a_0 & a_1 & a_2 & a_3 \\ 0 & 0 & 2 & a_4 & a_5 \\ 0 & 0 & 0 & 1 & a_6 \\ 0 & 0 & 0 & 0 & 0 \end \right Many properties of matrices may be easily deduced from their row echelon form, such as the
rank Rank is the relative position, value, worth, complexity, power, importance, authority, level, etc. of a person or object within a ranking, such as: Level or position in a hierarchical organization * Academic rank * Diplomatic rank * Hierarchy * ...
and the
kernel Kernel may refer to: Computing * Kernel (operating system), the central component of most operating systems * Kernel (image processing), a matrix used for image convolution * Compute kernel, in GPGPU programming * Kernel method, in machine learn ...
.


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 (called a leading 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 In mathematics, Gaussian elimination, also known as row reduction, is an algorithm for solving systems of linear equations. It consists of a sequence of operations performed on the corresponding matrix of coefficients. This method can also be used ...
. 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: : \left \begin 1 & 0 & a_1 & 0 & b_1 \\ 0 & 1 & a_2 & 0 & b_2 \\ 0 & 0 & 0 & 1 & b_3 \end \right/math> For matrices with
integer An integer is the number zero (), a positive natural number (, , , etc.) or a negative integer with a minus sign ( −1, −2, −3, etc.). The negative numbers are the additive inverses of the corresponding positive numbers. In the languag ...
coefficients, the
Hermite normal form In linear algebra, the Hermite normal form is an analogue of reduced echelon form for matrices over the integers Z. Just as reduced echelon form can be used to solve problems about the solution to the linear system Ax=b where x is in R''n'', the H ...
is a row echelon form that may be calculated using
Euclidean division In arithmetic, Euclidean division – or division with remainder – is the process of dividing one integer (the dividend) by another (the divisor), in a way that produces an integer quotient and a natural number remainder strictly smaller than ...
and without introducing any
rational number In mathematics, a rational number is a number that can be expressed as the quotient or fraction of two integers, a numerator and a non-zero denominator . For example, is a rational number, as is every integer (e.g. ). The set of all rat ...
or denominator. On the other hand, the reduced echelon form of a matrix with integer coefficients generally contains non-integer coefficients.


Transformation to row echelon form

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 Row or ROW may refer to: Exercise *Rowing, or a form of aquatic movement using oars *Row (weight-lifting), a form of weight-lifting exercise Math *Row vector, a 1 × ''n'' matrix in linear algebra. *Row (database), a single, implicitly structured ...
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 Equivalence or Equivalent may refer to: Arts and entertainment *Album-equivalent unit, a measurement unit in the music industry * Equivalence class (music) *'' Equivalent VIII'', or ''The Bricks'', a minimalist sculpture by Carl Andre *''Equiva ...
) echelon form by adding a scalar multiple of a row to one of the above rows, for example: : \begin 1 & 3 & -1 \\ 0 & 1 & 7 \\ \end \xrightarrow \begin 1 & 4 & 6 \\ 0 & 1 & 7 \\ \end. However, every matrix has a unique ''reduced'' row echelon form. In the above example, the reduced row echelon form can be found as : \begin 1 & 3 & -1 \\ 0 & 1 & 7 \\ \end \xrightarrow \begin 1 & 0 & -22 \\ 0 & 1 & 7 \\ \end. 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.


Systems of linear equations

A system of linear equations is said to be in ''row echelon form'' if its
augmented matrix In linear algebra, an augmented matrix is a matrix obtained by appending the columns of two given matrices, usually for the purpose of performing the same elementary row operations on each of the given matrices. Given the matrices and , where ...
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 In classical deductive logic, a consistent theory is one that does not lead to a logical contradiction. The lack of contradiction can be defined in either semantic or syntactic terms. The semantic definition states that a theory is consistent ...
if and only if one of the equations of the canonical form is reduced to 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.


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
, lead The comma is a punctuation mark that appears in several variants in different languages. It has the same shape as an apostrophe or single closing quotation mark () in many typefaces, but it differs from them in being placed on the baseline o ...
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


Notes


References

* . * .


External links


Interactive Row Echelon Form with rational output
{{Matrix classes Numerical linear algebra Articles with example pseudocode de:Lineares Gleichungssystem#Stufenform, Treppenform