LU Factorization Calculator
This page represents an interactive calculator for finding out the solution to linear systems using the LU Factorization method. You can select between both the Crout method and the Doolittle method.
System size --System size--- 1 2 3 4 5 6 7 8
Randomize SolveMethod --Select Method-- Doolittle Crout
Solution ,
The above system can be represented as:
[ 7 5 3 2 1 6 1 2 3 ] [ x 1 x 2 x 3 ] = [ 1 2 3 ] \begin{bmatrix}7 & 5 & 3 \\ 2 & 1 & 6 \\ 1 & 2 & 3\end{bmatrix}\begin{bmatrix}x_{1} \\ x_{2} \\ x_{3}\end{bmatrix}=\begin{bmatrix}1 \\ 2 \\ 3\end{bmatrix} 7 2 1 5 1 2 3 6 3 x 1 x 2 x 3 = 1 2 3 i . e A X = B i.e\ AX=B i . e A X = B We initialize
L L L and
U U U matrices as:
L = [ 1 0 0 l 21 1 0 l 31 l 32 1 ] and U = [ u 11 u 12 u 13 0 u 22 u 23 0 0 u 33 ] L=\begin{bmatrix}1 & 0 & 0\\l_{21} & 1 & 0\\l_{31} & l_{32} & 1 \end{bmatrix} \text{and } U=\begin{bmatrix}u_{11} & u_{12} & u_{13}\\0 & u_{22} & u_{23}\\0 & 0 & u_{33} \end{bmatrix} L = 1 l 21 l 31 0 1 l 32 0 0 1 and U = u 11 0 0 u 12 u 22 0 u 13 u 23 u 33 Solving
L U = A LU=A LU = A we get,
L = [ 1 0 0 0.3 1 0 0.1 − 3 1 ] and U = [ 7 5 3 0 − 0.4 5.14 0 0 18 ] L=\begin{bmatrix}1 & 0 & 0\\0.3 & 1 & 0\\0.1 & -3 & 1\end{bmatrix} \text{and } U=\begin{bmatrix}7 & 5 & 3\\0 & -0.4 & 5.14\\0 & 0 & 18\end{bmatrix} L = 1 0.3 0.1 0 1 − 3 0 0 1 and U = 7 0 0 5 − 0.4 0 3 5.14 18 Solving
L Y = B LY=B L Y = B we get,
Y = [ 1 1.7 8 ] Y=\begin{bmatrix}1\\1.7\\8\end{bmatrix} Y = 1 1.7 8 Solving
U X = Y UX=Y U X = Y we get,
X = [ − 1 1.3 0.44 ] X=\begin{bmatrix}-1\\1.3\\0.44\end{bmatrix} X = − 1 1.3 0.44 Thus the solution of the system is:
x 2 = 1.3333 x_{2}={1.3333} x 2 = 1.3333 x 3 = 0.4444 x_{3}={0.4444} x 3 = 0.4444