How can i Perform Matrix Multiplication in Excel (With Examples)

Matrix multiplication in excel can be done using the MMULT function. To use this function, enter the formula “=MMULT (array 1, array 2)”, and press enter. Array 1 and array 2 should be arrays of the same size, and the result will be the product of the two arrays. For example, if array 1 is {1, 2; 3, 4} and array 2 is {5, 6; 7, 8}, then the result of the MMULT function will be {19, 22; 43, 50}.


You can use the MMULT function in Excel to perform matrix multiplication.

This function uses the following basic syntax:

MMULT(array1, array2)

where:

  • array1, array2: The two matrices you’d like to multiply.

The following examples show how to use the MMULT function to perform the following matrix multiplications in Excel:

  • (2×2) by (2×2) Matrix Multiplication
  • (2×2) by (2×3) Matrix Multiplication
  • (3×3) by (3×2) Matrix Multiplication

Let’s jump in!

Example 1: (2×2) by (2×2) Matrix Multiplication

The following screenshot shows how to multiply a (2×2) matrix with another (2×2) matrix in Excel:

2x2 by 2x2 matrix multiplication in Excel

We typed the following formula in cell G2 to perform this matrix multiplication:

=MMULT(A2:B3, D2:E3)

Here are the actual formulas that Excel used to perform this matrix multiplication:

This results in the following 2×2 matrix:

Example 2: (2×2) by (2×3) Matrix Multiplication

The following screenshot shows how to multiply a (2×2) matrix with a (2×3) matrix in Excel:

We typed the following formula in cell H2 to perform this matrix multiplication:

=MMULT(A2:B3, D2:F3)

Here are the actual formulas that Excel used to perform this matrix multiplication:

This results in the following 2×3 matrix:

Related:

Example 3: (3×3) by (3×2) Matrix Multiplication

The following screenshot shows how to multiply a (3×3) matrix with a (3×2) matrix in Excel:

3x3 by 3x2 matrix multiplication in Excel

We typed the following formula in cell H2 to perform this matrix multiplication:

=MMULT(A2:C4, E2:F4)

Here are the actual formulas that Excel used to perform this matrix multiplication:

This results in the following 3×2 matrix:

Related:

Note: You can find the complete documentation for the MMULT function in Excel .

x