Last data update: 2014.03.03

R: Moore-Penrose pseudoinverse
pinvR Documentation

Moore-Penrose pseudoinverse

Description

Compute the pseudoinverse of a matrix using the SVD-construction

Usage

pinv(A, eps = 1e-08)

Arguments

A

[numeric] matrix

eps

[numeric] tolerance for determining zero singular values

Details

The Moore-Penrose pseudoinverse (sometimes called the generalized inverse) oldsymbol{A}^+ of a matrix oldsymbol{A} has the property that oldsymbol{A}^+oldsymbol{AA}^+ = oldsymbol{A}. It can be constructed as follows.

  • Compute the singular value decomposition oldsymbol{A} = oldsymbol{UDV}^T

  • Replace diagonal elements in oldsymbol{D} of which the absolute values are larger than some limit eps with their reciprocal values

  • Compute oldsymbol{A}^+ = oldsymbol{UDV}^T

References

S Lipshutz and M Lipson (2009) Linear Algebra. In: Schuam's outlines. McGraw-Hill

Examples

A <- matrix(c(
 1,  1, -1,  2,
 2,  2, -1,  3,
 -1, -1,  2, -3
),byrow=TRUE,nrow=3)
# multiply by 55 to retrieve whole numbers
pinv(A) * 55

Results