• Practice
  • About 20 min
  • 5 practice questions

Elementary transformations, row-echelon form and the rank of a matrix

Perform elementary row operations, reduce a matrix to row-echelon form, find the rank by the minor method and by row reduction, and find an inverse by the Gauss-Jordan method.

If something looks wrong, please tell us.

By the end of this lesson you can

  • Carry out and name the three elementary row operations Rᵢ ↔ Rⱼ, Rᵢ → λRᵢ and Rᵢ → Rᵢ + λRⱼ.
  • Decide whether a matrix is in row-echelon form and reduce a matrix to that form.
  • Find the rank ρ(A) by the minor method and by the row-reduction method.
  • Relate row operations to elementary matrices.
  • Find A⁻¹ by the Gauss-Jordan method, working on [A | Iₙ].

Computing nine cofactors works for a 3 × 3 matrix, but it becomes impossibly long for bigger ones. Elementary row operations give a mechanical method that scales to any size. They let us find the rank of a matrix, which decides whether a system of equations has solutions, and they give a second way to find an inverse.

Elementary row and column operations

  1. Interchange two rows: Rᵢ ↔ Rⱼ.
  2. Multiply a row by a non-zero constant λ: Rᵢ → λRᵢ.
  3. Add to a row λ times another row: Rᵢ → Rᵢ + λRⱼ.

The same three operations on columns (Cᵢ ↔ Cⱼ and so on) are elementary column operations; in this chapter we use row operations only. Two matrices of the same order are equivalent, written A ~ B, if one can be obtained from the other by elementary transformations. An equivalent matrix is usually not equal to the original; it shares important properties, above all the rank.

Row-echelon form

A row whose entries are all zero is a zero row. A non-zero matrix E is in row-echelon form if (i) every zero row lies below every non-zero row, and (ii) the first non-zero entry of each non-zero row lies to the right of the first non-zero entry of the row above it, so that all entries below each such leading entry are zero. For example [1 3 2 5; 0 0 4 1; 0 0 0 0] is in row-echelon form, while [0 2 1; 1 0 3; 0 0 1] is not, because the leading entry of row 2 lies to the left of the leading entry of row 1.

Reducing a matrix to row-echelon form

  1. Pivot Bring a row with a non-zero entry in the first possible column to the top (interchange if needed). That entry is the pivot.
  2. Clear below Use Rᵢ → Rᵢ + λR₁ to make every entry under the pivot zero.
  3. Move down Ignore the first row and repeat on the rows below.
  4. Stop When every remaining row is a zero row or no rows are left.
A row-echelon form is not unique, but its number of non-zero rows is.

Rank of a matrix

A sub-matrix of A is obtained by deleting some rows and some columns (deleting none gives A itself). The determinant of a square sub-matrix is a minor of A. The rank of A, written ρ(A), is the order of a highest-order non-vanishing minor of A. The rank of a zero matrix is 0.

  • If A has at least one non-zero element, ρ(A) ≥ 1.
  • ρ(Iₙ) = n.
  • If ρ(A) = r, some minor of order r is non-zero and every minor of order r + 1 or higher is zero.
  • For an m × n matrix, ρ(A) ≤ min{m, n}.
  • A square matrix of order n has an inverse if and only if ρ(A) = n.

Worked example 1: rank by the minor method

Find ρ(A) for A = [1 2 3; 2 4 6; 1 0 1]. Working: A is 3 × 3, so ρ(A) ≤ 3. The only third-order minor is |A| = 1(4·1 − 6·0) − 2(2·1 − 6·1) + 3(2·0 − 4·1) = 4 + 8 − 12 = 0, so ρ(A) < 3. A second-order minor from rows 1, 3 and columns 1, 2 is |1 2; 1 0| = 0 − 2 = −2 ≠ 0. Hence ρ(A) = 2.

Rank by row reduction

Searching minors is slow for large matrices. Two results make it easy: the rank of a matrix in row-echelon form is the number of its non-zero rows, and elementary row operations do not change the rank. So: reduce to row-echelon form and count the non-zero rows.

Worked example 2: rank by row reduction

Find the rank of A = [1 2 1 3; 2 4 3 7; 3 6 4 10]. Working: R₂ → R₂ − 2R₁ gives [0 0 1 1]; R₃ → R₃ − 3R₁ gives [0 0 1 1]; then R₃ → R₃ − R₂ gives [0 0 0 0]. The echelon form is [1 2 1 3; 0 0 1 1; 0 0 0 0], with two non-zero rows, so ρ(A) = 2 (less than min{3, 4} = 3).

Find the rank of B = [2 1 −1; 1 3 2; 3 −1 1]. Working: R₁ ↔ R₂ gives [1 3 2; 2 1 −1; 3 −1 1]. R₂ → R₂ − 2R₁ gives [0 −5 −5] and R₃ → R₃ − 3R₁ gives [0 −10 −5]. R₃ → R₃ − 2R₂ gives [0 0 5]. The echelon form [1 3 2; 0 −5 −5; 0 0 5] has three non-zero rows, so ρ(B) = 3. Check: |B| = 2(3 + 2) − 1(1 − 6) − 1(−1 − 9) = 10 + 5 + 10 = 25 ≠ 0, which agrees.

Elementary matrices and the Gauss-Jordan method

An elementary matrix is obtained from an identity matrix by a single elementary operation. Doing a row operation on A has the same effect as pre-multiplying A by the corresponding elementary matrix. For matrices with three rows, R₂ → R₂ − 2R₁ corresponds to E = [1 0 0; −2 1 0; 0 0 1]. Every non-singular matrix can be reduced to the identity by a sequence of row operations: Eₖ...E₂E₁A = Iₙ. Then Eₖ...E₂E₁ = A⁻¹, so the same operations turn Iₙ into A⁻¹. This is the Gauss-Jordan method.

Write [A | Iₙ]. Use row operations to turn the left half into Iₙ. The right half is then A⁻¹: [A | Iₙ] ~ [Iₙ | A⁻¹].

— Gauss-Jordan method

Worked example 3: a 2 × 2 inverse by Gauss-Jordan

Find the inverse of A = [2 1; 5 3]. Working: start with [2 1 | 1 0; 5 3 | 0 1]. R₁ → (1/2)R₁: [1 1/2 | 1/2 0]. R₂ → R₂ − 5R₁: [0 1/2 | −5/2 1]. R₂ → 2R₂: [0 1 | −5 2]. R₁ → R₁ − (1/2)R₂: [1 0 | 3 −1]. So A⁻¹ = [3 −1; −5 2]. Check: |A| = 6 − 5 = 1 and adj A = [3 −1; −5 2], the same answer.

Worked example 4: a 3 × 3 inverse by Gauss-Jordan

Find the inverse of A = [1 1 1; 1 2 3; 1 4 9]. Working: start with [1 1 1 | 1 0 0; 1 2 3 | 0 1 0; 1 4 9 | 0 0 1]. R₂ → R₂ − R₁ and R₃ → R₃ − R₁: rows become [0 1 2 | −1 1 0] and [0 3 8 | −1 0 1]. R₁ → R₁ − R₂: [1 0 −1 | 2 −1 0]. R₃ → R₃ − 3R₂: [0 0 2 | 2 −3 1]. R₃ → (1/2)R₃: [0 0 1 | 1 −3/2 1/2]. R₁ → R₁ + R₃: [1 0 0 | 3 −5/2 1/2]. R₂ → R₂ − 2R₃: [0 1 0 | −3 4 −1]. So A⁻¹ = [3 −5/2 1/2; −3 4 −1; 1 −3/2 1/2], which is (1/2)[6 −5 1; −6 8 −2; 2 −3 1], exactly the answer found with the adjoint in lesson 1.

Key takeaways: the three row operations never change the rank; the rank is the order of the largest non-zero minor, and for an echelon form it is the number of non-zero rows; ρ(A) ≤ min{m, n}; and reducing [A | I] to [I | A⁻¹] gives the inverse without any cofactors.

Check your understanding

  1. 1. What is the rank of A = [1 2; 2 4]?

    1. 1
    2. 0
    3. 2
    4. 4
    Show answer

    Answer: A. |A| = 4 − 4 = 0, so there is no non-zero minor of order 2 and ρ(A) < 2. A has non-zero elements, so ρ(A) ≥ 1. Hence ρ(A) = 1.

  2. 2. A is a matrix of order 3 × 5. What is the largest possible value of ρ(A)?

    1. 5
    2. 15
    3. 3
    4. 2
    Show answer

    Answer: C. ρ(A) ≤ min{m, n} = min{3, 5} = 3, because no square sub-matrix can have order larger than the number of rows.

  3. 3. What is the rank of the matrix [1 3 2 5; 0 0 4 1; 0 0 0 0]?

    1. 1
    2. 3
    3. 4
    4. 2
    Show answer

    Answer: D. The matrix is already in row-echelon form. Its rank is the number of non-zero rows, which is 2. For example the minor |1 2; 0 4| = 4 from rows 1, 2 and columns 1, 3 is non-zero, while the only 3-row minors include a zero row.

  4. 4. Which matrix is the elementary matrix for the operation R₁ ↔ R₂ on matrices with two rows?

    1. [1 0; 0 1]
    2. [0 1; 1 0]
    3. [1 1; 0 1]
    4. [0 1; 0 1]
    Show answer

    Answer: B. An elementary matrix is the identity matrix after one row operation. Interchanging the two rows of I₂ = [1 0; 0 1] gives [0 1; 1 0]. Pre-multiplying any 2-row matrix by it swaps that matrix's rows.

  5. 5. Which of these is NOT an elementary row operation?

    1. Interchanging rows 1 and 3
    2. Replacing row 2 by row 2 plus 4 times row 1
    3. Multiplying row 2 by 0
    4. Multiplying row 3 by −5
    Show answer

    Answer: C. An elementary operation may multiply a row only by a NON-ZERO constant. Multiplying by 0 destroys information (it cannot be undone) and can change the rank, so it is not allowed.

Privacy · Terms · Refunds · Delivery