Platform | x64, Win32, .NET |
Purpose |
To multiply two numeric or logical matrices |
Class |
Transformational function. |
Syntax |
FUNCTION MATMUL(MATRIX_A, MATRIX_B) |
Description |
MATRIX_A shall be of numeric type (integer, real, or complex) or of logical type. MATRIX_A and MATRIX_B must be array valued and of rank one or two. MATRIX_B must be of numeric type if MATRIX_A is of numeric type and of logical type if MATRIX_A is of logical type. If MATRIX_A has rank one, MATRIX_B must have rank two. If MATRIX_B has rank one, MATRIX_A must have rank two. The size of the first (or only) dimension of MATRIX_B must equal the size of the last (or only) dimension of MATRIX_A. |
Return value |
If the arguments are of numeric type, the type and kind type parameter of the
result are determined by the types of the arguments. If the arguments are of
type logical, the result is of type logical. The result is the standard matrix
product of the two matrices. In the case where the numeric result for element ( i
, j ) takes the form The shape of the result depends on the shapes of the arguments as follows: Case (i): If MATRIX_A has shape (n, m) and MATRIX_B has shape (m, k), the result has shape (n, k). Case (ii): If MATRIX_A has shape (m) and MATRIX_B has shape (m, k), the result has shape (k). Case (iii): If MATRIX_A has shape (n, m) and MATRIX_B has shape (m), the result has shape (n ). |