Post Reply 
MPINVERT: Moore-Penrose Inverse of a Matrix
02-06-2015, 08:40 PM (This post was last modified: 02-06-2015 09:07 PM by salvomic.)
Post: #6
RE: MPINVERT: Moore-Penrose Inverse of a Matrix
(02-06-2015 07:38 PM)Han Wrote:  The SVD decomposition of a matrix can also be used to compute the pseudo-inverse of a matrix. If
\[ A = U \cdot \Sigma \cdot V^T \]
where \( \sigma_i \) are the singular values of the diagonal matrix \( \Sigma \), and \( U \) and \( V \) are unitary matrices.

The pseudo-inverse of \( A \) is
\[ A^{+} = V \cdot \Sigma^{+} \cdot U^T \]
where \( \Sigma^{+} \) is obtained by replacing the diagonal entries \( \sigma_i \) with \( 1/\sigma_i \) for \( \sigma_i > \epsilon \) and 0 otherwise and transposing. If \( A \) is non-singular, then all \( \sigma_i \) are non-zero and the pseudo-inverse is the same as the regular inverse. On the other hand, if \( A \) is singular, then only the "non-zero" (greater than \( \epsilon \)) singular values are inverted in computing \( A^{+} \).

It's a bit more powerful in that it even handles cases when \( A^TA \) or \( AA^T \) are not invertible. The SVD has lots of neat applications! What are they? Well, that's a google exercise left to the diligent reader :-)

Hi Han,
I'm interested in this extension, almost for the case in witch the matrix is not invertible and MPINVERT doesn't work.
I saw the SVD syntax. The guide writes "Description
Singular Value Decomposition. Factors an m n matrix into two matrices and a vector: {[[m m square orthogonal]],[[n n square orthogonal]], [real]}.".
Now I try svd([[1,2][1,2]]) and I get:
a matrix [[1/√2,0][1/√2,0]] then a vector [3.16227766..., 0] and at the end another matrix [[0.447213..., -0.894427...][0.894427..., 0.4472135955]]
What it the "real"?
Those values are U, ∑, V and ∑ is the diagonal (√10, 0). Is it right?

And therefore, how can we operate to get ∑, A+ and so on?
Eddie, then, could improve it's program for the case of singular non invertible matrix...

Another thing: in that case Prime apparently give a vector with 3 elements (matrix, vector, matrix): there is a simple way to extract one of them, i.e. to make ration approximation (with QPI)? Please, help.


∫aL√0mic (IT9CLU) :: HP Prime 50g 41CX 71b 42s 39s 35s 12C 15C - DM42, DM41X - WP34s Prime Soft. Lib
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: MPINVERT: Moore-Penrose Inverse of a Matrix - salvomic - 02-06-2015 08:40 PM

User(s) browsing this thread: 1 Guest(s)