Math · Linear Algebra

LU Factorization Calculator

Decompose any square matrix into a lower-triangular L and an upper-triangular U such that PA = LU, using partial pivoting — with instant verification.

Doolittle method: L has unit diagonal; compute Uk,j = Ak,j − Σ Lk,tUt,j, then Li,k = (Ai,k − Σ Li,tUt,k) / Uk,k.
Partial pivoting: rows are swapped so the largest available pivot is used, giving PA = LU.

Up to 4 × 4

Works for any square matrix size from 2×2 to 4×4.

Partial pivoting

Numerically stable PA = LU decomposition even with zero diagonals.

Instant verification

The error between L·U and P·A is computed for every result.

Rank & determinant

Extra insights straight from the factorization — free of extra work.

More Linear Algebra Tools

Explore matrices and equation solvers.