LINEAR ALGEBRA/Student Engineering Notebook
Page 06·notes
SYSTEMS OF LINEAR EQUATIONS & DETERMINANTS—~25 MIN READ

LU Decomposition: Elimination You Can Reuse

GATE 2027 DA core: LU decomposition (also named in the CS/IT Engineering Mathematics syllabus)

“Gaussian elimination, written down once as A = LU, so every new right-hand side costs almost nothing.”

1.Elimination, remembered

Prerequisites: row reduction from [Systems of linear equations and Gaussian elimination](/notes/linear-algebra/systems-of-linear-equations-and-gaussian-elimination).

Gaussian elimination turns A into an upper-triangular U by subtracting multiples of pivot rows. LU decomposition simply keeps a record of those multiples. Put each multiplier l_ij (the amount of row j subtracted from row i) into a lower-triangular matrix L with 1s on its diagonal. Then A = LU exactly.

Why bother? Solving Ax = b by elimination costs about (2/3)n³ operations. Once you have L and U, each new right-hand side needs only two triangular solves, about 2n² operations. In data work you often solve with the same matrix many times, so this saving matters.

notice this:— Undo the subtractions

Elimination subtracts l_ij × (row j) from row i. To rebuild A from U you add those multiples back, which is why the multipliers appear in L with a plus sign.

WORKED NUMERICAL · STUDENT DERIVATION✎ Key Takeaway: Check by multiplying L·U back: row 3 is 4·[2,1,1] + 3·[0,1,1] + [0,0,2] = [8,7,9].

2. Worked example: factor, then solve

Problem Statement:
Factor A = [[2,1,1],[4,3,3],[8,7,9]] as LU, find det(A), and solve Ax = b for b = [4, 10, 24].
Step 1: Clear column 1

Pivot 2. Row 2 − 2·Row 1 and Row 3 − 4·Row 1.

l21 = 4/2 = 2, l31 = 8/2 = 4
↳ Result: [[2,1,1],[0,1,1],[0,3,5]]
Step 2: Clear column 2

Pivot 1. Row 3 − 3·Row 2.

l32 = 3/1 = 3
↳ Result: U = [[2,1,1],[0,1,1],[0,0,2]]
Step 3: Assemble L

Place each multiplier below the diagonal of the identity.

↳ Result: L = [[1,0,0],[2,1,0],[4,3,1]]
Step 4: Determinant

det(L) = 1, so det(A) is the product of U's diagonal.

det(A) = 2 · 1 · 2
↳ Result: 4
Step 5: Forward substitution, Ly = b

y1 = 4; y2 = 10 − 2·4 = 2; y3 = 24 − 4·4 − 3·2 = 2.

↳ Result: y = [4, 2, 2]
Step 6: Back substitution, Ux = y

x3 = 2/2 = 1; x2 = 2 − 1 = 1; x1 = (4 − 1 − 1)/2 = 1.

↳ Result: x = [1, 1, 1]
Final Answer:L = [[1,0,0],[2,1,0],[4,3,1]], U = [[2,1,1],[0,1,1],[0,0,2]], det(A) = 4, x = [1, 1, 1].

3.When LU needs a row exchange

Elimination fails when a pivot is zero. For A = [[0,1],[1,0]], the very first pivot is 0, so no LU without row exchanges exists, even though A is invertible.

The fix is to swap rows first. Collect the swaps in a permutation matrix P and factor PA = LU. Numerical libraries also swap rows to put the largest available entry in the pivot position (partial pivoting), because tiny pivots amplify rounding errors.

A clean test: LU with unit L exists and is unique when every leading principal submatrix A_1, A_2, …, A_n is invertible (each top-left k×k block has non-zero determinant).

STUDENT PRACTICE · CONCEPT DRILL

Practice

Problem 1 · FOUNDATION

During elimination on a 3×3 matrix you perform Row 2 − 5·Row 1. Which entry of L becomes 5?

Problem 2 · GATE-LEVEL

If A = LU with U = [[3,1,2],[0,−2,4],[0,0,5]] and L unit lower-triangular, what is det(A)?

Problem 3 · TRICKY

Which matrix has no LU factorization without row exchanges?

RAPID REVIEW · NOTEBOOK SUMMARY

One-minute revision

core principle:

“A = LU: U from elimination, L holds the multipliers (with 1s on the diagonal).”

must-remember principles:
  • •Ly = b, then Ux = y
  • •det(A) = product of U's diagonal
  • •Zero pivot ⇒ PA = LU
critical exam pitfalls:
  • •Multipliers enter L with a plus sign
  • •Invertible does not guarantee LU without pivoting
  • •Reuse L, U for each new b
SOURCE TRANSPARENCY & CITATIONS

Primary Academic References & Exam Sources

Every concept in Notes From a B.Tech Brain is synthesized from authoritative academic texts, seminal peer-reviewed research, verified exam archives, and renowned university lectures.

Primary Academic Texts
Introduction to Linear Algebraby · Chapter 2: elimination as A = LU, and PA = LU with row exchanges.
ACADEMIC STANDARD
Official Examination Archives
GATE 2027 DA syllabus↗IIT Madras · Linear Algebra: Gaussian elimination, LU decomposition.
GATE CS OFFICIAL
Curated University Lecture Series
MIT 18.06 Linear Algebra (OpenCourseWare)↗MIT OpenCourseWare, Gilbert Strang · Lecture 4: factorization into A = LU.
LECTURE SERIES