In practical terms you cannot invert a singular matrix. Depending on the right-hand vector there may, however, be a solution to the system of equations but this will not be unique. Singular Value Decomposition (SVD) is a good way of examining your matrix and a generalised inverse approach such as Moore-Penrose will enable you to get a solution if your RHS is consistent. I would suggest looking in more detail at your system of equations and understand why it is singular and what the singular vectors mean physically. For example in structural analysis the stiffness matrix is singular until the rigid-body motions are constrained. Consistency in the RHS for the structural problem means that the loads do not excite any of these motions.
A matrix becomes singular when one or more rows or columns are dependent. Singularity can be checked by the matrix rank. For NxN matrix if rank is less than N then its singular. This means you actual problem has lesser dimensions and you are trying to represent it in higher dimensions.
You may also try MacDuffee theorem; Given A=FG in its full rank factorization, there is a direct way to compute the MP inverse A^\dagger of A using F and G explicitly.
A^\dagger b will give the least squares solution of minimal norm of Ax=b.
I use Matlab. In this program there is a function to solve the problem of a singular matrix with the Moore-Penrose method. The results are not good. That is why I want to find another method, to implement in this program.
What is the Penrose Method? There is the Moore-Penrose inverse (MP inv), as there are many other generalized inverses, and there is the original way by Penrose inverse to compute the MP inv. You need to know if the MP inv gives any good answer to your problem. If you want to find the least sq solution of minimal norm, then the MP inv is your generalized inverse.
Penrose actually used SVD in his original paper, in 1955.
matLab has SVD.
A=UDV in which U and V are unitary (ie UU*=I=U*U where * denotes trans conjugation) and D is (real non neg) diagonal matrix.
A^\dagger is V*D^\dagger U^*
where D^\dagger is the diagonal matrix whose (i,i) entry is either 0 (if A[i,i] == 0) or 1/A[i,i] otherwise.
Thank you Pedro. When I talk about the Moore-Penrose method I am talking about the function pinv in Matlab. I used inv and I also uses SVD, but the problem is that I need more equations to solve my system. I was trying to find a way to solve the problem without them. I thought maybe there is a way to probe with all the methods to solve inverse matrix, hoping to find a solution to my system. Now I know that I can not solve it. Simply, I need more equations. I was trying to use all the methods to explore its solutions.
Do you need to have the inverse, or do you want to find the solution of a system of linear equations where the matrix is singular. If it's only the latter, then you don't need the inverse of the matrix (which doesn't exist anyway) to find the solution.
Hi Daniel. You still seem to be struggling with the fact that your problem has thrown up a singular matrix - I had a German ERASMUS student working with me back in the 1990's who got so cheesed-off with trying to solve such a problem that, in the early hours, he renamed his fortran program 'shit.for' only to find that the compiler recognised it as a rude word!!
Singular systems of equations do not have unique solutions (if any) and, as mentioned previously, you can only really tackle them using Singular Value Decomposition (SVD) or similar. I mentioned that in mechanics the singularity is often due to a real or spurious mechanism within a structure and the physical understanding of these mechanisms is key to understanding your issue. And understanding the vectors corresponding to the singular values is key to understanding the issues that you might have in posing your problem.
I would ask again that you consider why your problem is throwing up a singular matrix and if you have explored the nature of the singularities in the problem. There must be some physical reason for this issue and only you, as the definer of the problem, can answer this question.
Hope this is helpful and look forward to hearing of your progress.
A linear system Ax=b with a singular matrix A has solutions if and only if b is in range(A). If this is the case, you can (in most cases, see below) use Krylov subspace methods (e.g., CG, MINRES, GMRES) to obtain a solution. This may make sense if your matrix A is sparse. If these methods are applicable depend on A and b:
A is Hermitian/symmetric and positive semi-definite: use CG.
A is Hermitian/symmetric: use MINRES.
A is non-Hermitian/non-symmetric: GMRES works if A is normal or if a rather technical condition holds (see theorem 2.57 and condition (2.20) in my PhD thesis).
Proofs for the above statements with further references can be found in the attached PhD thesis.
Thesis Recycling Krylov subspace methods for sequences of linear sy...
Daniel: what is the Moore-Penrose method? There is no MP method. There is, yet, the MP pseudo inverse. For A^\dagger the MP inverse of A, then A^\dagger b is the least squares solution of minimal norm of Ax=b... which is probably what you want!
There are many ways for computing A^\dagger, depending on your matrix. You can go for SVD (as noted above), or use the Hermite NF, or a full rank factorization... you name it!
The original is 18 months... still, i think is worth thinking on.
So, your matrix is singular. Why would you go for the MP inverse? That will give the least squares solution of minimal norm (lssmn), which is unique. That solution will minimize the errors of the fitting curve for the original data. And it will be the on with smallest norm. Again, lssmn is unique, and always exist.
Yes, it give me onw and unique solution using least squares. This is what I'm using now. But to solve my problem (8 dimenssions) I must respect some limits. The MP inverse was my first view to the problem trying to solve it in one way, but now I know that it is not feasible to solve my problem. Thanks for your interest and help.
i am solving inverse of singular matrix by pseudo inverse approach. but its prodct with original matrix is not equal to identity matrix. please help me to solve the inverse of singular matrix.
If "the matrix is close to singular or badly scaled", the coefficient matrix (A) is most likely ill-conditioned. This means that the condition number of the matrix is considerable. To address this problem, there are generally two ways:
1. Determination of the inverse of A using a pseudo-inverse based on singular value decomposition (SVD) as follows:
A-1=A+AT
where
A+=VΣ+UT
Based on SVD method, A=UΣVT. Moreover, "+" denotes the pseudo-inverse.
2. Apply Krylov subspace methods such as LSQR or LSMR to solve the linear vector-style system such as [A]{x}={b}.
Golub, G. and W. Kahan (1965). "Calculating the singular values and pseudo-inverse of a matrix." Journal of the Society for Industrial and Applied Mathematics, Series B: Numerical Analysis 2(2): 205-224.
Fong, D. and M. Saunders (2011). "LSMR: An Iterative Algorithm for Sparse Least-Squares Problems." SIAM Journal on Scientific Computing 33(5): 2950-2971.
Article Calculating the Singular Values and Pseudo-Inverse of a Matrix