![]() |
Input Matrix must be a nonsingular, square or rectangular, real matrix. | ||||||||
![]() |
Known Vector The number of elements in Known Vector must match the row size of the Input Matrix. If the number of elements in Known Vector does not match the row size of Input Matrix, the VI sets Solution Vector to an empty array and returns an error. | ||||||||
![]() |
matrix type is 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.
matrix type has four possible options.
|
||||||||
![]() |
Solution Vector is the solution X to AX = Y where A is the Input Matrix and Y is the Known Vector. | ||||||||
![]() |
error returns any error or warning condition from the VI. |
Let A represent the m-by-n Input Matrix, Y represent the set of m elements in the Known Vector, and X represent the set of n elements in the Solution Vector that solves for the system
AX = Y
When m>n, the system has more equations than unknowns, so it is an overdetermined system. Since the solution that satisfies AX=Y may not exist, the VI finds the least square solution X, which minimizes
.
When m<n, the system has more unknowns than equations, so it is an underdetermined system. It might have infinite solutions that satisfy AX=Y. The VI then selects one of these solutions.
When m=n, if A is a nonsingular matrixno row or column is a linear combination of any other row or column, respectivelythen you can solve the system for X by decomposing the Input Matrix A into its lower and upper triangular matrices, L and U, such that
AX = LZ = Y
and
Z = UX
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 LZ = Y system and X from the UX = Z system.
When m n, A can be decomposed to an orthogonal matrix Q, and an upper triangular matrix R, so that A=QR, and the linear system can be represented by QRX=Y. You can then solve
You can easily solve this triangular system to get X using recursive techniques.
![]() | Note You cannot always determine beforehand whether the matrix is singular, especially with large systems. The Inverse Matrix VI detects singular matrices and returns an error, so you do not need to verify whether you have a valid system before using this VI. |
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, the VI cannot always solve for the system.