CSC212 Numerical Method

Numerical MethodUnit 312 min read

Matrix Factorization & Special Methods: LU, Cholesky, Crout, Doolittle

Unit 3 of Numerical Method covers matrix factorization techniques (LU, Cholesky, Crout, Doolittle) and special methods for solving linear systems, including their derivation, applications, and computational efficiency.

Matrix Factorization: Overview and Importance

Matrix factorization decomposes a matrix into simpler matrices whose product reconstructs the original matrix. This is crucial for:

  • Solving linear systems efficiently.
  • Improving numerical stability.
  • Reducing computational cost in iterative methods.

Why Factorize?

  • Efficiency: Solving via factorization is often faster than direct methods like Gaussian elimination.
  • Stability: Some factorizations (e.g., LU with partial pivoting) improve numerical accuracy.
  • Reusability: If is fixed but changes, factorization allows solving multiple systems cheaply.

1. LU Decomposition

LU decomposition expresses a matrix as the product of a lower triangular (L) and an upper triangular (U) matrix: where:

  • has unit diagonal (1s) and sub-diagonal elements.
  • is upper triangular.

Methods of LU Decomposition

Three common variants differ in how is structured:

Method Form of Key Feature When to Use
Doolittle Unit diagonal (1s) General-purpose, widely used
Crout Unit diagonal (1s) Alternative to Doolittle
Cholesky Only for symmetric positive definite matrices , or Faster for SPD matrices (no complex ops)

1.1 Doolittle’s LU Decomposition

Algorithm: For an matrix , compute and such that: with:

  • (unit diagonal),
  • for (upper triangular),
  • for (lower triangular).

Steps:

  1. For to :
    • For to :
    • For to :

Example: Factorize:

Solution:

  1. First column (j=1):

  2. Second column (j=2):

  3. Third column (j=3):

    • (but corrected via formula) (Note: )

Final Factorization:

Verification:


1.2 Solving Using LU Decomposition

Once , solve in two steps:

  1. Forward substitution: Solve for .
  2. Backward substitution: Solve for .

Example: Solve where:

Step 1: Solve

Step 2: Solve

Solution:


1.3 Partial Pivoting in LU Decomposition

Problem: Without pivoting, large errors can occur if is small (near zero). Solution: Partial pivoting swaps rows to ensure is maximized in its column.

Modified Doolittle with Partial Pivoting:

  1. For each column , find the row with the largest (pivot element).
  2. Swap rows and in (and update accordingly).
  3. Proceed with decomposition.

Example: Apply partial pivoting to the previous :

  • Column 1: Max is (row 2). Swap row 1 and 2.
  • Updated :
  • Proceed with decomposition (resulting and will differ from above).

2. Cholesky Decomposition

For symmetric positive definite (SPD) matrices (i.e., and for all ), Cholesky decomposition is: where is lower triangular with positive diagonal entries.

Why Cholesky?

  • Faster: Avoids complex arithmetic (unlike LU for non-SPD matrices).
  • Numerically stable: For SPD matrices, no pivoting is needed.

Algorithm

For , compute where:

  1. For to :
    • For to :

Example

Factorize:

Step 1 (j=1):

Step 2 (j=2):

Step 3 (j=3):

  • → Error! (This matrix is not positive definite. Check: must satisfy for all .)

Correction: Use a matrix that is SPD, e.g.:

Recomputing:

Final :

Verification:


3. Crout’s LU Decomposition

Crout’s method is similar to Doolittle but forces to have unit diagonal (1s): where:

  • ,
  • for .

Algorithm:

  1. For to :
    • For to :
    • For to :

Example: Factorize the same as in Doolittle’s example using Crout’s method.

(Note: Crout’s method is less commonly used than Doolittle but is included for completeness.)


4. Comparison of Factorization Methods

Method Applicability Advantages Disadvantages Computational Cost
Doolittle LU General matrices Simple, widely used Requires pivoting for stability
Crout LU General matrices Alternative to Doolittle Less intuitive for some users
Cholesky SPD matrices only No pivoting needed, faster Fails for non-SPD matrices
Partial Pivoting LU General matrices Improves numerical stability Slightly more complex implementation

5. Special Methods for Linear Systems

Beyond factorization, other methods exist for specific cases:

5.1 Thomas Algorithm (Tridiagonal Matrices)

For tridiagonal matrices (non-zero only on main diagonal and adjacent diagonals), the Thomas algorithm is a simplified LU decomposition.

Example: Solve:

Steps:

  1. Forward sweep (modify diagonals):

    • (where is the main diagonal)
    • (Here, is the sub-diagonal, is the main diagonal, is the super-diagonal.)
  2. Backward sweep (solve for ):

Solution: (Detailed steps omitted for brevity; result: )


5.2 Applications of Matrix Factorization

  1. Solving Linear Systems: is solved efficiently via .
  2. Matrix Inversion: (though inversion is rarely needed directly).
  3. Eigenvalue Problems: Factorization aids in iterative methods like QR algorithm.
  4. Least Squares: Used in solving overdetermined systems .
  5. Graph Theory: Adjacency matrices in networks are often factorized.

Exam Tip

What to Expect in Exams

  1. Theoretical Questions:

    • Derive the formula for Doolittle’s LU decomposition or Cholesky decomposition.
    • Explain why Cholesky requires SPD matrices.
    • Compare LU vs. Cholesky in terms of applicability and efficiency.
  2. Numerical Problems:

    • Factorize a given matrix using Doolittle, Crout, or Cholesky.
    • Solve using the factorization obtained.
    • Apply partial pivoting during LU decomposition.
  3. Short Answer/Definitions:

    • Define symmetric positive definite (SPD) matrix.
    • What is the role of pivoting in LU decomposition?
    • When is Cholesky decomposition preferred?
  4. Common Pitfalls:

    • Forgetting to check if a matrix is SPD before applying Cholesky.
    • Incorrectly assuming or is unit diagonal (mix-up between Doolittle and Crout).
    • Skipping partial pivoting in LU, leading to large errors.

Marks Distribution (Typical)

Topic Weightage Key Focus Areas
LU Decomposition 30% Doolittle/Crout, partial pivoting, solving
Cholesky Decomposition 25% SPD condition, algorithm, verification
Special Methods 20% Thomas algorithm, applications
Theory/Definitions 25% Definitions, comparisons, advantages/disadvantages
  1. Memorize Algorithms: Write down the step-by-step formulas for LU and Cholesky.
  2. Practice Factorization: Solve 2-3 numerical problems per method.
  3. Understand SPD Check: For Cholesky, verify and all leading principal minors > 0.
  4. Partial Pivoting: Always mention its necessity in LU unless specified otherwise.
  5. Time Management: Allocate ~15-20 minutes for a 10-mark numerical question on factorization.

Past Exam Questions Covered in This Unit

Question Type Example from Past Papers Solution Strategy
LU Decomposition Factorize a 3x3 matrix using Doolittle. Follow the algorithm step-by-step.
Cholesky Decomposition Factorize a symmetric matrix using Cholesky. Check SPD first; apply the formula.
Solving via LU Solve a system after given and . Forward/backward substitution.
Partial Pivoting Apply pivoting during LU decomposition. Swap rows to maximize pivot element.
Theoretical Comparison Compare LU and Cholesky. Table format with pros/cons.

Quick Revision Checklist

  • Can derive Doolittle’s LU formula from scratch.
  • Know when to use Cholesky vs. LU.
  • Can factorize a 3x3 matrix using any method.
  • Understand partial pivoting and its importance.
  • Recall SPD matrix conditions.
  • Can solve using forward/backward substitution.

Based on the TU BSc CSIT syllabus for Numerical Method (CSC212), unit 3.

Discussion

Loading…