Decompose a square matrix into lower (L) and upper (U) triangular matrices using LU factorization with partial pivoting.
Decompose a square matrix into lower (L) and upper (U) triangular matrices using LU factorization with partial pivoting.
Try these sample matrices to see how LU decomposition works
Basic example with integer values
Size: 2×2
Matrix:
[4, 3]
[6, 3]
Nearly diagonal matrix for clear L and U separation
Size: 3×3
Matrix:
[2, 1, 0]
[1, 3, 2]
[0, 1, 4]
Mixed positive and negative values
Size: 3×3
Matrix:
[1, 2, -1]
[3, 1, 2]
[2, 3, 1]
Complex matrix requiring partial pivoting
Size: 4×4
Matrix:
[2.5, 1.2, 0.8, 1.1]
[1.3, 3.7, 2.1, 0.9]
[0.7, 2.2, 4.1, 1.8]
[1.9, 0.8, 1.7, 3.2]