Vectors, Matrices, and Tables > Working With Arrays > Inverting Matrices
  
Inverting Matrices
All square matrices that have a nonzero determinant are invertible. However, if a matrix has a determinant near zero, the LU factorization becomes unstable. Matrix inversion may return an error, or it may return results that are not a genuine inverse matrix (y · y-1 may not be equal to the identity matrix) if the matrix is the following:
Singular—The matrix determinant is equal to zero or its rank is incomplete (the rows and columns of the matrix are not linearly independent).
Ill-conditioned—The matrix has a high condition number, which is the ratio of the largest magnitude eigenvalue to the smallest. Use the cond2 function for calculating the condition number of your matrix.
When matrix inversion fails, you can use the geninv function. If you get invalid results, on the Calculation tab, in the Worksheet Settings group, click Calculation Options, and select Strict Singularity Check. A slower algorithm is then used which rejects matrices that are nearly singular and give an error.
PTC Mathcad uses the BLAS/LAPACK libraries, from Intel, for LU factorization.