In row reduction we apply elementary row operations; thereby, one or more of the following operations are applied:
- multiplying a row with a number distinct from zero
- adding a scalar multiple of a row to another row
- changing the order of the rows
These are the authorized operations. This does not yet fully determine the row reduction process. The aim of row reduction is to bring the matrix in reduced echelon form. We first look at an example or two.
Bring the following matrix in reduced echelon form:
We start with the matrix:
Green elements are elements we want to leave unchanged. We first use the first row to get as many zeros as possible in the first column. We do that by adding the first row to the second and subtracting it from the third. This gives
Now we try to wipe the second column clean by use of the second row. This not possible because the second element equals
. Therefore we swap the second and third row (not the second and first row, because that way we would distort the first column!)
and divide the second row by
:
Now we can wipe the second column clean by use of the second row. We subtract it twice from the first. Note that the first column remains unchanged:
Now we wipe the third column clean by use of the third row. To this end, we first divide it by
:
Then we add the new third row
times to the first row and subtract it from the second row; note again that the first two columns remain unchanged:
Now we cannot continue; each wiping of the fourth column by use of a row would disrupt the results in the first three columns. But there is no need to continue: the obtained result is the
reduced echelon form of
.
The process does not make it immediately clear, but row reduction of a matrix produces a unique result; we can indeed speak of the reduced echelon form of a matrix.
We now describe the general process of row reduction in the form of an algorithm. The reader is advised to compare the examples just given with the following description.
Gaussian elimination method, or simply Gaussian elimination, is a method of reducing a matrix to a matrix in reduced echelon form by means of elementary row operations.
Any matrix can be reduced to a unique row reduced echelon form. The method below performs Gaussian elimination.
The first step consists of the following operations on a given matrix with rows and columns:
- Let be the number of the first column that does not consist exclusively of zeros.
- If needed, swap two rows in such a way that the first element of column is not zero.
- Divide the first row by the first element of the column , so .
The matrix now has the following form:
By we denote the matrix elements whose values are insignificant to our reasoning.
- Wipe with the first row of column clean. We get a matrix of the form (with a framed submatrix):
The first step is now complete. In the next steps we apply the same procedure to the framed submatrix (but wiping clean all the columns in the last step) and repeat this process until we are no longer left with a frame submatrix or with a framed submatrix with only zeros; then the whole process of row reduction is completed.
Said further steps can be written formally as follows: suppose that we have performed steps. Then the first rows of the resulting matrix will have been use for wiping columns clean, and the last wiped column is . We now proceed as follows:
- Let be the number of the first column that doen not have zeroes only from the -th element on.
- If needed, interchange row with a next row in such a way that the -st element of column is distinct from zero.
- Divide row by that element, so .
- Use row to wipe column clean.
The result of this reduction process may look like this after, for example, three steps:
At places denoted by
the elements need no necessarily be
or
.
The process stops automatically when all rows are used wiping columns clean or when the last rows contain only zeros.
In the algorithm we select a non-zero element of the matrix, lift its row higher up (if needed), turn it into , and ensure that it is the only non-zero element in its column. The elements that are used this way in the above algorithm for finding the reduced echelon form are called the pivots of the matrix. Since rows can be interchanged, the notion of pivot column is used for a column in which a pivot element appears.
The Gauss elimination of the statement shows that, for each matrix, a row reduced echelon form exists. We will focus on showing that it is unique. Let be an -matrix and suppose both and are matrices in row reduced echelon form that are obtained by reduction from . We need to show .
If , then the uniqueness is obvious: the matrices and have a single column with a single nonzero entry, which is equal to , and can only be reduced to if the nonzero element of is at the same place as the nonzero element of .
We proceed by induction on and assume . Let be the submatrix of obtained by omitting the last column, column , and similarly for and . The elementary operations used in reducing to are also elementary operations that reduce to , and similarly for . By the induction hypothesis on , we conclude , so and can only differ in the last column. Suppose now . Then there is an index with such that . If , then, as can be row reduced to , we also have , and the component of the column vector is equal to , so . Again, since the solutions of and coincide, the entries and must be the leading elements of row in and , respectively (for otherwise there would be solutions of the equation with ). But then column of as well as has a at component and zeros elsewhere, so they are equal, contradicting . This establishes .
The elementary row operations on the matrix can be regarded as multiplications of from the left by a square matrix:
- : Multiplication of row of by a number is equal to multiplication from the left by the diagonal matrix having on position of the diagonal and ones on the remaining diagonal positions.
- : Addition of the multiple of row to another row is equal to multiplication of from the left by the matrix , where is the matrix whose -entry is equal to and all of whose other entries are zero.
- : Interchanging rows and of is equal to multiplying from the left by the permutation matrix corresponding to the permutation .
The above matrices are called
elementary matrices. If we multiply a matrix from the left by an elementary matrix, then we perform an elementary (row) operation on the matrix. In
Elementary operations on systems of linear equations we saw that two systems of linear equations that are obtained from each other by elementary reductions, have the same solution. Therefore, elementary operations do not change the (in)dependence of the rows of a matrix.
Later we will see that elementary operations neither change the (in)dependence of the columns.