structural:scholar_edition, information:highlighting
Square matrices

Any square matrix A {\textstyle A} admits LUP and PLU factorizations. If A {\textstyle A} is invertible, then it admits an LU (or LDU) factorization if and only if all its leading principal minors are nonzero (for example {\displaystyle {\begin{bmatrix}0&1\\1&0\end{bmatrix}}} does not admit an LU or LDU factorization). If A {\textstyle A} is a singular matrix of rank k {\textstyle k}, then it admits an LU factorization if the first k {\textstyle k} leading principal minors are nonzero, although the converse is not true.

If a square, invertible matrix has an LDU (factorization with all diagonal entries of L and U equal to 1), then the factorization is unique. In that case, the LU factorization is also unique if we require that the diagonal of L {\textstyle L} (or U {\textstyle U}) consists of ones.

In general, any square matrix A n × n {\displaystyle A_{n\times n}} could have one of the following:

In Case 3, one can approximate an LU factorization by changing a diagonal entry a j j {\displaystyle a_{jj}} to a j j ± ε {\displaystyle a_{jj}\pm \varepsilon } to avoid a zero leading principal minor.