Solve Linear Equations VI
- Updated2023-02-21
- 19 minute(s) read
Solve Linear Equations VI
Owning Palette: Linear Algebra VIs
Requires: Multicore Analysis and Sparse Matrix Toolkit
Finds the solution to a linear system AX = Y.
You must manually select the polymorphic instance you want to use.
Solve Least Squares Problems (DBL)

![]() |
relative tolerance specifies a level such that the number of singular values greater than relative tolerance*max(m, n)*||A|| is the rank of Input Matrix, where A represents the Input Matrix, ||A|| represents the 2-norm of A, m represents the number of rows in A, and n represents the number of columns in A. The default is -1. If relative tolerance is negative, the internal relative tolerance used to determine rank is , where is a double-precision machine epsilon, as should in the following equation.
|
![]() |
Input Matrix specifies a square or rectangular matrix. If Input Matrix is square and nonsingular, the Least Squares solution is the same as the linear solution to the system, and using Solve Linear Equations instance VIs is more efficient than using this instance VI. |
![]() |
Known Vector specifies an array of known, dependent-variable values. The number of elements in Known Vector must be equal to the number of rows in Input Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Solution Vector returns the Least Square solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Least Squares Problems (SGL)

![]() |
relative tolerance specifies a level such that the number of singular values greater than relative tolerance*max(m, n)*||A|| is the rank of Input Matrix, where A represents the Input Matrix, ||A|| represents the 2-norm of A, m represents the number of rows in A, and n represents the number of columns in A. The default is -1. If relative tolerance is negative, the internal relative tolerance used to determine rank is , where is a single-precision machine epsilon, as should in the following equation.
|
![]() |
Input Matrix specifies a square or rectangular matrix. If Input Matrix is square and nonsingular, the Least Squares solution is the same as the linear solution to the system, and using Solve Linear Equations instance VIs is more efficient than using this instance VI. |
![]() |
Known Vector specifies an array of known, dependent-variable values. The number of elements in Known Vector must be equal to the number of rows in Input Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Solution Vector returns the Least Square solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Least Squares Problems (CDB)

![]() |
relative tolerance specifies a level such that the number of singular values greater than relative tolerance*max(m, n)*||A|| is the rank of Input Matrix, where A represents the Input Matrix, ||A|| represents the 2-norm of A, m represents the number of rows in A, and n represents the number of columns in A. The default is -1. If relative tolerance is negative, the internal relative tolerance used to determine rank is , where is a double-precision machine epsilon, as should in the following equation.
|
![]() |
Input Matrix specifies a square or rectangular matrix. If Input Matrix is square and nonsingular, the Least Squares solution is the same as the linear solution to the system, and using Solve Linear Equations instance VIs is more efficient than using this instance VI. |
![]() |
Known Vector specifies an array of known, dependent-variable values. The number of elements in Known Vector must be equal to the number of rows in Input Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Solution Vector returns the Least Square solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Least Squares Problems (CSG)

![]() |
relative tolerance specifies a level such that the number of singular values greater than relative tolerance*max(m, n)*||A|| is the rank of Input Matrix, where A represents the Input Matrix, ||A|| represents the 2-norm of A, m represents the number of rows in A, and n represents the number of columns in A. The default is -1. If relative tolerance is negative, the internal relative tolerance used to determine rank is , where is a single-precision machine epsilon, as should in the following equation.
|
![]() |
Input Matrix specifies a square or rectangular matrix. If Input Matrix is square and nonsingular, the Least Squares solution is the same as the linear solution to the system, and using Solve Linear Equations instance VIs is more efficient than using this instance VI. |
![]() |
Known Vector specifies an array of known, dependent-variable values. The number of elements in Known Vector must be equal to the number of rows in Input Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Solution Vector returns the Least Square solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Least Squares Problems (nRHS, DBL)

![]() |
relative tolerance specifies a level such that the number of singular values greater than relative tolerance*max(m, n)*||A|| is the rank of Input Matrix, where A represents the Input Matrix, ||A|| represents the 2-norm of A, m represents the number of rows in A, and n represents the number of columns in A. The default is -1. If relative tolerance is negative, the internal relative tolerance used to determine rank is , where is a double-precision machine epsilon, as should in the following equation.
|
![]() |
Input Matrix specifies a square or rectangular matrix. If Input Matrix is square and nonsingular, the Least Squares solution is the same as the linear solution to the system, and using Solve Linear Equations instance VIs is more efficient than using this instance VI. |
![]() |
Known Matrix specifies a matrix of known, dependent-variable values. The number of rows in Known Matrix must be equal to the number of rows in Input Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Solution Matrix returns the Least Square solution X to AX = Y where A is the Input Matrix and Y is the Known Matrix. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Least Squares Problems (nRHS, SGL)

![]() |
relative tolerance specifies a level such that the number of singular values greater than relative tolerance*max(m, n)*||A|| is the rank of Input Matrix, where A represents the Input Matrix, ||A|| represents the 2-norm of A, m represents the number of rows in A, and n represents the number of columns in A. The default is -1. If relative tolerance is negative, the internal relative tolerance used to determine rank is , where is a single-precision machine epsilon, as should in the following equation.
|
![]() |
Input Matrix specifies a square or rectangular matrix. If Input Matrix is square and nonsingular, the Least Squares solution is the same as the linear solution to the system, and using Solve Linear Equations instance VIs is more efficient than using this instance VI. |
![]() |
Known Matrix specifies a matrix of known, dependent-variable values. The number of rows in Known Matrix must be equal to the number of rows in Input Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Solution Matrix returns the Least Square solution X to AX = Y where A is the Input Matrix and Y is the Known Matrix. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Least Squares Problems (nRHS, CDB)

![]() |
relative tolerance specifies a level such that the number of singular values greater than relative tolerance*max(m, n)*||A|| is the rank of Input Matrix, where A represents the Input Matrix, ||A|| represents the 2-norm of A, m represents the number of rows in A, and n represents the number of columns in A. The default is -1. If relative tolerance is negative, the internal relative tolerance used to determine rank is , where is a double-precision machine epsilon, as should in the following equation.
|
![]() |
Input Matrix specifies a square or rectangular matrix. If Input Matrix is square and nonsingular, the Least Squares solution is the same as the linear solution to the system, and using Solve Linear Equations instance VIs is more efficient than using this instance VI. |
![]() |
Known Matrix specifies a matrix of known, dependent-variable values. The number of rows in Known Matrix must be equal to the number of rows in Input Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Solution Matrix returns the Least Square solution X to AX = Y where A is the Input Matrix and Y is the Known Matrix. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Least Squares Problems (nRHS, CSG)

![]() |
relative tolerance specifies a level such that the number of singular values greater than relative tolerance*max(m, n)*||A|| is the rank of Input Matrix, where A represents the Input Matrix, ||A|| represents the 2-norm of A, m represents the number of rows in A, and n represents the number of columns in A. The default is -1. If relative tolerance is negative, the internal relative tolerance used to determine rank is , where is a single-precision machine epsilon, as should in the following equation.
|
![]() |
Input Matrix specifies a square or rectangular matrix. If Input Matrix is square and nonsingular, the Least Squares solution is the same as the linear solution to the system, and using Solve Linear Equations instance VIs is more efficient than using this instance VI. |
![]() |
Known Matrix specifies a matrix of known, dependent-variable values. The number of rows in Known Matrix must be equal to the number of rows in Input Matrix. |
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. |
![]() |
Solution Matrix returns the Least Square solution X to AX = Y where A is the Input Matrix and Y is the Known Matrix. |
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations (DBL)

![]() |
Input Matrix specifies a square matrix. | ||||||||
![]() |
Known Vector specifies an array of known, dependent-variable values. The number of elements in Known Vector must be equal to the number of rows in Input Matrix. | ||||||||
![]() |
matrix type specifies the type of Input Matrix. Knowing the type of Input Matrix can speed up the computation of the Solution Vector and can help you to avoid unnecessary computation, which could introduce numerical inaccuracy.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Solution Vector returns the linear solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. | ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations (SGL)

![]() |
Input Matrix specifies a square matrix. | ||||||||
![]() |
Known Vector specifies an array of known, dependent-variable values. The number of elements in Known Vector must be equal to the number of rows in Input Matrix. | ||||||||
![]() |
matrix type specifies the type of Input Matrix. Knowing the type of Input Matrix can speed up the computation of the Solution Vector and can help you to avoid unnecessary computation, which could introduce numerical inaccuracy.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Solution Vector returns the linear solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. | ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations (CDB)

![]() |
Input Matrix specifies a square matrix. | ||||||||
![]() |
Known Vector specifies an array of known, dependent-variable values. The number of elements in Known Vector must be equal to the number of rows in Input Matrix. | ||||||||
![]() |
matrix type specifies the type of Input Matrix. Knowing the type of Input Matrix can speed up the computation of the Solution Vector and can help you to avoid unnecessary computation, which could introduce numerical inaccuracy.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Solution Vector returns the linear solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. | ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations (CSG)

![]() |
Input Matrix specifies a square matrix. | ||||||||
![]() |
Known Vector specifies an array of known, dependent-variable values. The number of elements in Known Vector must be equal to the number of rows in Input Matrix. | ||||||||
![]() |
matrix type specifies the type of Input Matrix. Knowing the type of Input Matrix can speed up the computation of the Solution Vector and can help you to avoid unnecessary computation, which could introduce numerical inaccuracy.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Solution Vector returns the linear solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. | ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations (nRHS, DBL)

![]() |
Input Matrix specifies a square matrix. | ||||||||
![]() |
Known Matrix specifies a matrix of known, dependent-variable values. The number of rows in Known Matrix must be equal to the number of rows in Input Matrix. | ||||||||
![]() |
matrix type specifies the type of Input Matrix. Knowing the type of Input Matrix can speed up the computation of the Solution Matrix and can help you to avoid unnecessary computation, which could introduce numerical inaccuracy.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Solution Matrix returns the linear solution X to AX = Y where A is the Input Matrix and Y is the Known Matrix. | ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations (nRHS, SGL)

![]() |
Input Matrix specifies a square matrix. | ||||||||
![]() |
Known Matrix specifies a matrix of known, dependent-variable values. The number of rows in Known Matrix must be equal to the number of rows in Input Matrix. | ||||||||
![]() |
matrix type specifies the type of Input Matrix. Knowing the type of Input Matrix can speed up the computation of the Solution Matrix and can help you to avoid unnecessary computation, which could introduce numerical inaccuracy.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Solution Matrix returns the linear solution X to AX = Y where A is the Input Matrix and Y is the Known Matrix. | ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations (nRHS, CDB)

![]() |
Input Matrix specifies a square matrix. | ||||||||
![]() |
Known Matrix specifies a matrix of known, dependent-variable values. The number of rows in Known Matrix must be equal to the number of rows in Input Matrix. | ||||||||
![]() |
matrix type specifies the type of Input Matrix. Knowing the type of Input Matrix can speed up the computation of the Solution Matrix and can help you to avoid unnecessary computation, which could introduce numerical inaccuracy.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Solution Matrix returns the linear solution X to AX = Y where A is the Input Matrix and Y is the Known Matrix. | ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations (nRHS, CSG)

![]() |
Input Matrix specifies a square matrix. | ||||||||
![]() |
Known Matrix specifies a matrix of known, dependent-variable values. The number of rows in Known Matrix must be equal to the number of rows in Input Matrix. | ||||||||
![]() |
matrix type specifies the type of Input Matrix. Knowing the type of Input Matrix can speed up the computation of the Solution Matrix and can help you to avoid unnecessary computation, which could introduce numerical inaccuracy.
|
||||||||
![]() |
error in describes error conditions that occur before this node runs. This input provides standard error in functionality. | ||||||||
![]() |
Solution Matrix returns the linear solution X to AX = Y where A is the Input Matrix and Y is the Known Matrix. | ||||||||
![]() |
error out contains error information. This output provides standard error out functionality. |
Solve Linear Equations Details
The following table lists the support characteristics of this VI.
| Supported on RT targets | Yes |
| Suitable for bounded execution times on RT | Yes (with exceptions). The following instances and cases are exceptions:
|
Refer to the Details section in the Solve Linear Equations VI for more details about this VI.

, where 


















