![]() |
Input Matrix is a square or rectangular, real matrix. The number of columns in A must match the number of rows in B and must be greater than zero: k > 0. If the number of columns in A does not match the number or rows in B, the VI sets AxB to an empty array and returns an error. | ||||||||
![]() |
Known Vector The number of elements in the Known Vector must be equal to the rows of the Input Matrix. If the number of elements in the Known Vector does not match the rows of the Input Matrix, the VI sets the 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 determinant 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 be an m-by-n matrix that represents the Input Matrix, Y be the set of m coefficients in Known Vector, and X be the set of n elements in Solution Vector that solves the system
AX = Y
When m>n, the system has more equations than unknowns, so it is an overdetermined system. The solution that satisfies AX=Y might not exist, so 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 may have infinite solutions that satisfy AX=Y. The VI finds one of these solutions.
In the case of 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.
In the case of mn can be decomposed to an orthogonal matrix Q and an upper triangular matrix R, so that A=QR. The linear system can then be represented by QRX=Y. You can then solve RX=QTY.
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 the system.