Category: FUNCTION | Updated: 2026-11-22
How to Use the MMULT Function in Google Sheets
Syntax
=MMULT(matrix1, matrix2)
- matrix1: The first numeric array or cell range.
- matrix2: The second numeric array or cell range. The number of columns in
matrix1must equal the number of rows inmatrix2.
Example
Multiply the unit price table (A2:B3) by the sales quantity table (D2:E3) to compute the total sales matrix. Enter =MMULT(A2:B3, D2:E3) in cell A6.
| Column A | Column B | Column C | Column D | Column E | |
|---|---|---|---|---|---|
| Row 1 | Product A Price | Product B Price | Store 1 Qty | Store 2 Qty | |
| Row 2 | 100 | 200 | 3 | 5 | |
| Row 3 | 150 | 300 | 4 | 2 | |
| Row 5 | Store 1 Sales | Store 2 Sales | |||
| Row 6 | 1100 | 900 | |||
| Row 7 | 1650 | 1350 |
Note: Cell A6 is calculated as (100×3) + (200×4) = 1100.
Common Errors and Notes
- Matrix Dimension Mismatch: For example, a “2×3” matrix and a “3×2” matrix can be multiplied, whereas a “2×3” matrix and a “2×3” matrix cannot and will return
#VALUE!. - No Blank Cells Allowed: Empty cells are treated as blank rather than
0and trigger an error, so always enter0where needed.
Frequently Asked Questions
Q. What is the most common cause of a #VALUE! error in MMULT?
A. The main cause is that the "number of columns in the first matrix" does not match the "number of rows in the second matrix". Check your matrix dimensions before calculating.
Q. What happens if the range contains blank cells or text?
A. If even one blank cell or text string is included in the calculation range, MMULT returns a "#VALUE!" error. Every cell must contain a number.