<s>[INST] LU decomposition using the LU factorization Algorithm with $l_{ii}=1$ 

For this matrix, I got $U_{31}=1$, but the answer says $U_{31}=1/2$. Since the first two elements of the third row are 0, I think this two answers actually are equivalent. I am just wondering if both of them are correct? Since it is not in the Row Reduced echelon form, I suppose the answer is not unique. Thanks!
 [/INST] We have:
$$A = \begin{bmatrix}1&-1&0\\2 & 2 & 3 \\ -1 & 3 & 2\end{bmatrix} = LU=\begin{bmatrix}1 & 0 & 0\\l_{21} & 1 & 0 \\ l_{31} & l_{32} & 1\end{bmatrix} \begin{bmatrix}u_{11} & u_{12} & u_{13}\\0 & u_{22} &  u_{23} \\ 0 & 0 & u_{33}\end{bmatrix}$$
The individual calculations in order they are performed are:


*

*$u_{11} = 1, u_{12} = -1, u_{13} = 0$

*$l_{21} u_{11} = 2 \implies l_{21} = 2, ~l_{21}u_{12}+u_{22} = 2 \implies u_{22} = 4, ~l_{21}u_{13} + u_{23} = 3 \implies u_{23} = 3$

*$l_{31}u_{11} = -1 \implies l_{31} = -1, ~ l_{31} u_{12} + l_{32}u_{22} = 3 \implies l_{32} = \dfrac{1}{2}$

*$l_{31}u_{13} + l_{32}u_{23} + u_{33} = 0 +\dfrac{3}{2} + u_{33} = 2 \implies u_{33} = \dfrac{1}{2}$


This results in:
$$A = \begin{bmatrix}1&-1&0\\2 & 2 & 3 \\ -1 & 3 & 2\end{bmatrix} = LU = \begin{bmatrix}1 & 0 & 0\\2 & 1 & 0 \\ -1 & \dfrac{1}{2} & 1\end{bmatrix} \begin{bmatrix}1 & -1 & 0\\0 & 4 &  3 \\ 0 & 0 & \dfrac{1}{2}\end{bmatrix}$$
</s>