How to Multiply 3 Matrices in Excel (2 Easy Methods)

Get FREE Advanced Excel Exercises with Solutions!

Matrices are arrays of numbers. Multiplication of matrices has a wide range of uses in various fields like linear equations, network theory, etc. When two matrices are multiplied, the row elements of a matrix are multiplied with the corresponding column elements of another matrix. It can be a tiresome job to multiply matrices with a higher number of rows and columns manually. Fortunately, matrices can be easily multiplied in Excel. Today, in this article, we’ll learn two quick and suitable ways to multiply 3 matrices in Excel effectively with appropriate illustrations.


How to Multiply 3 Matrices in Excel: 2 Suitable Ways

We can multiply 3 matrices in Excel by entering a custom formula for each element of the product matrix. But, this may not be advantageous for matrices with higher dimensions. Fortunately, Excel has an inbuilt function named MMULT function to multiply matrices. We will multiply 3 matrices by using the MMULT function. We are going to use the following dataset to illustrate the methods.

multiply 3 matrices in excel


1. Use MMULT Function to Multiply 3 Matrices in Excel

The best way to multiply matrices in Excel is to use the MMULT function. To multiply 3 matrices, firstly, you have to multiply the first two matrices. Then multiply the third matrix with the resultant matrix. Let’s follow the instructions below to multiply 3 matrices using the MMULT function!

Step 1:

  • Before you attempt to multiply matrices, Make sure the number of columns of the first matrix is equal to the number of rows of the second matrix.
  • You need to determine the dimension of the product matrix also. The dimension of a matrix refers to the number of rows and columns of the matrix. The product matrix will have the same number of rows as the first matrix and the same number of columns as the second matrix.
  • In the case of our dataset, the dimension of the product matrix will be 3×3.
  • Now select cell D10.

Use MMULT Function to Multiply 3 Matrices in Excel

  • Hence, type the following formula.
=MMULT(B5:D7,F5:H7)

  • Further, simply press ENTER on your keyboard.
  • As a result, you will get the return of the MMULT function.

Use MMULT Function to Multiply 3 Matrices in Excel

Step 2:

  • Now, we will multiply the Matrix C with the resultant Matrix (AxB) by using the MMULT To do that, write down the MMULT function again in cell H10.
=MMULT(D10:F12, J5:L7)

  • Again, press ENTER on your keyboard.
  • As a result, you will be able to get the multiplication of the 3 matrices’ using the MMULT function.

Use MMULT Function to Multiply 3 Matrices in Excel


2. Apply Custom Formula to Multiply 3 Matrices in Excel

This method is not advantageous for multiplying matrices with higher dimensions. Yet, it gives a clear idea of what happens when using the MMULT function. Also, this gives a clear understanding of how to multiply two matrices. Then we will multiply 3 matrices. Let’s follow the instructions below to multiply 3 matrices!

Steps:

  • You can just enter the following formula in cell D10.
=B5*F5+C5*F6+D5*F7
  • Write down the below formula in cell D11.
=B6*F5+C6*F6+D6*F7
  • The formula in cell D12 will be
=B7*F5+C7*F6+D7*F7
  • Furthermore, write down the below formula in cell E10.
=B5*G5+C5*G6+D5*G7
  • And for cell E11.
=B6*G5+C6*G6+D6*G7
  • For cell E12.
=B7*G5+C7*G6+D7*G7
  • Thus, write down the below formula in cell F10.
=B5*H5+C5*H6+D5*H7
  • In cell F11, we will input this formula.
=B6*H5+C6*H6+D6*H7
  • Write down the below formula in cell F12.
=B7*H5+C7*H6+D7*H7
  • This will give the same result obtained in the earlier method. If you just notice the formulas, you can easily understand the process of matrix multiplication.

Apply Custom Formula to Multiply 3 Matrices in Excel

  • You can just enter the following formula in cell H10.
=D10*J5+E10*J6+F10*J7
  • Similarly, write down the below formula in cell H11.
=D11*J5+E11*J6+F11*J7
  • Type the below formula in cell H12.
=D12*J5+E12*J6+F12*J7
  • Enter the below formula in cell I10.
=D10*K5+E10*K6+F10*K7
  • Input the below formula in cell I11.
=D11*K5+E11*K6+F11*K7
  • Apply this formula in cell I12.
=D12*K5+E12*K6+F12*K7
  • The formula in cell J10 is
=D10*L5+E10*L6+F10*L7
  • Similarly, write down the below formula in cell J11.
=D11*L5+E11*L6+F11*L7
  • Now, write down the below formula in cell J12.

=D12*L5+E12*L6+F12*L7

  • Hence, you will get the resultant value of the multiplication of the 3 matrices which has been given in the below screenshot.


Things to Remember

👉 Make sure the number of columns of the first matrix is equal to the number of rows of the second matrix before starting to multiply them.

👉 In Microsoft 365, Excel will show the #Value! error if you don’t select the proper dimension. The #Value! error occurs when any of the elements of the matrices is not a number.


Download Practice Workbook

Download this practice workbook to exercise while you are reading this article.


Conclusion

I hope all of the suitable methods mentioned above to multiply 3 matrices will now provoke you to apply them in your Excel spreadsheets with more productivity. You are most welcome to feel free to comment if you have any questions or queries.


<< Go Back to | Matrix in Excel | Excel for Math | Learn Excel

What is ExcelDemy?

ExcelDemy - Learn Excel & Get Excel Solutions Center provides online Excel training , Excel consultancy services , free Excel tutorials, free support , and free Excel Templates for Excel professionals and businesses. Feel free to contact us with your Excel problems.
Md. Abdur Rahim Rasel
Md. Abdur Rahim Rasel

MD. ABDUR RAHIM is a marine engineer proficient in Excel and passionate about programming with VBA. He views programming as an efficient means to save time while managing data, handling files, and engaging with the internet. His interests extend to Rhino3D, Maxsurf C++, AutoCAD, Deep Neural Networks, and Machine Learning, reflecting his versatile skill set. He earned a B.Sc in Naval Architecture & Marine Engineering from BUET, and now he has become a content developer, creating technical content... Read Full Bio

We will be happy to hear your thoughts

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo