Transformation of Matrices
Senior 6 · Mathematics
Transformation of Matrices
Lesson 1 of 5
35 min
In S5 you solved three equations in three unknowns with determinants and Cramer's rule. That method needs a square matrix with a non-zero determinant, and it grows heavy quickly: a determinant expanded by cofactors needs four determinants. Computers that solve systems of thousands of equations (in weather models, electricity grids and image processing) use instead the method of this lesson, elimination: change the matrix one simple step at a time until its structure is obvious.
The steps are called elementary operations. They work on a matrix of any shape, and they never change the facts you are trying to find: the rank of the matrix, and the solutions of the system it stands for.
Definition
Elementary row operations on a matrix are the three moves
The elementary column operations are the same moves on columns, written , and .
Two matrices are equivalent, written , when one can be turned into the other by a finite sequence of elementary operations. Example: , so the two matrices are equivalent.
Important
Every elementary operation can be undone by another one. A swap is undone by the same swap, by , and by . This is why in a scaling: multiplying a row by 0 destroys it and cannot be undone.
Because each step is reversible, row operations on the augmented matrix of a linear system give a system with exactly the same solutions, and row or column operations on any matrix leave its rank unchanged.
Each row operation is a matrix multiplication in disguise. Do the operation on the identity matrix : the result is an elementary matrix, and doing the operation on any matrix gives . For matrices:
| Operation | Elementary matrix | Effect on a determinant |
|---|---|---|
| changes its sign: | ||
| multiplies it by 5: | ||
| none: |
Check the last one: , which is the original matrix with replaced by . A column operation is done by multiplying on the right, , with built from the identity by the same column move.
Since , the table gives the rule for determinants: a swap changes the sign, scaling a row by multiplies the determinant by , and a replacement changes nothing.
Definition
Row echelon form. A matrix is in row echelon form when
It follows that every entry below a pivot is 0. The matrix is in reduced row echelon form when, in addition, every pivot is 1 and is the only non-zero entry of its column. Example: is in reduced row echelon form.
Definition
Rank of a matrix , written (or ): the number of non-zero rows in any row echelon form of , that is, the number of pivots. Example: the matrix in the figure has rank 3.
Different sequences of operations can give different echelon forms, but they always have the same number of pivots, so the rank is well defined. For an matrix, , because there is at most one pivot in each row and in each column.
Write each operation beside the arrow, so that you, and an examiner, can check every step.
Worked example 1: echelon form, reduced form and rank
Reduce to row echelon form, then to reduced row echelon form, and state its rank.
Solution. The pivot of column 1 is the 1 in row 1. Clear below it:
This is a row echelon form with two pivots, so . Row 3 became zero because in the original matrix: the rows are linearly dependent. For the reduced form, clear the 2 above the second pivot:
Worked example 2: a rank that depends on a parameter
For which values of the real number does have rank 3? What is its rank otherwise?
Solution.
If , the entry is a third pivot and . If , row 3 is zero and .
Check with a determinant. Only replacements were used, so equals the product of the diagonal of the triangular matrix: . A square matrix has full rank exactly when its determinant is not zero, which agrees.
Worked example 3: a determinant by row reduction
Evaluate by reducing to triangular form.
Solution. Keep a record of every operation that changes the determinant.
The triangular matrix has determinant . One swap was made, which changed the sign, and the replacements changed nothing, so the original determinant is . (Cofactor expansion along row 1 gives , the same.)
Warning
One operation at a time, each using rows as they are now. Writing and in the same step is a mistake: the second operation needs the new , and doing both at once can wipe out information. Several replacements may share a step only if they all use the same unchanged pivot row, as in worked example 1.
Do not use column operations on an augmented matrix. A column operation mixes the unknowns, so the solutions change. Columns may be used freely when you only want the rank.
Tip
To find a rank quickly, look for rows that are multiples or sums of other rows before you compute: in every row is a multiple of , so the rank is 1 at sight.
MIT OpenCourseWare: Lecture 2 of 18.06 Linear Algebra, Elimination with Matrices, with Gilbert Strang (about 48 min). Watch how each elimination step is written as an elementary matrix, the same idea as the table in this lesson.
Practice
Questions 1 to 4 are routine; 5 and 6 need more care; 7 asks for a reason.
Sources and credits