Last Modified: January 9, 2017

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.

**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.

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 you can solve 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.

Triangular systems are easy to solve using recursive techniques. Consequently, when you obtain the *L* and *U* matrices from *A*, you can find *z* from the *L**z* = *y* system and *x* from the *U**x* = *z* system.

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 you can solve *R**x* = *Q*^{T}*y*.

You can solve this triangular system 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