Lesson 6 of 15
Triangular System Solvers
Triangular System Solvers
After LU decomposition, solving reduces to two cheap triangular solves:
- Step 1: (forward substitution)
- Step 2: (backward substitution)
Forward Substitution ()
is lower triangular, so solve top-to-bottom:
Backward Substitution ()
is upper triangular, so solve bottom-to-top:
Example
Your Task
Implement forward_sub(L, b) and backward_sub(U, b), then combine them in solve_lu(L, U, b).
Python runtime loading...
Loading...
Click "Run" to execute your code.