The pseudoinverse A+ is a generalization of the inverse, and exists for any (m,n) matrix. We assume m > n. If A has full rank (n) we define:
and the solution of Ax = b is x = A+b.
The best way to compute A+ is to use singular value decomposition. With
, where U and V (n,n) are orthogonal and S (m,n) is diagonal with real, non-negative singular values si
, we find
If the rank r of A is smaller than n, the inverse of
does not exist, and one uses only the first r singular values;
S then becomes an (r,r) matrix and U,V shrink accordingly.
see also Linear Equations.