In this article:

Google Sheets Matrix Multiplication (How to Use It in 2024)

May 8, 2024

Google Sheets Matrix Multiplication 

Google Sheets offers a way to perform matrix multiplication through the use of its array formulas, specifically with the MMULT function. Matrix multiplication is a fundamental operation in linear algebra where you multiply two matrices by summing the products of their rows and columns. The MMULT function automates this process in Google Sheets.


The syntax of the MMULT function is as follows:

MMULT(matrix1, matrix2)

  • matrix1 is the first matrix to be multiplied.
  • matrix2 is the second matrix to be multiplied.

For the multiplication to work, the number of columns in matrix1 must match the number of rows in matrix2. The result is a new matrix where each element is calculated as the dot product of the rows of matrix1 and the columns of matrix2.

How to Use the Matrix Multiplication in Google Sheets

Follow the steps below to use matrix multiplication in Google Sheets. 

1. Enter Matrices A and B into Google Sheets

Enter Matrix A and Matrix B into Google Sheets and make sure Matrix A's columns correspond to Matrix B's rows.

google sheets matrix multiplication

2. Identify Where to Place the Resulting Matrix

Identify where the result will be displayed. The result of multiplying a 2x3 matrix by a 3x2 matrix is a 2x2 matrix. Select the cells where you want the multiplication result to appear. For our matrices, select a 2x2 range since that will be the size of our result.

matrix multiplication google sheets

3. Input the MMULT Formula for Matrices A and B

Type =MMULT(A1:C2, D1:E3) into the formula bar while the desired output range is selected. This formula references the ranges where Matrices A and B are located.

matrix multiplication in google sheets

4. Confirm the Formula with Shift+Ctrl+Enter

Press Enter while holding down Shift+Ctrl to apply the formula across the selected range. This will calculate the matrix product.

5. Review the Matrix Multiplication Output

Check the output in the selected range. This output is the result of multiplying Matrix A by Matrix B.

We hope that you now have a better understanding of what the Google Sheets matrix multiplication is and how to use the matrix multiplication in Google Sheets. 

If you enjoyed this article, you might also like our article on how to use IMPORTFROMWEB in Google Sheets.  

If you want to get a copy of our lead tracking template in Google Sheets, we also suggest checking out our detailed guide.

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.
Get your copy of our free Google Sheets automation guide!
  • 27 pages of Google Sheets tips and tricks to save time
  • Covers pivot tables and other advanced topics
  • 100% free

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->