LU Decomposition Calculator
Decompose a square matrix into L (lower) and U (upper) triangular matrices.
--
--
This tool is for informational and educational purposes only. It is not a substitute for professional financial, medical, legal, or engineering advice. See Terms of Service.
Can't find what you need?
Request a ToolHow to Use the LU Decomposition Calculator
Enter a square matrix with rows separated by semicolons and values separated by commas. The calculator factors it into L and U matrices.
- Enter the matrix. Use semicolons to separate rows and commas to separate values within a row.
- Read the result. The L (lower triangular) and U (upper triangular) matrices are displayed.
- Copy or share. Use the buttons to copy both matrices or share a link.
The matrix must be square and have non-zero pivots for standard LU decomposition without pivoting.
About LU Decomposition
LU decomposition (or LU factorization) expresses a matrix A as the product of a lower triangular matrix L and an upper triangular matrix U, so that A = LU. This is a fundamental technique in numerical linear algebra used to solve systems of linear equations, compute determinants, and find inverses efficiently. Once a matrix is decomposed, solving Ax = b reduces to two simpler triangular systems: Ly = b (forward substitution) and Ux = y (back substitution).
Frequently Asked Questions
What is LU decomposition?
LU decomposition factors a square matrix A into two triangular matrices L (lower) and U (upper) such that A = LU. L has 1s on its diagonal, and U contains the row-reduced form.
When does LU decomposition fail?
LU decomposition without pivoting fails when a zero appears on the diagonal during elimination. Partial pivoting (row swaps) can handle this, but this calculator uses standard LU without pivoting.
Why is LU decomposition useful?
Once you have L and U, you can solve multiple systems with the same coefficient matrix quickly using forward and back substitution, which is much faster than re-doing Gaussian elimination each time.