George Herriman's Krazy Kat is lounging under an umbrella.

Linear Algebra Calculators

LU Factorization


This calculator uses Wedderburn rank reduction to find the LU factorization of a matrix $A$. The process constructs the two matrices $L$ and $U$ in stages. $L$ is constructed a column at a time while $U$ is constructed a row at a time.

At each stage you'll have an equation $A=LU+B$ where you start with $L$ and $U$ nonexistent and with $B=A$.

Now with these updated $L$ and $U$ update $B=A-LU$. (The updated $B$ can also be obtained by subtracting $cr/\beta$ from the previous $B$.)

Eventually $B=0$ and $A=LU$.

At this point (if you've been doing Gaussian Elimination) $L$ is lower triangular and $U$ (a row echelon form for $A$) is upper triangular.

If you've been doing Gaussian Elimination with Partial Pivoting, then $L$ is a (row) permuted lower triangular matrix and $U$ (a possibly different row echelon form for $A$) is upper triangular.

If you've been doing Gaussian Elimination with Complete Pivoting, then $L$ is a (row) permuted lower triangular matrix while $U$ is a (column) permuted upper triangular matrix.

Gaussian Elimination
Choose $\beta$ to be the first (from the top) nonzero element in the first (from the left) nonzero column of $B$.
Gaussian Elimination with Partial Pivoting
Choose $\beta$ to be the largest (in absolute value) element in the first (from the left) nonzero column of $B$.
Gaussian Elimination with Complete Pivoting
Choose $\beta$ to be the largest (in absolute value) element in the entire matrix $B$.


Either choose a size and press this button to get a randomly generated matrix, or enter your matrix in the box below. (Look at the example to see the format.)

Matrix $A$:

Select a column number.

Select a row number.

Update $L$, $U$ and $B$.

The reset button leaves the $A$ matrix alone, but reinitializes $L$, $U$ and $B$.


Back to calculator page or home page.
Krazy Kat is singing.