pseudo-inverse of singular matrix
ledaker
06-28-2005, 07:45 AM
Hello :
I am trying to solve a linear system F=EM, where
F=is 3*3 singular matrix
E=is 3*3 singular matrix
M=is 3*3 non singular matrix
I have the matrix F and E and i must find M, how i can solve this systeme using svd.
Thank you
evgeny
07-04-2005, 12:02 AM
If E=Transpose[U].D.V after SVD,
than Inverse[E] = U.Inverse[D].Transpose[V]
Here D - a diagonal matrix
Evgeny
mmcconnell
05-02-2006, 12:05 PM
Inverse(D) does not exist if E is singular. In practice, the last few diagonal entries of D will be 0 or near 0.
If E = U * D * V^T, then U^T * F = D * V^T * M. The thing to check is whether U^T * F has 0 or near-0 rows in the same places that D does. If not, then there is no solution for M. If it does, then zero out those rows of U^T * F and of D; let Z be obtained by multiplying the i-th row of U^T * F by
1/(D's i-th diagonal entry) wherever this diagonal entry is non-0; and finally V * Z = M.
rhuso
09-01-2006, 12:52 PM
I've written a little Java code to implement singular matrix inverses - code is released to the public and available for viewing on http://aktzin.com/Inverse.jsp
<a href="http://aktzin.com/Inverse.jsp">Singular Matrix Inverse</a>
The old C++ template I wrote some time ago is also available, but archived, as nobody wanted a rather complicated C++ template. ;-)
The code started out as Ada <generic> and Fortran, was converted to C++, then a C++ template, and finally to Java. I'll convert it to a Java Template when I figure out how to allocate objects of the parameter type in a clean way. It's not something Java templates were designed for maybe I can't get there from here.
Anyway, the method is described on the site as well, and nothing like the methods I've seen elsewhere. This may be what you need. If you have further questions, please send email or see if I'm online with my AIM account.
I'm also looking for some comments on the method and the quality of the code. I'm reluctant to release more code until I see what happens with this small piece. The best comment I've had so far is to consider using the Null Pattern, which I shall experiment with this coming weekend. (before I do a marathon, which will leave me exhausted)
Rand Huso