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 MoorePenrose 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 nonsingular square matrices M, the pseudoinverse M(-1) is equivalent to the standard inverse.


open allclose all

Basic Examples  (1)

A matrix has a pseudoinverse even if it is singular:

Scope  (10)

Basic Uses  (6)

Find the pseudoinverse of a machine-precision matrix:

Pseudoinverse of a complex matrix:

Pseudoinverse of an exact matrix:

Pseudoinverse of an arbitrary-precision matrix:

Compute a symbolic pseudoinverse:

The inversion of large machine-precision matrices is efficient:

Special Matrices  (4)

The pseudoinverse of a sparse matrix is return as a normal matrix:

Format the result:

When possible, the pseudoinverse of a structured matrix is returned as another structured matrix:

This is not always possible:

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)

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:

Applications  (1)

Here is some data:

Construct a design matrix for fitting to a line:

Get the coefficients for a linear leastsquares 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:

The minimum is at :

PseudoInverse satisfies the MoorePenrose equations [more info]:

Wolfram Research (1988), PseudoInverse, Wolfram Language function, (updated 2003).


Wolfram Research (1988), PseudoInverse, Wolfram Language function, (updated 2003).


@misc{reference.wolfram_2021_pseudoinverse, author="Wolfram Research", title="{PseudoInverse}", year="2003", howpublished="\url{}", note=[Accessed: 26-October-2021 ]}


@online{reference.wolfram_2021_pseudoinverse, organization={Wolfram Research}, title={PseudoInverse}, year={2003}, url={}, note=[Accessed: 26-October-2021 ]}


Wolfram Language. 1988. "PseudoInverse." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2003.


Wolfram Language. (1988). PseudoInverse. Wolfram Language & System Documentation Center. Retrieved from