TITLE: Is the $L$ in $LU$ factorization unique?
QUESTION [9 upvotes]: I was doing an $LU$ factorization problem
\begin{bmatrix}
    2       & 3 & 2  \\
    4       & 13 & 9  \\
-6 & 5 &4
\end{bmatrix}
and I was going to multiply the second row by .$5$ and subtract the result from row $1$, then do something similar to row reduce row $3$. My book tells me that you first row-reduce to get $U$, then you extract certain columns from various steps in the reduction process to get $L$. That's when I realized that if I instead multiplied row $1$ by $2$ subtracted from one times row $2$, this would be equivalent to getting $U$, but it would change the resultant $L$ matrix! What is wrong with this approach?

REPLY [2 votes]: For a singular matrix, the LU decomposition may not be unique; for example,
$$\begin{bmatrix}1&1&1\\1&1&1\\1&1&1\end{bmatrix}=\begin{bmatrix}1&0&0\\1&1&0\\1&x&1\end{bmatrix}\begin{bmatrix}1&1&1\\0&0&0\\0&0&0\end{bmatrix}$$
for any $x$. It is interesting to note that for a $2\times 2$ matrix, the LU decomposition is unique, even if the matrix is singular. (One can show this by direct calculation.)