# 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$.

- Choose an entry $\beta$ in $B$ as described below.
- The next column of $L$ is $c/\beta$, where $c$ is the column of $B$ that contains the entry $\beta$.
- The next row of $U$ is $r$, where $r$ is the row of $B$ that contains the entry $\beta$.

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.