Version:

Last Modified: September 22, 2017

Finds the pseudoinverse matrix of an input matrix by using singular value decomposition.

Use this node when the Inverse Matrix node cannot compute the inverse of a matrix, such as for rectangular or singular matrices.

A rectangular matrix.

This input accepts a 2D array of double-precision, floating point numbers or 2D array of complex double-precision, floating point numbers.

This input also accepts square matrices, but Inverse Matrix can more efficiently calculate the actual inverse of a square matrix as long as the matrix is nonsingular.

**Default: **Empty array

Error conditions that occur before this node runs.

The node responds to this input according to standard error behavior.

Standard Error Behavior

Many nodes provide an **error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

**Default: **No error

A level such that the number of singular values greater than this level is the rank of the input matrix.

If this input is negative, this node uses the following equation to determine the actual tolerance:

$\text{tolerance}=\text{\hspace{0.17em}}\text{max(}m,\text{\hspace{0.17em}}n)*\Vert A\Vert *\epsilon $

where

*A*represents the input matrix*m*represents the number of rows in*A**n*represents the number of columns in*A*-
$\Vert A\Vert $ is the 2-norm of
*A* - $\epsilon $ is the smallest floating point number that can be represented by type double

**Default: **-1

The pseudoinverse matrix of the input matrix.

Error information.

The node produces this output according to standard error behavior.

Standard Error Behavior

**error in** input and an **error out** output so that the node can respond to and communicate errors that occur while code is running. The value of **error in** specifies whether an error occurred before the node runs. Most nodes respond to values of **error in** in a standard, predictable way.

The *m*-by-*n* matrix *A*^{+} is called the pseudoinverse of matrix *A* if *A*^{+} satisfies the following four Moore-Penrose conditions:

This node computes the pseudoinverse matrix *A*^{+} using the SVD algorithm. For example, assume the singular value decomposition of *A* equals *U**S**V**. Then *A*^{+} = *V**S*^{+}*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 node sets the reciprocals to zero.

You can use the pseudoinverse matrix to provide a least-squares solution of a linear system. For example, for a linear system *A**x* = *b*, the following equation is the least-squares solution: *x* = *A*^{+}*b*.

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: This product does not support FPGA devices

Web Server: Not supported in VIs that run in a web application