In Excel: use =MMULT(array1, array2) for matrix multiplication — array1's column count must equal array2's row count, or the result is #VALUE!.
Syntax
Arguments
| Argument | Description | |
|---|---|---|
array1 | required | The first matrix. Its column count must equal array2's row count. |
array2 | required | The second matrix. |
Related functions
Lay the coefficients out as a square block and the constants as a matching column.
Check =MDETERM(coefficients) is not zero before going further.
Click a cell with room for the result and type =MMULT(MINVERSE(coefficients), constants).
Press Enter in Excel 365, or select the output range and press Ctrl+Shift+Enter in older versions.
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
MMULT multiplies two matrices, MINVERSE inverts a square one and MDETERM returns its determinant. Together they solve systems of linear equations directly in the grid: the solution to Ax = b is =MMULT(MINVERSE(A), b). That covers blending problems, cost allocation across interdependent departments, and input-output models. The dimension rule for MMULT is absolute and the usual source of #VALUE!. MINVERSE fails on a singular matrix, which MDETERM predicts — a determinant of zero means no inverse exists and the system has no unique solution. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. Treat “excel mmult function” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected formula shows up while it is still harmless. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.
A worked example
Solving a three-equation system with coefficients in A1:C3 and constants in E1:E3: =MMULT(MINVERSE(A1:C3), E1:E3) spills the three unknowns. Checking solvability first: =MDETERM(A1:C3) returning 0 means there is no unique solution and MINVERSE will fail. Weighted totals across a matrix: =MMULT(weights_row, values_matrix). These three solve linear systems in the grid, which is the alternative to Solver for problems that have an exact answer. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.
In Google Sheets
Everything above works in Google Sheets too. Excel and Sheets share the formula syntax used here; only the surrounding menus are arranged differently. That portability is deliberate — learn it once and it follows you between the two tools and across Windows and Mac. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top, the tool proves it, and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. If you take one thing from this page on “excel mmult function”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.
Common mistakes
- Mismatched dimensions, which returns
#VALUE!— array1's columns must equal array2's rows. - Inverting a singular matrix, which
MDETERMwould have warned about. - Forgetting Ctrl+Shift+Enter in pre-365 versions, where the result appears as a single value.
Frequently asked questions
How do I solve simultaneous equations in Excel?
=MMULT(MINVERSE(coefficient_matrix), constants_vector) returns the solution vector.
Why does MMULT return #VALUE!?
The inner dimensions do not agree: the first matrix's column count must equal the second's row count.
What does a determinant of zero mean?
The matrix is singular — it has no inverse and the system has no unique solution.