# MMULT

Returns the matrix product of two arrays. The result is an array with the same number of rows as array1 and the same number of columns as array2.

**Syntax**

**MMULT**(**array1**,**array2**)

**Array1**,**array2** are the arrays you want to multiply.

- The number of columns in array1 must be the same as the number of rows in array2, and both arrays must contain only numbers.
- Array1 and array2 can be given as cell ranges, array constants, or references.
- If any cells are empty or contain text, or if the number of columns in array1 is different from the number of rows in array2, MMULT returns the #VALUE! error value.

**Remarks**

- The matrix product array a of two arrays b and c is:
where i is the row number, and j is the column number.

- Formulas that return arrays must be entered as array formulas.

**Examples**

`MMULT({1,3;7,2}, {2,0;0,2})`

equals {2,6;14,4}

`MMULT({3,0;2,0}, {2,0;0,2})`

equals {6,0;4,0}

`MMULT({1,3,0;7,2,0;1,0,0}, {2,0;0,2})`

equals #VALUE!, because the first array has three columns, and the second array has only two rows.