MMULT Function

Excel 2007+

Summary

The MMULT function performs matrix multiplication between two arrays, producing a result array with dimensions matching the row count of the first array and column count of the second array. This powerful tool is essential for linear algebra operations and advanced data analysis in Excel.

Syntax

MMULT(array1, array2)

Parameters

Parameter Type Required Description
array1 Array Yes The first matrix with m rows and n columns
array2 Array Yes The second matrix with n rows and p columns

Using the MMULT Function

MMULT is used for matrix multiplication in mathematical and statistical applications. The key requirement is that the number of columns in array1 must equal the number of rows in array2. Enter as array formula (Ctrl+Shift+Enter) or dynamic array in Microsoft 365.

Common MMULT Examples

Basic 2x2 Matrix Multiplication

=MMULT(A1:B2,C1:D2)

Multiplies two 2x2 matrices. Select 2x2 output range first, then enter formula and press Ctrl+Shift+Enter.

3x2 × 2x3 Matrix Example

=MMULT(A1:C3,E1:G2)

Creates 3x3 result matrix from compatible input dimensions. Perfect for transformation matrices.

Dynamic Array (Microsoft 365)

=MMULT(A1:B2,C1:D2)

In current Microsoft 365, simply press Enter - results spill automatically into adjacent cells.

Frequently Asked Questions

Common causes: mismatched dimensions (columns of array1 ≠ rows of array2), empty cells, text values, or non-numeric data in arrays.

Yes for legacy Excel versions. In Microsoft 365, press Enter for dynamic arrays that spill automatically.

Yes, as long as dimensions match. For example, 1×3 × 3×1 produces 1×1 result.

Common Errors and Solutions

#VALUE!

Cause: Columns in array1 don't match rows in array2

Solution: Verify array dimensions are compatible (m×n × n×p)

#VALUE!

Cause: Arrays contain text, blanks, or non-numbers

Solution: Ensure all cells contain valid numeric values only

Single value instead of array

Cause: Formula not entered as array formula

Solution: Select full output range, enter formula, press Ctrl+Shift+Enter

Notes

  • Result array size: rows from array1 × columns from array2
  • Both arrays must contain numbers only - no text or blanks
  • Modern Excel (365): Enter normally, results spill automatically
  • Legacy Excel: Select output range + Ctrl+Shift+Enter
  • Maximum array size limited by available memory
  • Use with MINVERSE for matrix algebra operations

Compatibility

Available in: Excel 2007, Excel 2010, Excel 2013, Excel 2016, Excel 2019, Excel 2021, Microsoft 365

Not available in:

Content last reviewed: December 9, 2025
Update frequency: As needed
Excel versions tested: Excel 2007+