How to use the Excel MMULT function

Excel MMULT, a “Math & Trigonometry” function in excel, stands for “Matric Multiplication” and returns the product of two arrays of two matrices where the number of rows of Matrix 1 is equal to the number of columns of Matrix 2.

Syntax: MMULT(array1, array2)

The MMULT function syntax has the following arguments:

  • array1: An array of numbers that must have the same number of columns as the number of rows in array2.
  • array2: An array of numbers that must have the same number of columns as the number of rows in array1.

Example: Let’s look at some Excel MMULT function examples and explore how to use the MMULT function as a worksheet function in Microsoft Excel:

Example 1:

Excel MMULT function - How to use the Excel MMULT function

In this example for Matrix 1, we have two rows and for Matrix 2 we have two columns, so Matrix 3 will be 2 * 2 matrix. So select 2 * 2 rows and columns to create new Matrix 3.

Syntax:  =MMULT(A2:C3,E2:F4)

Result:

Excel MMULT function 2 - How to use the Excel MMULT function

Example 2:

Excel MMULT function 4 - How to use the Excel MMULT function

This time we have 3 * 3 matrix, so new matrix will be the number of rows of Matrix 1 and number of columns of Matrix 2. So new Matrix 3 will also be 3 * 3 matrix only.

Syntax: =MMULT(A2:C4,E2:G4)

Result:

Excel MMULT function 3 - How to use the Excel MMULT function

Note:

  • Arrays must contain only numbers.
  • Columns in array1 must equal the rows in array2.
  • Array1 and Array2 can be provided as cell ranges, array constants, or references.
  • Formulas that return arrays must be entered as array formulas using control + shift + enter.
  • MMULT returns the #VALUE! error if any cells in array1 and array2 are not numbers, or if array1 columns do not equal array2 rows.

Add a Comment

Your email address will not be published. Required fields are marked *