U is the Row Echelon Form of the base matrix A.
L is obtained by creating a lower triangular matrix with the multiples of the REF transformation of A:
$$ L = \begin{pmatrix} 1 & 0 & 0 \\ -m_{21} & 1 & 0 \\ -m_{31} & -m_{32} & 1 \end{pmatrix} $$ After that, given the vector b: $$ b = \begin{pmatrix} 7 \\ 13 \\ 106 \\ - 94 \end{pmatrix} $$ we use the following method: $$ Ax = b \rightarrow LUx = b \rightarrow L(Ux) = b \rightarrow \text{first solve } Ly = b \text{ where } y = Ux $$First, we solve $Ly = b$ using forward substitution:
-
$y_1 = b_1 = 7$
-
$5y_1 + y_2 = 13$
- $6y_1 - 2.5y_2 + y_3 = 106$
- $5y_1 + 4y_2 + y_3 + y_4 = -94$
We solve $Ux = y$ using back substitution:
- $-10x_4 = -160$
- $2x_3 + 3x_4 = 119$
- $2x_2 + 2x_3 - 4x_4 = -22$
- $x_1 + 4x_2 + 5x_3 + 3x_4 = 7$
which is the final solution.
#Exercise
Let
$$ A = \begin{pmatrix} 1 & 1 & 1 \\ 2 & 4 & 4 \\ 3 & 7 & 10 \end{pmatrix} $$(a) Find the $A = LU$ factorization of the matrix $A$
(b) Solve the system ( Ax = b ) using factorization $LU$ where
$$ b = \begin{pmatrix} 3 \\ 10 \\ 20 \end{pmatrix} $$#Frequently Asked Questions
#Why do we want to decompose a matrix into LU?
Solving linear systems of equations of the form Ax=b is the fundamental concept of linear algebra. LU factorization methods is one of the fastest ways to solve AX=b and numerical software like Matlab or Python libraries like Numpy, Scipy use LU factorization.
#Why don’t we use Gaussian Elimination?
We use the Gaussian Elimination procedure to obtain the upper triangular matrix U, but this alone is not sufficient.