In Excel: use =MMULT(array1, array2) for matrix multiplication — array1's column count must equal array2's row count, or the result is #VALUE!.
On this page8
Syntax
Arguments
| Argument | required / optional | 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.
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. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. 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 and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. For “excel mmult function”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
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.