Find the $LU$ decomposition of the matrix $B$

I've been given the matrix $B$ = $\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & -1 \\ 2 & 3 & 1 \end{bmatrix}$ and I would like to find the $LU$ decomposition of $B$. I use row operations to obtain the matrix

$U$ =$\begin{bmatrix} 1 & 0 & 1 \\ 0 & 1 & -1 \\ 0 & 0 & 4 \end{bmatrix}$.

I apply these same operations to the matrix

$Z$ =$\begin{bmatrix} 1 & 0 & 0 \\ & 1 & 0 \\ & & 1 \end{bmatrix}$ to get the matrix $L$ =$\begin{bmatrix} 1 & 0 & 0 \\ 0& 1 & 0 \\ -2&-3 & 1 \end{bmatrix}$.

I'd like to know if my $L$ and $U$ in this given decomposition problem are correct?

• $LU$ should equal $B$ which it doesn’t, so it’s wrong. – take008 Mar 23 '18 at 6:31
• That's true. Although, a lot of time would have been saved had someone pointed out that one must apply reverse row operations on $Z$ in order to get the correct matrix $L$. – K.M Mar 23 '18 at 6:50
• Like ten seconds. Once you actually multiplied them out, you would have seen that it gave you negative your bottom row. – take008 Mar 23 '18 at 7:02
• Not my point, but let's move on. – K.M Mar 23 '18 at 7:11
• You should have a $1/2$ in the third row. – badatmath Mar 23 '18 at 7:20