In Mathematica, the function LUDecomposition factors a matrix into the form P L U, where P is a permutation matrix, L is a lower triangular matrix, and U is an upper triangular matrix. The decomposition fails for most matrices with zero-valued minors, such as , although P L U may be close to .