Compute the pseudoinverse of a matrix using the SVD-construction

1 | ```
pinv(A, eps = 1e-08)
``` |

`A` |
[numeric] matrix |

`eps` |
[numeric] tolerance for determining zero singular values |

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

Compute the singular value decomposition

*\boldsymbol{A} = \boldsymbol{UDV}^T*Replace diagonal elements in

*\boldsymbol{D}*of which the absolute values are larger than some limit`eps`

with their reciprocal valuesCompute

*\boldsymbol{A}^+ = \boldsymbol{UDV}^T*

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

1 2 3 4 5 6 7 |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.