LU decomposition Theorem: If $A \in \mathbb{R}^{n \times n}$ is such that each principal minor $A_k$ has $det(A_k) \neq 0, \, k = 1, 2, \dots, n-1$, then $A = LU$, beeing $L$ a lower triangular unit diagonal matrix and $U$ being an upper triangular matrix.
If $A$ is invertible I can prove the $LU$ decomposition is unique.
Is there a counterexample for the case $A$ is not invertible showing that its $LU$ decomposition is not unique?
Let $A=\begin{pmatrix} 0 & a\\ 0 & b \end{pmatrix}$, $L=\begin{pmatrix} l_{11} & 0\\ l_{21} & l_{22} \end{pmatrix}$, $U=\begin{pmatrix} u_{11} & u_{12}\\ 0 & u_{22} \end{pmatrix}$
If $A=LU$ then $\begin{pmatrix} l_{11}u_{11} & l_{11}u_{12}\\ l_{21}u_{11} & l_{21}u_{12}+l_{22}u_{22} \end{pmatrix}=\begin{pmatrix} 0 & a\\ 0 & b \end{pmatrix}$
Now $l_{11}=l_{22}=1$, then $u_{11}=0, u_{12}=a, u_{22}=b-a\cdot l_{21}$, $A$ has infinite factorizations $LU$ whit $L$ unitary:
$$\begin{pmatrix} 0 & a\\ 0 & b \end{pmatrix}=\begin{pmatrix} 1 & 0\\ l_{21} & 1 \end{pmatrix}\begin{pmatrix} 0 & a\\ 0 & b-a\cdot l_{21} \end{pmatrix}$$