MMULT Function

MMULT Function

MMULT Function

Returns the matrix product of two arrays.

ExcelClash Team
PUBLISHED

Summary

The Excel MMULT function returns the matrix product of two numeric arrays. The result is an array with the same number of rows as the first array and the same number of columns as the second array.

MMULT is different from ordinary cell-by-cell multiplication. Instead of multiplying positions directly, it combines rows from the first array with columns from the second array. That is why MMULT is used in matrix algebra, coordinate transforms, systems of equations, and weighted linear calculations.

Purpose

Multiply two numeric arrays

Use MMULT when the calculation depends on matrix multiplication rather than ordinary cell-by-cell multiplication.

Return Value

A numeric array

The output has the same number of rows as array1 and the same number of columns as array2.

Syntax

=MMULT(array1, array2)

Both arguments are required. The number of columns in array1 must match the number of rows in array2. Microsoft also notes that both arrays must contain only numbers.

Arguments

  • array1 - [required] The first array in the multiplication.
  • array2 - [required] The second array in the multiplication.

MMULT Compatibility Rules

Array 1 Shape Array 2 Shape Allowed? Result Shape
2 x 2 2 x 2 Yes 2 x 2
2 x 3 3 x 1 Yes 2 x 1
3 x 2 3 x 3 No #VALUE!
1 x 5 5 x 1 Yes 1 x 1

The key rule is simple: inner dimensions must match. If they do not, MMULT cannot be performed.

Using MMULT

MMULT is often used when one set of values needs to be applied linearly to another. A common example is multiplying a matrix of coefficients by a vector of inputs. In practical terms, that can represent weighted totals, coordinate transforms, or the final step in solving a matrix equation.

It is also important to remember that matrix multiplication is order-sensitive. In general, MMULT(A,B) is not the same as MMULT(B,A). Even when both products are allowed, they may return different answers. That makes argument order part of the logic, not just a formatting detail.

In Microsoft 365, MMULT spills automatically into the needed output cells. In older Excel versions, you must select the full output range first and confirm the formula as an array formula with Ctrl+Shift+Enter. If cells in the spill area are blocked, the result may not display as expected.

Example 1 - Multiply Two 2x2 Matrices

This is the standard starting point for learning MMULT.

=MMULT(A1:B2,C1:D2)

The result is another 2x2 matrix. Each output cell is calculated from one row of the first matrix and one column of the second matrix. This example is useful because it shows the structure of matrix multiplication without too much size or notation.

Check Answer
Challenge #1
Target: Sheet1!F1
Multiply 2x2 Matrices

In cell F1, multiply matrix A1:B2 by C1:D2.

Example 2 - Multiply a Matrix by a Vector

This is one of the most practical matrix patterns in Excel.

=MMULT(A1:B2,E1:E2)

Here, a 2x2 matrix is multiplied by a 2x1 vector. The result is a 2x1 vector. This format appears often when a matrix of coefficients is applied to a column of inputs, costs, or measurements.

Check Answer
Challenge #2
Target: Sheet1!F2
Matrix-Vector Product

In cell F2, multiply the 2x2 matrix A1:B2 by the 2x1 vector E1:E2.

Example 3 - Multiply by the Identity Matrix

The identity matrix is the matrix equivalent of multiplying by 1.

=MMULT(A1:B2,MUNIT(2))

The result should match the original matrix A1:B2. This is a useful check because it confirms both the role of the identity matrix and the way MMULT preserves the input when the second matrix is MUNIT(2).

Check Answer
Challenge #3
Target: Sheet1!F3
Identity Verification

In cell F3, multiply matrix A1:B2 by MUNIT(2) and confirm the result matches the original matrix.

Example 4 - Multiply Two 3x3 Matrices

A larger example makes the output shape more obvious.

=MMULT(A1:C3,D1:F3)

This returns a 3x3 result because the first matrix has 3 rows and the second has 3 columns. It is a good way to confirm that the output size depends on the outer dimensions, not the inner ones.

Check Answer
Challenge #4
Target: Sheet1!F4
3x3 Product

In cell F4, multiply the 3x3 matrices A1:C3 and D1:F3.

Common errors are straightforward. MMULT returns #VALUE! if the inner dimensions do not match or if either array contains text or empty cells. That is why it is worth checking both the shape and the data type of the input ranges before using the function in a larger model.

  • MMULT does not do ordinary cell-by-cell multiplication.
  • The order of the arrays matters.
  • The result shape is rows of array1 by columns of array2.

Conclusion Recap

  • Summary: MMULT returns the matrix product of two arrays.
  • Key rule: Columns of the first array must equal rows of the second.
  • Output shape: Rows come from the first array, columns come from the second.
  • Common use: Multiply a matrix by another matrix or by a vector.
  • Common error: #VALUE! appears when dimensions do not match or the arrays are not fully numeric.
Tactical Arena
Select Scenario:
Share MMULT Function!

Tell your friends about this post

Discussion

ExcelClash is an interactive platform designed to level up your Excel skills through real-world exercises and challenges. Sharpen your logic, solve real spreadsheet problems, and learn faster.

© 2026 ExcelClash, Inc. All rights reserved.