Linear Algebra

LU Decomposition

Factor A = LU using the Doolittle algorithm. L is lower triangular with 1s on the diagonal; U is upper triangular. Then solve Ly = b and Ux = y.

Inputs

Warning: Doolittle LU requires no zero pivots. If a pivot is zero, the algorithm fails — try reordering rows manually or use a different method.
Matrix A and vector b
b

L, U and Solution

Matrix Grids: L, U, LU

Step-by-Step