Version:

Last Modified: June 25, 2019

Solves a linear system *A**x* = *y*.

Specifying the matrix type allows this node to execute more quickly by avoiding unnecessary computations, which could introduce numerical inaccuracy.

Name | Description |
---|---|

General |
The input matrix is a matrix that you cannot describe with one of the other categories. |

Positive definite |
The input matrix is positive-definite. |

Lower triangular |
The input matrix is lower triangular. |

Upper triangular |
The input matrix is upper triangular. |

**Default: **General

A square or rectangular matrix.

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

The number of rows in the real matrix must equal the number of elements in the known, dependent-variable values. Otherwise, the node returns an empty array for the solution vector and returns an error.

If the real matrix is singular and the **matrix type** is General, this node finds the least-square solution. Otherwise, this node returns an error when the real matrix is singular.

An array of known, dependent-variable values.

This input accepts the following data types:

- 1D array of double-precision, floating point numbers
- 1D array of complex double-precision, floating point numbers

The number of rows in the real matrix must equal the number of elements in the known, dependent-variable values. Otherwise, the node returns an empty array for the solution vector and returns an error.

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

The solution *x* to *A**x* = *y* where *A* is the input matrix and *y* is the known vector.

This output can return a matrix or a vector.

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.

Let *A* be an *m*-by-*n* matrix that represents **matrix**, *y* be the set of *m* coefficients that represents **known vector**, and *x* be the set of *n* elements that represents **solution vector** and solves the following system.

*A**x* = *y*

When *m* > *n*, the system has more equations than unknowns, which means the system is an over-determined system. Because the solution that
satisfies *A**x* = *y* might not exist, this node finds the least-square solution *x*, which minimizes ||*A**x* - *y*||.

When *m* < *n*, the system has more unknowns than equations, which means the system is an under-determined system. The system may have infinite
solutions that satisfy *A**x* = *y*. This node finds one of these solutions.

When *m* = *n*, if *A* is a nonsingular matrix (no row or column is a linear combination of any other row or column, respectively), then this node
solves the system for *x* by decomposing *A* into its lower and upper triangular matrices, *L* and *U*, such that the following is true.

*A**x* = *L**z* = *y*

And *z* = *U**x* can be an alternate representation of the original system. Notice that *z* is also an *n*-element vector.

Then, this node solves *L**z* = *y* to get *z* and *U**x* = *z* to get *x* using recursive techniques.

When *m* ≠ *n*, *A* can be decomposed to an orthogonal matrix *Q* and an upper triangular matrix *R*, so that *A* = *Q**R*. Then the linear system can be represented by *Q**R**x* = *y* and this node solves *R**x* = *Q*^{T}*y* to get *x* using recursive techniques.

The numerical implementation of the matrix inversion is numerically intensive and, because of its recursive nature, is also highly sensitive to round-off error introduced by the floating-point numeric coprocessor. Although the computations use the maximum possible accuracy, this node cannot always solve the system.

**Where This Node Can Run: **

Desktop OS: Windows

FPGA: Not supported

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