Factor any square matrix into a product of a Lower triangular and Upper triangular matrix (PA = LU) with partial pivoting and step-by-step explanations.
Enter a matrix and click Decompose
or press Enter
LU decomposition (also known as LU factorization) is a method of decomposing a square matrix A into the product of a lower triangular matrix L and an upper triangular matrix U, such that A = LU. When partial pivoting is used, the decomposition takes the form PA = LU, where P is a permutation matrix that records row swaps.
The "L" stands for lower triangular (all entries above the main diagonal are zero), and "U" stands for upper triangular (all entries below the main diagonal are zero). The diagonal entries of L are typically set to 1 (Doolittle's method).
LU decomposition is essentially a systematic recording of Gaussian elimination. The algorithm proceeds column by column:
LU decomposition is one of the most widely used matrix factorizations in numerical computing:
LU decomposition of an n×n matrix requires approximately 2n³/3 floating-point operations. Once computed, each subsequent solve (forward and back substitution) requires only 2n² operations. This makes LU decomposition far more efficient than Gaussian elimination when solving multiple systems with the same coefficient matrix.
Decompose into orthogonal Q and upper triangular R. Ideal for least squares problems.
Open calculator →The most general decomposition. Factor any matrix into UΣVᵀ.
Open calculator →Efficient factorization for symmetric positive definite matrices.
Open calculator →Find eigenvalues and eigenvectors of square matrices.
Open calculator →