Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Determinant and inverse of a matrix

Nazmul_I_1
Beginner
567 Views

Hi, I am using Intel Visual Fortran with IMSL. I am solving a system of equation in the form Ax=b by using the IMSL routine LIN_SOL_GEN(A,b,x) and I am using IMSL routine LIN_SOL_GEN(A,b,x,nrhs=0,ainv=inv,det=determinant) to find the determinant and the inverse of the matrix A. When I solve the system with A as 200 by 200 matrix, then the determinant is 1.795566494113669E-202 and obtaining inverse along with the solution with errors. But when I solve the system with A as 400 by 400 matrix, then the determinant is 0.000000000000000E+000 and obtaining inverse along with the solution with errors. I know, when determinant is zero, i am not able to get solution. Can anybody help me to say, what is happening in the case of 400 by 400 matrix with determinant zero? It is noted that, I am using determinant(1)**determinant(2) to calculate the whole determinant.

0 Kudos
1 Reply
mecej4
Honored Contributor III
567 Views

Do you have a basis for believing that your matrices have full rank? Some matrices are singular. Others may be nearly singular.

If you do not have reasons to expect full rank, you need to accept that the linear system is singular, and decide what to do.

If you do expect the matrix to be non-singular, you need to examine the part of your code where the input matrix is defined and fix any errors that you find.

0 Kudos
Reply