Tutorials › Linear Algebra › L and U as Records of Elimination

LU Factorization and Numerical Considerations · Tutorial 904 of 1000

L and U as Records of Elimination

Read the elimination multipliers from \(L\), identify the final matrix \(U\), and use both factors to recover the original row-reduction process.

Intermediate 10 min read

What You'll Learn

  • Interpret entries below the diagonal of \(L\) as the multipliers used in elimination.
  • Explain how \(U\) records the final upper-triangular matrix.
  • Recover each elimination step from \(L\) and \(U\).
  • Verify a proposed factorization by multiplying \(L\) and \(U\).
  • Identify why multipliers must be computed from the current matrix, not the original entries.

Two Matrices, Two Records

Gaussian elimination changes a matrix one stage at a time. At each stage, entries below a pivot are eliminated by subtracting multiples of the pivot row. The final upper-triangular matrix records the result of all those operations, but it does not by itself record which multiples were used. In an LU factorization, the two factors preserve both kinds of information: \(U\) is the final matrix, and \(L\) stores the multipliers from the elimination stages.

Throughout, matrices and scalars are over \(\mathbb{R}\). We consider square matrices and elimination without row exchanges. At each stage, the pivot must be nonzero so that the required multipliers are defined. The row operation that eliminates the entry in row \(i\), column \(k\) is \(R_i\to R_i-l_{ik}R_k\); the multiplier is calculated using the matrix as it stands at stage \(k\), after the earlier stages have been completed.

Definition: Suppose elimination without row exchanges reduces a square matrix \(\mathbf{A}\) to an upper-triangular matrix \(\mathbf{U}\), with all pivots nonzero. The multiplier \(l_{ik}\) is the number used at stage \(k\) to eliminate the entry in row \(i\), column \(k\), for \(i>k\). The matrix \(\mathbf{L}\) is the unit lower-triangular matrix whose diagonal entries are \(1\) and whose entries below the diagonal are these multipliers. The resulting factorization is \(\mathbf{A}=\mathbf{L}\mathbf{U}\).

For a \(3\times3\) matrix, the factors have the form

$$ \mathbf{L}= \begin{bmatrix} 1&0&0\\ l_{21}&1&0\\ l_{31}&l_{32}&1 \end{bmatrix}, \qquad \mathbf{U}= \begin{bmatrix} u_{11}&u_{12}&u_{13}\\ 0&u_{22}&u_{23}\\ 0&0&u_{33} \end{bmatrix}. $$

The position of each multiplier tells you its stage. The entries \(l_{21}\) and \(l_{31}\) describe the eliminations below the first pivot; \(l_{32}\) describes the elimination below the second pivot. The diagonal entries of \(\mathbf{L}\) are \(1\), not additional multipliers. By contrast, the entries of \(\mathbf{U}\), conventionally denoted \(u_{ij}\), are entries of the final upper-triangular matrix.

Recovering the Steps from the Factors

Worked Example: Reconstructing Every Elimination Stage

Suppose the factors are

$$ \mathbf{L}= \begin{bmatrix} 1&0&0\\ -2&1&0\\ 3&\frac12&1 \end{bmatrix}, \qquad \mathbf{U}= \begin{bmatrix} 2&1&1\\ 0&3&2\\ 0&0&4 \end{bmatrix}. $$

First multiply \(\mathbf{L}\mathbf{U}\) to recover the original matrix. Each row of the product is the corresponding linear combination of the rows of \(\mathbf{U}\):

$$ \begin{aligned} \text{row }1&=(2,1,1),\\ \text{row }2&=-2(2,1,1)+(0,3,2)=(-4,1,0),\\ \text{row }3&=3(2,1,1)+\frac12(0,3,2)+(0,0,4)=(6,\frac92,8). \end{aligned} $$

Thus the original matrix is \(\mathbf{A}=\begin{bmatrix}2&1&1\\-4&1&0\\6&\frac92&8\end{bmatrix}\). The first column of \(\mathbf{L}\) says that the first-stage multipliers are \(l_{21}=-2\) and \(l_{31}=3\). Apply the corresponding operations to \(\mathbf{A}\):

$$ \begin{bmatrix} 2&1&1\\ -4&1&0\\ 6&\frac92&8 \end{bmatrix} \xrightarrow[\ R_3\to R_3-3R_1\ ]{R_2\to R_2-(-2)R_1} \begin{bmatrix} 2&1&1\\ 0&3&2\\ 0&\frac32&5 \end{bmatrix}. $$

The second-stage multiplier is \(l_{32}=\frac12\), read from row 3, column 2 of \(\mathbf{L}\). Subtract half of row 2 from row 3:

$$ \begin{bmatrix} 2&1&1\\ 0&3&2\\ 0&\frac32&5 \end{bmatrix} \xrightarrow{R_3\to R_3-\frac12R_2} \begin{bmatrix} 2&1&1\\ 0&3&2\\ 0&0&4 \end{bmatrix} =\mathbf{U}. $$

Check: the final matrix is exactly the stated \(\mathbf{U}\). Also, the product calculation gave rows \((2,1,1)\), \((-4,1,0)\), and \((6,\frac92,8)\), which are the rows of the recovered \(\mathbf{A}\). The negative multiplier \(l_{21}=-2\) means the row operation adds \(2R_1\) to row 2; the sign in the operation is \(R_2\to R_2-l_{21}R_1\).

This example illustrates how to use both factors as records. To replay the elimination, read the multipliers in \(\mathbf{L}\) by columns, starting with column 1 and then moving right. To recover the matrix before elimination, multiply \(\mathbf{L}\mathbf{U}\). These are related tasks, but they are not the same: \(\mathbf{U}\) gives the endpoint, while the off-diagonal entries of \(\mathbf{L}\) give the elimination history.

Why the Factorization Stores the Multipliers

Theorem: Let \(\mathbf{A}\in\mathbb{R}^{n\times n}\). Suppose Gaussian elimination without row exchanges proceeds through all \(n-1\) stages with nonzero pivots. Let \(l_{ik}\) be the multiplier used to eliminate the entry in row \(i\), column \(k\), at stage \(k\), and let \(\mathbf{U}\) be the final upper-triangular matrix. Then \(\mathbf{A}=\mathbf{L}\mathbf{U}\), where \(\mathbf{L}\) has diagonal entries \(1\), entries \(l_{ik}\) below the diagonal, and zeros above the diagonal.

Proof. For each stage \(k\), let \(\mathbf{N}_k\) be the matrix with entries \(l_{ik}\) in positions \((i,k)\) for \(i>k\), and zeros elsewhere. The elimination at stage \(k\) is left multiplication by \(\mathbf{E}_k=\mathbf{I}_n-\mathbf{N}_k\): this subtracts \(l_{ik}\) times row \(k\) from row \(i\) for every \(i>k\). Since the only potentially nonzero entries of \(\mathbf{N}_k\) are in column \(k\), and its row \(k\) is zero, \(\mathbf{N}_k^2=\mathbf{O}\). Consequently, \((\mathbf{I}_n-\mathbf{N}_k)(\mathbf{I}_n+\mathbf{N}_k)=\mathbf{I}_n\), so \(\mathbf{E}_k^{-1}=\mathbf{I}_n+\mathbf{N}_k\). After all stages, \(\mathbf{U}=\mathbf{E}_{n-1}\cdots\mathbf{E}_1\mathbf{A}\), hence \(\mathbf{A}=(\mathbf{I}_n+\mathbf{N}_1)\cdots(\mathbf{I}_n+\mathbf{N}_{n-1})\mathbf{U}\). If \(i<j\), then \(\mathbf{N}_i\mathbf{N}_j=\mathbf{O}\): a nonzero product would require a row index greater than \(j\) to equal the column index \(i\), which is impossible when \(i<j\). Thus the product of the factors \(\mathbf{I}_n+\mathbf{N}_k\), in the displayed order, is \(\mathbf{I}_n+\mathbf{N}_1+\cdots+\mathbf{N}_{n-1}\). This is precisely the unit lower-triangular matrix with entry \(l_{ik}\) in position \((i,k)\). Calling it \(\mathbf{L}\) gives \(\mathbf{A}=\mathbf{L}\mathbf{U}\), as required. \(\square\)

The proof explains why the entries below \(\mathbf{L}\)'s diagonal are the actual stage multipliers, rather than a new set of coefficients obtained by multiplying arbitrary elimination matrices. The order of the elimination stages matters, and the zero products in the proof ensure that each multiplier remains in its own position in \(\mathbf{L}\).

Computing the Record from an Original Matrix

Worked Example: Building the Factors Stage by Stage

Find the multipliers and the final matrix when elimination is applied to

$$ \mathbf{A}= \begin{bmatrix} 2&1&0\\ 4&3&1\\ 2&5&6 \end{bmatrix}. $$

At the first pivot, which is \(2\), the multipliers are \(l_{21}=4/2=2\) and \(l_{31}=2/2=1\). Apply both operations:

$$ \begin{bmatrix} 2&1&0\\ 4&3&1\\ 2&5&6 \end{bmatrix} \xrightarrow[\ R_3\to R_3-R_1\ ]{R_2\to R_2-2R_1} \begin{bmatrix} 2&1&0\\ 0&1&1\\ 0&4&6 \end{bmatrix}. $$

At the second pivot, which is \(1\) in the updated matrix, the multiplier is \(l_{32}=4/1=4\). Therefore

$$ \begin{bmatrix} 2&1&0\\ 0&1&1\\ 0&4&6 \end{bmatrix} \xrightarrow{R_3\to R_3-4R_2} \begin{bmatrix} 2&1&0\\ 0&1&1\\ 0&0&2 \end{bmatrix} =\mathbf{U}. $$

The multipliers fill the corresponding positions of \(\mathbf{L}\):

$$ \mathbf{L}= \begin{bmatrix} 1&0&0\\ 2&1&0\\ 1&4&1 \end{bmatrix}. $$

Check: multiplying the factors gives row 1 \((2,1,0)\), row 2 \(2(2,1,0)+(0,1,1)=(4,3,1)\), and row 3 \((2,1,0)+4(0,1,1)+(0,0,2)=(2,5,6)\). Thus \(\mathbf{L}\mathbf{U}=\mathbf{A}\), and the multipliers match the two operations.

The stage number is essential when recording a multiplier. At stage 2, row 3 has already been changed by the first elimination. Its entry in column 2 is \(4\), and the current pivot is \(1\), so \(l_{32}=4\). The original entries \(a_{32}=5\) and \(a_{22}=3\) do not determine this multiplier.

A Small Factorization and Uniqueness

Worked Example: Reading a Positive Multiplier

Suppose

$$ \mathbf{L}= \begin{bmatrix} 1&0\\ \frac12&1 \end{bmatrix}, \qquad \mathbf{U}= \begin{bmatrix} 4&2\\ 0&3 \end{bmatrix}. $$

Multiplication gives

$$ \mathbf{A}=\mathbf{L}\mathbf{U} = \begin{bmatrix} 4&2\\ 2&4 \end{bmatrix}. $$

The entry \(l_{21}=\frac12\) says that the first elimination step is \(R_2\to R_2-\frac12R_1\). Indeed, row 2 changes from \((2,4)\) to \((2,4)-\frac12(4,2)=(0,3)\), giving \(\mathbf{U}\).

Check: the product has second row \(\frac12(4,2)+(0,3)=(2,4)\), and the row operation produces the stated second row of \(\mathbf{U}\).

Theorem: If \(\mathbf{A}\in\mathbb{R}^{n\times n}\) has two factorizations \(\mathbf{A}=\mathbf{L}_1\mathbf{U}_1=\mathbf{L}_2\mathbf{U}_2\), where both \(\mathbf{L}_1,\mathbf{L}_2\) are unit lower-triangular and both \(\mathbf{U}_1,\mathbf{U}_2\) are upper-triangular with nonzero diagonal entries, then the two factorizations are identical.

Proof. A triangular matrix with nonzero diagonal has an inverse of the same triangular type: solving a triangular system by substitution determines each variable uniquely in order, and applying this to each coordinate vector gives the columns of the inverse. Thus \(\mathbf{L}_2^{-1}\) is unit lower-triangular and \(\mathbf{U}_1^{-1}\) is upper-triangular. From \(\mathbf{L}_1\mathbf{U}_1=\mathbf{L}_2\mathbf{U}_2\), multiply on the left by \(\mathbf{L}_2^{-1}\) and on the right by \(\mathbf{U}_1^{-1}\) to obtain \(\mathbf{L}_2^{-1}\mathbf{L}_1=\mathbf{U}_2\mathbf{U}_1^{-1}\). The left side is unit lower-triangular and the right side is upper-triangular. A matrix that is both lower- and upper-triangular is diagonal; because the left side has diagonal entries \(1\), both sides must equal \(\mathbf{I}_n\). Therefore \(\mathbf{L}_2^{-1}\mathbf{L}_1=\mathbf{I}_n\) and \(\mathbf{U}_2\mathbf{U}_1^{-1}=\mathbf{I}_n\), which give \(\mathbf{L}_1=\mathbf{L}_2\) and \(\mathbf{U}_1=\mathbf{U}_2\). \(\square\)

This uniqueness statement concerns factorizations with the stated triangular forms and nonzero diagonal in \(\mathbf{U}\). In the no-row-exchange setting, it means the multiplier record and the final upper-triangular matrix are fixed once the factorization exists.

Common Mistake: Using Original Entries for Later Multipliers

In the second worked example, a tempting but incorrect calculation is \(l_{32}=a_{32}/a_{22}=5/3\). That ratio uses entries from the original matrix, even though the second pivot step occurs after the first elimination. Using \(5/3\) would produce the incorrect candidate

$$ \widetilde{\mathbf{L}}= \begin{bmatrix} 1&0&0\\ 2&1&0\\ 1&\frac53&1 \end{bmatrix}. $$

With the correct final matrix \(\mathbf{U}\), its product has third row \((2,1,0)+\frac53(0,1,1)+(0,0,2)=(2,\frac83,\frac{11}{3})\), which is not the original third row \((2,5,6)\). The correction is to use the current matrix after stage 1: the relevant entry is \(4\), and the current pivot is \(1\), so \(l_{32}=4/1=4\). This gives the correct product and the correct elimination step.

Another sign error is to read a negative multiplier as the number added to the row. The prescribed operation is \(R_i\to R_i-l_{ik}R_k\). Thus \(l_{21}=-2\) means add \(2R_1\), while \(l_{21}=2\) means subtract \(2R_1\). Keeping the multiplier and the row-operation sign distinct prevents confusion when reconstructing the steps.

Why the Records Are Useful

The factorization separates the elimination outcome from the operations that produced it. The upper-triangular matrix \(\mathbf{U}\) is useful because it shows the system after elimination. The lower-triangular matrix \(\mathbf{L}\) preserves the multipliers, so the original matrix can be recovered as \(\mathbf{L}\mathbf{U}\), and the elimination can be replayed stage by stage. This record is also useful when checking a computed factorization: multiply the factors to recover \(\mathbf{A}\), then compare the entries of \(\mathbf{L}\) with the ratios used at the corresponding stages.

The factorization described here assumes no row exchanges and nonzero pivots at every stage. If a pivot is zero, the multiplier ratio at that stage is undefined, so this procedure cannot continue as stated. The treatment of row exchanges and pivot choices requires a different factorization form.

Check Your Understanding

Use the meaning of the entries in \(\mathbf{L}\) and \(\mathbf{U}\) to answer each question.

  1. For \(\mathbf{L}=\begin{bmatrix}1&0&0\\-3&1&0\\2&\frac14&1\end{bmatrix}\), list the row operations encoded by the entries below the diagonal.
  2. If \(l_{32}=\frac12\), what current-matrix entries determine this multiplier at stage 2?
  3. For \(\mathbf{L}=\begin{bmatrix}1&0\\2&1\end{bmatrix}\) and \(\mathbf{U}=\begin{bmatrix}3&1\\0&4\end{bmatrix}\), calculate \(\mathbf{L}\mathbf{U}\) and state the elimination operation.
  4. Why must \(l_{32}\) be computed from the matrix after stage 1 rather than from \(a_{32}/a_{22}\)?
  5. In the no-row-exchange process, what condition on the pivots is needed for the multipliers to be defined?

Test yourself: Linear Algebra final exam practice

Ready to check what you know? Work a full-length practice final, then open the complete worked solutions.

Want all 1,114 practice problems?

This tutorial covers one topic. Calc Pass covers the full Calculus AB & BC curriculum (the core of Calculus I and II): full review, every practice question, and step-by-step solutions to each one.

QR code to download the Calc Pass app

Get the Calc Pass App

Scan to download and practice on the go, with instant scoring.

Calc Pass Volume 1: 1,114 Practice Questions book cover

Vol. 1: 1,114 Questions

The complete practice question bank, organized by AB & BC topic.

View on Amazon
Calc Pass Volume 2: Solutions Manual book cover

Vol. 2: Solutions Manual

Fully worked solutions to every question in Volume 1.

View on Amazon