Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Mathematics and Algorithms > Matrices and Linear Algebra > Matrix-Based Minimization > PseudoInverse >
Mathematica > Mathematics and Algorithms > Graphs & Networks > Graph Programming > Matrices and Linear Algebra > Matrix-Based Minimization > PseudoInverse >
Mathematica > Visualization and Graphics > Graphs & Networks > Graph Programming > Matrices and Linear Algebra > Matrix-Based Minimization > PseudoInverse >

PseudoInverse

PseudoInverse[m]
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:
In[1]:=
Click for copyable input
Out[1]=
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
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team
Format:   HTML  |  CDF