This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)


finds the pseudoinverse of a rectangular matrix.
  • For a square matrix, PseudoInverse gives the Moore-Penrose inverse.
  • 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 , where p is Precision[m].
  • For non-singular square matrices M, the pseudoinverse is equivalent to the standard inverse.
A matrix has a pseudoinverse even if it is singular:
A matrix has a pseudoinverse even if it is singular:
Click for copyable input
m is a 4×3 matrix:
Compute using exact arithmetic:
Compute using machine arithmetic:
Compute using 24-digit precision arithmetic:
Compute the pseudoinverse for a random complex 3×2 matrix:
Compute symbolic result:
m is a 16×16 Hilbert matrix:
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:
Here is some data:
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:
For a nonsingular matrix, the pseudoinverse is the same as the inverse:
For , gives the minimum norm x that minimizes :
Adding any vector in the NullSpace of m will leave the residual unchanged:
The minimum is at :
PseudoInverse satisfies the Moore-Penrose equations []:
New in 1 | Last modified in 5