Excel function

MMULTfunction

Multiplies two matrices.

All versions
=MMULT(A2:B3, E2:F3)
Range to drag
A
B
C
D
E
F
G
H
I
J
K
1
2
3
4

Drag the corner dots to change array1, array2. Widen array2 to E2:G3 and the result becomes 2×3. If array1's column count differs from array2's row count, you get #VALUE!. Try breaking it on purpose to see the errors.

Result

{19,22;43,50}

array1
A2:B3Drag the corner dots on the table

The left matrix. Its column count must equal array2's row count.

array2
E2:F3

The right matrix.

What is the MMULT function?

=MMULT(array1, array2)

MMULT multiplies two matrices. Each result cell pairs one row of array1 with one column of array2, multiplies and adds.

array1's column count must equal array2's row count, and the result has (array1 rows) × (array2 columns). A2:C4 is matrix 1, E2:G4 is matrix 2, and the result fills from column I. Drag a range to change the matrix size.

Arguments

array1
The left matrix. A blank or text cell returns #VALUE!.
array2
The right matrix.

MMULT examples

  1. Example 1. 2×2 product

    =MMULT(A2:B3, E2:F3)

    {19,22;43,50}. The first cell is 1×5+2×7=19.

  2. Example 2. 2×3 result

    =MMULT(A2:B3, E2:G3)

    The result has 2 rows and 3 columns.

Common mistakes

FAQ

In older versions?
Select the result range first, type the formula and press Ctrl+Shift+Enter.
Multiply matching cells?
Use =A2:B3*E2:F3. That is different from a matrix product.