MATLAB: Since the matrix is near to singular I have tried pinv to solve but getting too deviated answers. Can you please let me know if there is any other way to solve the equations

matrix near to singular

A =
0.25 9.59994e-09 0 -1 0
0 0.25 9.59994e-09 0 -1
0.25 7.5e-13 0 -1 0
0 0.25 7.5e-13 0 -1
0.25 8.7634e-10 0 -1 0
B = [-1.30038272588598 ; 14.8832035274747 ;-2.15072625510578 ; 18.9956035209202 ;-1.75244493678615]
B =
-1.30038272588598
14.8832035274747
-2.15072625510578
18.9956035209202
-1.75244493678615
Since the matrix is near to singular I have tried pinv to solve but getting too deviated answers. Can you please let me know if there is any other way to solve the equations

Best Answer

Hi VS,
Usually in these cases, finding the determinant is not as useful as finding the condition number. Unless you can show that the determinant is exactly zero. And in this case it is. You have
A = [0.2500000000 0.00000000959994 0 -1 0
0 0.2500000000000 0.0000000095999400 0 -1
0.2500000000 0.00000000000075 0 -1 0
0 0.2500000000000 0.0000000000007500 0 -1
0.2500000000 0.00000000087634 0 -1 0]
Subtract row 1 from row 3 to make a new row 3, which does not affect the determinant. Then subtract row 1 from row 5 to make a new row 5, which does not affect the determinant.
newrow3 = 1.0e-08 *
0 -0.9599 0 0 0
newrow5 = 1.0e-08 *
0 -0.8724 0 0 0
But these two new rows are proporional to each other, which means that they are not linearly independent, which means that the determinant is exactly zero. Which means that A does not have an inverse..