Factor a matrix A into a lower triangular L and upper triangular
U such that L·U = A.
Example: A=[[2,1],[4,3]] gives L=[[1,0],[2,1]], U=[[2,1],[0,1]].
The multipliers L(i,j) = a(i,j) / U(j,j) are computed during
forward elimination; the Schur complement gives U(i,i).
Example
Factor a matrix into lower and upper triangular matrices.
highlighted = computed this step
Step 1 — Set up
Start with the matrix A.
A=[2413]
Step 2 — First multiplier
Compute the first multiplier.
U11=2L21=4/2=2
Step 3 — Schur complement
Use the Schur complement for the lower-right entry.
U12=1U22=3−2⋅1=1
Step 4 — Factors
Display the L and U factors.
L=[1201]U=[2011]
Step 5 — Verify product
Multiply L and U to verify the entries.
LU=[2413]
Step 6 — Result
State that the product L U equals A.
A=LU[2413]
lu-decomposition
LU decomposition factors A = L·U where L has ones on its diagonal and U is upper triangular.