In this article:

May 8, 2024

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.

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

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

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.

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.

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

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

We'll email you 1-3 times a week — and never share your information.

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 ->