Is there an algorithm to get value of a matrix where the multiplication of this with its pseudo inverse is a Singular matrix?
11 views (last 30 days)
Show older comments
Abdul Quaum
on 22 Jul 2017
Commented: Abdul Quaum
on 23 Jul 2017
I have a Singular matrix Z. Now I need to find such a matrix X where XX†=Z. Here X† is the pseudo inverse of matrix X and multiplication of X and X† is Z.
0 Comments
Accepted Answer
John D'Errico
on 22 Jul 2017
Edited: John D'Errico
on 22 Jul 2017
(I'm not sure why I bothered to answer this, since it has nothing to do with MATLAB.)
In general, no. That is not possible to do. So my guess is you are confused.
Given a general singular matrix, for example:
Z = magic(4)
Z =
16 2 3 13
5 11 10 8
9 7 6 12
4 14 15 1
rank(Z)
ans =
3
So we see that it is indeed singular. But can we do the construction that you ask for? NO!
Now, consider some general matrix X. You want us to find a matrix X, such that the product of X and the pseudo-inverse of X is Z?
Build the pseudo-inverse from the SVD.
[U,S,V] = svd(X,'econ');
Here, U,S,V have the property that
U*S*V' == X
The pseudo-inverse of X is given by inverting the non-zero singular values of X, so only inverting the non-zero diagonal elements of S that are larger a tolerance. Don't invert the zeros. Then just reconstruct the pseudo-inverse as
Xinv = V*Sinv*U'
But if we now multiply X with the constructed pseudo-inverse Xinv, we will get
X*Xinv = U*S*V'*V*Sinv*U'
Remember that V is orthogonal. So V'*V is the identity matrix. Therefore we can write the product X*Xinv as
X*Xinv = U*S*S'*U' = U*D*U'
And S is a diagonal matrix, as is Sinv. The only difference is that Sinv has inverted diagonal elements in it. So D=S*S' is also diagonal, with all elements on the diagonal that are exactly 1, followed by some zero elements. (The product of a singular value, or any number, with its inverse is 1.) You should recognize the above, U*D*U' as an eigenvalue decomposition when U is orthogonal, and D diagonal.
Essentially, we see that the product of any matrix X with its pseudo-inverse (as computed using SVD) will have all unit or zero eigenvalues.
So, unless your original matrix Z has only eigenvalues that are 0 or 1, then the problem has no solution. For the example I started with,
eig(Z)
ans =
34
8.9443
-8.9443
2.0576e-15
That clearly is not true since while one of the eigenvalues is effectively zero, the rest are not 1, so Z has no such decomposition.
3 Comments
John D'Errico
on 22 Jul 2017
Edited: John D'Errico
on 22 Jul 2017
If X is singular, then X*pinv(X) is ALWAYS still singular!!!!!!
If X is not singular, then X*pinv(X) is the identity matrix. (To within floating point noise.)
If X is ANY matrix, then the product of X with ANY other matrix has rank no higher than the rank of X! That is basic linear algebra. As well, the rank of pinv(X) will be exactly the same as the rank of X.
If X has rank K, then X*pinv(X) will also have rank K.
Yes, it is true that is a matrix is singular, then it has no inverse. It always has a pseudo-inverse of course.
You still seem confused here. If you just want to compute the pseudo-inverse of a matrix X, then use pinv.
If your goal is, given Z, to find a matrix X, such that the product of X with its pseudo-inverse is matrix Z, then NO, unless Z has VERY specific properties as I showed, then no such X exists.
I'm not sure what your question really is here. As I said, X will generally not exist unless Z has very special properties.
More Answers (0)
See Also
Categories
Find more on Linear Algebra in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!