Real PseudoInverse Matrix VI
- Updated2025-07-30
- 3 minute(s) read
Finds the PseudoInverse Matrix of Input Matrix. Wire data to the Input Matrix input to determine the polymorphic instance to use or manually select the instance.

Inputs/Outputs
Input Matrix
—
Input Matrix is a rectangular, real matrix. When Input Matrix is not a square matrix, or when Input Matrix is singular, the inverse of Input Matrix does not exist. You can compute the pseudoinverse of Input Matrix instead.
tolerance
—
tolerance defines a level such that the number of singular values greater than this level is the rank of Input Matrix. The default is –1.
PseudoInverse Matrix
—
PseudoInverse Matrix is the pseudoinverse matrix of the Input Matrix. If Input Matrix A is square and not singular, then the pseudoinverse is the same as the inverse of a matrix, and the Inverse Matrix VI should be used as a more efficient method of computing the inverse of the Input Matrix.
error
—
error returns any error or warning from the VI. You can wire error to the Error Cluster From Error Code VI to convert the error code or warning into an error cluster. |
The m-by-n matrix A+ is called the pseudoinverse of matrix A if A+ satisfies the following four Moore-Penrose conditions:
- A A+ A = A.
- A+ A A+ = A+.
- A A+ is a symmetric matrix.
- A+ A is a symmetric matrix.
The VI computes PseudoInverse Matrix A+ using the SVD algorithm. For example, assume the singular value decomposition of A equals USV*. Then A+ = VS+U*. You can calculate the pseudoinverse matrix of a diagonal matrix S by taking the reciprocal of each element on the diagonal. When the elements are smaller than the tolerance, this VI sets the reciprocals to zero.
The pseudoinverse provides a least-squares solution to a system of linear equations. For example, for a linear system Ax = b, the following equation is the least-squares solution: x = A+b.
Examples
Refer to the following example files included with LabVIEW.
- labview\examples\Mathematics\Linear Algebra\Linear Algebra Calculator.vi
Input Matrix
—
tolerance
—
PseudoInverse Matrix
—
error
—