# LU factorization

 Math Emeritus Sci Advisor Thanks PF Gold P: 39,569 One motivation is that it makes solving equations very easy! If A= LU where, of course, L is a "lower diagonal" and U is "upper diagonal", then we can solve Ax= b by writing it as LUx= b so that Ux= y= L[sup]-1[sup]b, which can be done by 'back substitution" and then solving x= U-1y again by back substitution. For example, if $$A= LU= \begin{bmatrix}2 & 0 \\ 1 & 3\end{bmatrix}\begin{bmatrix}1 & 3 \\ 0 & 2\end{bmatrix}\begin{bmatrix}x_1 \\ x_2 \end{bmatrix}= \begin{bmatrix}2 \\ 1\end{bmatrix}$$ We can let Ux= y so the equation becomes $$Ly= \begin{bmatrix}2 & 0 \\ 1 & 3\end{bmatrix}\begin{bmatrix}y_1 \\ y_2\end{bmatrix}= \begin{bmatrix}2 & 1 \end{bmatrix}$$ The first row is equivalent to the equation $2y_1= 2$ so we have immediately $y_1= 1$. With that value, the second equation, $y_1+ 3y_2= 1$ becomes $1+ 3y_2= 1$ so that $3y_2= 0$ and $y_2= 0$. Then, since we defined y to be Ux, we have $$x= \begin{bmatrix} 1 & 3 \\ 0 & 2 \end{bmatrix}\begin{bmatrix}x_1 \\ x_2\end{bmatrix}= \begin{bmatrix}1 \\ 0 \end{bmatrix}$$ Now, the second row gives the equation $2x_2= 0$ so that $x_2= 0$ and then the top row becomes $x_1+ 3x_2= x_1= 1$.