Home › Matrix Math › Lesson 2

Row Reduction, Rank and LU Factorization

Lesson 2 of 12

Key idea of this section

row operations = left multiplication by invertible elementary matrices
row rank = column rank          A = LU  ⇔  leading minors ≠ 0 (A invertible)

Elementary matrices and echelon form

The three elementary row operations, namely swapping two rows, multiplying a row by a nonzero scalar, and adding a multiple of one row to another, are each effected by left multiplication by an invertible elementary matrix E obtained by performing the same operation on I. Consequently row reduction of A produces EA with E = Ek ⋯ E₁ invertible, and it preserves the null space: Ax = 0 if and only if EAx = 0. Equivalently, row operations preserve every linear relation among the columns of A.

A matrix is in reduced row echelon form (RREF) if every nonzero row lies above every zero row, the first nonzero entry of each nonzero row (its pivot) equals 1 and lies strictly to the right of the pivot in the row above, and each pivot is the only nonzero entry in its column. Gauss–Jordan elimination shows that every matrix can be brought to RREF.

Theorem 2.1 (Uniqueness of RREF). Each matrix A is row-equivalent to exactly one matrix in reduced row echelon form.

Proof. Let R be any RREF of A. Because row operations preserve linear relations among columns, column j of R lies in the span of the preceding columns of R exactly when column j of A lies in the span of the preceding columns of A. In an RREF the pivot columns are precisely the columns not in the span of their predecessors, so the pivot positions are determined by A alone. If the pivot columns are j₁ < ⋯ < jr, then the pivot columns of R are e₁, …, er, and every non-pivot column of R is the coefficient vector expressing the corresponding column of A in terms of columns j₁, …, jr of A; those coefficients are unique because the pivot columns of A are independent. Hence every entry of R is determined by A. ∎

Theorem 2.2 (Row rank equals column rank). For every A ∈ 𝔽m×n, dim col(A) = dim col(Aᵀ).

Proof. Let r = dim col(A) and let C ∈ 𝔽m×r have as columns a basis of col(A). Each column of A is a combination of the columns of C, so A = CF for some F ∈ 𝔽r×n. Then each row of A is a combination of the r rows of F, so the row space of A has dimension at most r. Thus row rank ≤ column rank for every matrix; applying this to Aᵀ gives the reverse inequality. ∎

The factorization A = CF with C of full column rank and F of full row rank is called a rank factorization. The common value r is the rank of A, and equals the number of pivots in its RREF. In the RREF the non-pivot columns correspond to free variables, and setting one free variable to 1 and the others to 0 produces a basis of null(A), confirming nullity = n − r.

Worked example: A = [ 1 2 3 ; 4 5 6 ; 7 8 9 ] reduces as R₂ − 4R₁ = (0, −3, −6), R₃ − 7R₁ = (0, −6, −12), then R₃ − 2R₂ = 0. The RREF is [ 1 0 −1 ; 0 1 2 ; 0 0 0 ], so the rank is 2, and the free variable x₃ = 1 gives x₁ = 1, x₂ = −2: the null space is spanned by (1, −2, 1). Indeed column 1 − 2 · column 2 + column 3 = 0.

The LU factorization

Gaussian elimination without row swaps subtracts multiples ℓij of row j from row i (i > j) to clear column j below the diagonal. Each step is left multiplication by a unit lower-triangular matrix, the product of these is unit lower triangular, and so is its inverse, which contains the multipliers ℓij in their natural positions. The result is A = LU with L unit lower triangular and U upper triangular.

Theorem 2.3 (Existence and uniqueness of LU). An invertible A ∈ 𝔽n×n has a factorization A = LU with L unit lower triangular and U upper triangular if and only if every leading principal submatrix Ak (rows and columns 1, …, k) is invertible. The factorization is then unique.

Proof. If A = LU, the block structure of triangular matrices gives Ak = Lk Uk, so det Ak = det Uk = u₁₁ ⋯ ukk; since det A ≠ 0 all uii ≠ 0, hence every det Ak ≠ 0. Conversely, induct on n. Write A = [ An−1 b ; cᵀ d ] with An−1 = L′U′ by induction, and seek L = [ L′ 0 ; ℓᵀ 1 ], U = [ U′ u ; 0 δ ]. Multiplying out requires L′u = b, ℓᵀU′ = cᵀ and ℓᵀu + δ = d, which are uniquely solvable because L′ and U′ are invertible. For uniqueness in general, L₁U₁ = L₂U₂ gives L₂⁻¹L₁ = U₂U₁⁻¹, a matrix that is simultaneously unit lower triangular and upper triangular, hence equal to I. ∎

Worked example: for A = [ 2 1 1 ; 4 3 3 ; 8 7 9 ], subtract 2 × row 1 from row 2 and 4 × row 1 from row 3 to get rows (0, 1, 1) and (0, 3, 5); then subtract 3 × the new row 2 from row 3 to get (0, 0, 2). Recording the multipliers 2, 4, 3,

[ 2  1  1 ]   [ 1  0  0 ] [ 2  1  1 ]
[ 4  3  3 ] = [ 2  1  0 ] [ 0  1  1 ]
[ 8  7  9 ]   [ 4  3  1 ] [ 0  0  2 ]

The condition of Theorem 2.3 can fail even for invertible matrices, for example [ 0 1 ; 1 0 ]. Partial pivoting, which at step j swaps into the pivot position the entry of largest absolute value in column j, always succeeds for invertible A and gives PA = LU with P a permutation matrix and all |ℓij| ≤ 1. Its numerical behaviour is discussed in Lesson 12.

Cost. Elimination on an n × n matrix requires about (2/3)n³ floating-point operations. Once A = LU is known, each system Ax = b is solved by forward substitution Ly = b and back substitution Ux = y in about 2n² operations. This is why one factors a matrix once and reuses the factors, and why one essentially never forms A⁻¹ explicitly in order to solve a linear system.

Exercise

  • (a)
    Find the LU factorization of A = [ 1 2 ; 3 8 ].
  • (b)
    Find the rank of B = [ 1 2 1 0 ; 2 4 0 2 ; 3 6 1 2 ].
  • (c)
    Show directly that [ 0 1 ; 1 0 ] has no factorization LU with L unit lower triangular and U upper triangular.
Show solution

Answers: (a) The multiplier is 3, and row 2 − 3 × row 1 = (0, 2), so L = [ 1 0 ; 3 1 ] and U = [ 1 2 ; 0 2 ]. (b) Row 3 = row 1 + row 2, while rows 1 and 2 are independent, so the rank is 2. (c) Comparing (1, 1) entries gives 0 = 1 · u₁₁, so u₁₁ = 0; but then the (2, 1) entry of LU is ℓ₂₁u₁₁ = 0 ≠ 1, a contradiction.

V.3.1