= Solution
First subtract row one from row two, using $E_1$; then subtract four times the updated row two from row three, using $E_2$:
$$
E_1=\begin{pmatrix}1&0&0\\-1&1&0\\0&0&1\end{pmatrix},\qquad
E_2=\begin{pmatrix}1&0&0\\0&1&0\\0&-4&1\end{pmatrix}.
$$
The updated second row is $(0,1,2)$ and the final third row is $(0,0,-4)$. Hence $E_2E_1A=U$ and $L=E_1^{-1}E_2^{-1}$. The resulting <LU decomposition> is
$$
\boxed{L=\begin{pmatrix}1&0&0\\1&1&0\\0&4&1\end{pmatrix},\qquad
U=\begin{pmatrix}1&1&1\\0&1&2\\0&0&-4\end{pmatrix},\qquad A=LU.}
$$
Reversing the order when undoing the elementary operations is essential.
Back to article page