PseudoInverse
finds the pseudoinverse of a rectangular matrix.
Details and Options

- PseudoInverse works on both symbolic and numerical matrices.
- For a square matrix, PseudoInverse gives the Moore–Penrose inverse.
- For numerical matrices, PseudoInverse is based on SingularValueDecomposition.
- PseudoInverse[m,Tolerance->t] specifies that singular values smaller than t times the maximum singular value should be dropped.
- With the default setting Tolerance->Automatic, singular values are dropped when they are less than 100 times 10-p, where p is Precision[m].
- For non‐singular square matrices M, the pseudoinverse M(-1) is equivalent to the standard inverse.
Examples
open allclose allScope (10)
Basic Uses (6)
Special Matrices (4)
The pseudoinverse of a sparse matrix is return as a normal matrix:
When possible, the pseudoinverse of a structured matrix is returned as another structured matrix:
IdentityMatrix[n] is its own pseudoinverse:
The pseudoinverse of IdentityMatrix[{m,n}] is a transposition:
Compute the the pseudoinverse for HilbertMatrix:
Options (1)
Tolerance (1)
Some singular values are below the default tolerance for machine precision:
Compute the pseudoinverse with the default tolerance:
It is not a true inverse since some singular values were considered to be effectively zero:
Compute the pseudoinverse with no tolerance:
Even though no singular values were considered zero, it is worse due to numerical error:
Applications (1)
Construct a design matrix for fitting to a line:
Get the coefficients for a linear least‐squares fit:
This is the same as the result given by Fit:
Properties & Relations (3)
For a nonsingular matrix, the pseudoinverse is the same as the inverse:
For p = PseudoInverse[m], x = p.b gives the minimum norm x that minimizes :
Adding any vector in the NullSpace of m will leave the residual unchanged:
PseudoInverse satisfies the Moore–Penrose equations [more info]:
Text
Wolfram Research (1988), PseudoInverse, Wolfram Language function, https://reference.wolfram.com/language/ref/PseudoInverse.html (updated 2003).
BibTeX
BibLaTeX
CMS
Wolfram Language. 1988. "PseudoInverse." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003. https://reference.wolfram.com/language/ref/PseudoInverse.html.
APA
Wolfram Language. (1988). PseudoInverse. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/PseudoInverse.html