![]() |
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 of rows in B, the VI sets A x B to an empty array and returns an error. |
![]() |
B is the second matrix. If the number of rows in B does not match the number of columns in A, the VI sets A x B to an empty array and returns an error. |
![]() |
A x B is the matrix containing the result of the matrix multiplication A x B. |
![]() |
error returns any error or warning condition from the VI. |
If A is an n-by-k matrix and B is a k-by-m matrix, the matrix multiplication of A and B, C = AB, results in a matrix, C, whose dimensions are n-by-m. Let A represent the 2D input array A matrix, B represent the 2D input array B matrix, and C represent the 2D output array A x B. The VI obtains the elements of C using the formula
where n is the number of rows in A matrix, k is the number of columns in A matrix and the number of rows in B matrix, and m is the number of columns in B matrix.
![]() | Note The A x B VI performs a strict matrix multiplication and not an element-by-element 2D multiplication. To perform an element-by-element multiplication, you must use the Multiply function. In general, AB ![]() |