Skip to main content

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
x1+x_{1}+
x2+x_{2}+
x3=x_{3}=
x1+x_{1}+
x2+x_{2}+
x3=x_{3}=
x1+x_{1}+
x2+x_{2}+
x3=x_{3}=
Solution,
The above system can be represented as:
[753216123][x1x2x3]=[123]\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}
i.e AX=Bi.e\ AX=B
We initialize LL and UU matrices as:
L=[100l2110l31l321]and U=[u11u12u130u22u2300u33] 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}
Solving LU=ALU=A we get,
L=[1000.3100.131]and U=[75300.45.140018]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}
Solving LY=BLY=B we get,
Y=[11.78]Y=\begin{bmatrix}1\\1.7\\8\end{bmatrix}
Solving UX=YUX=Y we get,
X=[11.30.44]X=\begin{bmatrix}-1\\1.3\\0.44\end{bmatrix}
Thus the solution of the system is:
x1=1x_{1}={-1}
x2=1.3333x_{2}={1.3333}
x3=0.4444x_{3}={0.4444}