LU Factorization Calculator

LU factorization calculator using the Doolittle method, with every multiplier shown. Factor a square matrix as A = LU (or PA = LU with pivoting) and use it to solve systems and find determinants.

A = LU by the Doolittle method, with every multiplier named as it is computed. Enter any square matrix and the calculator returns L, U, the determinant that falls out of U's diagonal, and a verification that LU rebuilds your matrix.

Matrix A — fractions like 3/4 are fine

How to find the LU factorization of a matrix

  1. 1

    Start with L = I and U = A

    The identity for L and a copy of your matrix for U.

  2. 2

    Compute each multiplier

    For the entry in row i, column j below the diagonal, the multiplier is that entry divided by the pivot in row j.

  3. 3

    Eliminate and record

    Subtract the multiplier times the pivot row from row i in U, and store the multiplier at L[i][j].

  4. 4

    Verify

    Multiply L and U — the result must equal the original matrix (or PA if rows were swapped).

Doolittle versus Crout

Method Diagonal of 1s Typical use
Doolittle In L The default in most courses, and what this calculator produces
Crout In U Common in older numerical libraries and some engineering texts
Cholesky Neither — U = Lᵀ Symmetric positive-definite matrices only, at roughly half the cost

LU factorization by size

Frequently asked questions

Is LU factorization the same as LU decomposition?

Yes — the two names describe the same thing, writing a square matrix as a lower triangular matrix times an upper triangular one. American textbooks tend to say factorization; numerical analysis literature tends to say decomposition.

What is the Doolittle method?

Doolittle is the version that fixes 1s along the diagonal of L. Each multiplier from forward elimination drops into the position of the entry it cleared, and U is whatever elimination leaves behind. This calculator uses Doolittle.

When does LU factorization fail?

It fails without pivoting whenever a pivot position holds a zero, which happens when a leading principal minor is zero. Allowing row swaps always fixes it, at the cost of the permutation matrix P in PA = LU.

How do you use LU factorization to solve Ax = b?

Substitute A = LU to get LUx = b. Set y = Ux and solve Ly = b by forward substitution, then solve Ux = y by back substitution. Each solve is quick because both matrices are triangular.

How does LU factorization find a determinant?

det(A) = det(L)det(U). Since L is unit triangular its determinant is 1, so det(A) is just the product of U's diagonal, with a sign flip for each row swap.

What is the computational cost?

Factoring an n x n matrix takes about 2n³/3 operations, the same as one Gaussian elimination. The payoff comes afterwards: every additional right-hand side costs only about 2n² operations.

About this Calculator

LU factorization calculator using the Doolittle method, with every multiplier shown. Factor a square matrix as A = LU (or PA = LU with pivoting) and use it to solve systems and find determinants.

Related Searches

lu factorization calculatorlu factorizationlu factorization with stepsdoolittle lu factorizationcrout methodlu factorization 3x3 calculatora=lu calculator