86. LU Decomposition

Given a matrix 𝐴, LU decomposition aims to express 𝐴 as:

𝐴=𝐿𝑈

Where:

  1. Solve 𝐿𝑦=𝑏 Using Forward Substitution
𝐿𝑦=𝑏

Where:

[𝐿1100𝐿21𝐿220𝐿31𝐿32𝐿33][𝑦1𝑦2𝑦3][𝑏1𝑏2𝑏3]𝑦2=𝑏2𝐿21𝑦1𝐿22𝑦3=𝑏2𝐿31𝑦1𝐿32𝑦2𝐿33
  1. Solve 𝑈𝑥=𝑦 Using Backward Substitution
𝑈𝑥=𝑦

Where:

[𝑈11𝑈12𝑈130𝑈22𝑈2300𝑈33][𝑥1𝑥2𝑥3][𝑦1𝑦2𝑦3]𝑥2=𝑦2𝑈23𝑥3𝑈22𝑥1=𝑦1𝑈12𝑥2𝑈13𝑥3𝑈11
Example
𝐴=[2314736185]𝑏=[51231]
  1. Factor 𝐴 into 𝐿 and 𝑈:
𝐿=[100210361]𝑈=[231011002]
  1. Solve 𝐴𝑥=𝑏
  • 𝑦1=𝑏1𝐿11=51=5

  • 𝑦2=𝑏2𝐿21𝑦1𝐿22=122×51=2

  • 𝑦2=𝑏3𝐿31𝑦1𝐿32𝑦2𝐿33=314×53×21=5

So,

𝑦=[525]
  1. Solve 𝑈𝑥=𝑦
  • 𝑥3=𝑦3𝑈33=52=2.5

  • 𝑥2=𝑦2𝑈23𝑥3𝑈22=21×2.51=4.5

  • 𝑥1=𝑦1𝑈12𝑥2𝑈13𝑥3𝑈11=53×4.51×2.52=4

So,

𝑥=[44.52.5]