Pseudo-Inverse

Shipping
matrix_pinv

Moore-Penrose pseudo-inverse A⁺ for rectangular / rank-deficient matrices

Signature

Inputs

  • aSignal|ArrayrequiredA 2-D matrix (any shape, possibly rank-deficient).

Outputs

  • pseudo_inverseMatrixThe Moore-Penrose pseudo-inverse $A^{+}$.

Description

Pseudo-Inverse computes the Moore-Penrose pseudo-inverse via the MKL LAPACK SVD, generalizing the matrix inverse to rectangular and rank-deficient matrices. For a full-rank square matrix ; otherwise gives the minimum-norm least-squares solution operator .

The input may be any 2-D matrix. The result is dimensionless. When you actually need to solve rather than obtain the operator itself, matrix_lstsq is usually the better node; use pseudo-inverse when the matrix is the desired quantity (e.g. a reusable projection).

Mathematics

Examples

Inverting a non-square map

For a wide matrix , no ordinary inverse exists, but pseudo_inverse returns a matrix such that . Applying to an observation yields the minimum-norm solution of the under-determined system.

Applications

  • Least-squares operators for over/under-determined and rank-deficient systems.
  • Robotics redundancy resolution (minimum-norm joint velocities via the Jacobian pseudo-inverse).
  • Projection and reconstruction in signal processing.
  • Regularized inversion where a true inverse is undefined.

Neat

Built on the SVD, it thresholds tiny singular values to zero, so rank-deficient matrices invert gracefully instead of blowing up.

For a full-rank square matrix it coincides exactly with matrix_inverse, making it a safe superset.

Known issues

The singular-value truncation tolerance affects results for near-rank-deficient matrices; borderline singular values can flip in or out.

To just solve a system, matrix_lstsq is cheaper and reports residual/rank — pinv materializes the whole operator.

See also

pseudo-inversemoore-penrosesvdlinear-algebralapackmklstateless