Back to Linear Algebra
matmul
Matrix multiplication
Syntax
C = matmul(A, B)
Description
Matrix multiplication of two arrays. For 2-D arrays, performs standard matrix multiplication. For N-D arrays, broadcasts over batch dimensions and multiplies the last two dimensions.
Parameters
| Name | Description |
|---|---|
| A | First array (..., M, K) |
| B | Second array (..., K, N) |
Returns
Matrix product (..., M, N)
Examples
Try It
>> matmul([1 2; 3 4], [5 6; 7 8])