MMULT function in Google Sheets
Calculates the matrix product of two matrices specified as arrays or ranges.
=MMULT(matrix1, matrix2)MMULT syntax and parameters
Two arguments, two required.
- matrix1arrayRequired
The first matrix in the matrix multiplication operation, represented as an array or range.
- matrix2arrayRequired
The second matrix in the matrix multiplication operation, represented as an array or range.
MMULT examples
Formulas you'll actually reuse.
A 3×3 matrix times a 3×1 vector — e.g. a transition matrix applied to a population:
=MMULT(B2:D4, F2:F4)A dot product of two columns via a 1×12 · 12×1 multiply:
=MMULT(TRANSPOSE(B2:B13), C2:C13)Result
12480.5
MMULT in Excel
Same name — your formula ports as-is.
Try MMULT in the playground
Edit the example — nothing to install.
Preloaded with the MMULT formula from Example 1 — change anything and watch it respond.
MMULT errors
What they mean — and the fixes.
#VALUE!The first array's column count doesn't equal the second array's row count — that is the rule for matrix multiplication.
Related functions
More ways Google Sheets gets this done.
- CHOOSECOLSCreates a new array from the selected columns in the existing range.ArrayExcel
- CHOOSEROWSCreates a new array from the selected rows in the existing range.ArrayExcel
- HSTACKAppends ranges horizontally and in sequence to return a larger array.ArrayExcel
- LINESTGiven partial data about a linear trend, calculates various parameters about the ideal linear trend using the least-squares method.ArrayExcel
- MDETERMReturns the matrix determinant of a square matrix specified as an array or range.ArrayExcel
- MINVERSEReturns the multiplicative inverse of a square matrix specified as an array or range.ArrayExcel