pinv
Moore-Penrose pseudoinverse
Description
B = pinv( returns the Moore-Penrose
pseudoinverse of matrix A)A.
Examples
Input Arguments
More About
Tips
You can replace most uses of
pinvapplied to a vectorb, as inpinv(A)*b, withlsqminnorm(A,b)to get the minimum-norm least-squares solution of a system of linear equations. For example, in Solve System of Linear Equations Using Pseudoinverse,lsqminnormproduces the same solution aspinvdoes.lsqminnormis generally more efficient thanpinvbecauselsqminnormuses the complete orthogonal decomposition ofAto find its low-rank approximation and applies its factors tob. In contrast,pinvuses singular value decomposition to explicitly form the pseudoinverse ofAthat you then must multiply byb.lsqminnormalso supports sparse matrices.
Algorithms
pinv uses singular value decomposition to form the pseudoinverse
of A. Singular values along the diagonal of S that
are less than or equal to tol are treated as zeros, and the
representation of A becomes:
The pseudoinverse of A is then equal to:
Extended Capabilities
Version History
Introduced before R2006aSee Also
inv | qr | rank | svd | lsqminnorm | decomposition