EDUCBA

EDUCBA

MENUMENU
  • Free Tutorials
  • Certification Courses
  • 120+ Courses All in One Bundle
  • Login
Home Excel Excel Resources Maths Function in Excel MMULT in Excel
Secondary Sidebar
Excel Functions
  • Maths Function in Excel
    • Calculating Investment Return In Excel
    • Sumif Function Examples
    • MROUND in Excel
    • SUM Cells in Excel
    • MMULT in Excel
    • MINVERSE in Excel
    • Trunc in Excel
    • SUMIF with Text
    • COS Function in Excel
    • RANDBETWEEN in Excel
    • Excel SUMIF with OR
    • Excel DEGREES Function
    • Calculations in Excel
    • Sumif Between Two Dates
    • Calculate Income Tax in Excel
    • PRODUCT Function in Excel
    • How to Sum Multiple Rows in Excel
    • Matrix in Excel
    • ROUND Formula in Excel
    • How to SUM in Excel
    • SUMPRODUCT Formula in Excel
    • Excel Running Total
    • Excel Rounding
    • Excel Exponents
    • Excel SIN Function
    • Excel Square Root Function
    • Excel ROUNDUP Function
    • ROUND Excel Function
    • Excel ROUNDDOWN Function
    • ODD Excel Function
    • SUMPRODUCT Function in Excel
    • AGGREGATE Function in Excel
    • ABS Function in Excel
    • Excel TAN Function
    • COMBIN Function in Excel
    • CEILING Function in Excel
    • INT Excel Function
    • SUBTOTAL Function in Excel
    • LN Function in Excel
    • Excel RAND Function
    • TANH Function in Excel
    • SUMIF Function in Excel
    • SUM Function in Excel
    • POWER Function in Excel
    • EVEN Function in Excel
    • LOG Function in Excel
    • FLOOR Excel Function
  • Excel Functions (12+)
  • Excel Tools (114+)
  • Financial Functions in Excel (17+)
  • Logical Functions in Excel (14+)
  • Lookup and Reference Functions in Excel (36+)
  • TEXT and String Functions in Excel (26+)
  • Date and Time Function in Excel (24+)
  • Statistical Functions in Excel (59+)
  • Information Functions in Excel (4+)
  • Excel Charts (56+)
  • Excel Tips (220+)
  • Workplace Productivity (4+)
  • Microsoft Office Tools (15+)
  • Excel Formula and Functions (22+)
  • MS Excel Shortcuts (4+)
Excel Functions Courses
  • Online EXCEL ADVANCED Certification
  • Excel for HR Training

MMULT in Excel

By Madhuri ThakurMadhuri Thakur

MMULT in Excel

Excel MMULT ( Table of Contents)

  • What is MMULT Function in Excel?
  • Examples of MMULT in Excel

Introduction to MMULT in Excel

In mathematical terms, the phenomena of multiplying two matrices with each other are called matrix multiplication. Multiplying two matrices has certain rules, though. Since the product of matrices is given by multiplying elements of each row of the first matrix with the elements of each column of the second matrix, it becomes mandatory to have a number of columns from the first matrix equal to the number of rows from the second matrix.

Start Your Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

What is MMULT Function in Excel?

In Excel, we have a function called “MMUL”, an array function, which is a part of a variety of formulae under the “Math & Trigonometry” function, which can be found under the Formulas section. MMULT can be used to have a product of two matrix arrays within Excel in which, number of rows from the first matrix equals to the number of columns from the second matrix.

Syntax:

Below is the syntax for the MMULT function in Excel.

MMULT excel 1-1

Arguments:

  • array1 – Is a required argument for the function that specifies the first matrix array which you want to multiply.
  • array2 – Is a required argument for the function that specifies the second matrix array which you want to multiply.

A comma separates both these arguments in the MMULT function. It means, after you entered the first array in the formula, you should mention comma (“,”) before you add the second array argument.

As it has already been mentioned at the start, MMULT is an array function. Thus, while executing it, you need to press Ctrl + Shift + Enter button simultaneously instead of directly press the Enter key through your keyboard.

Examples of MMULT in Excel

Let’s have hands-on experience with some examples.

You can download this MMULT Excel Template here – MMULT Excel Template

Example #1 – Using MMULT to Multiply Two Matrices

Suppose we have two matrices with two rows, three columns, and three rows two columns respectively, as shown below.

MMULT excel 1-2

After we go for a product of these two matrices, they at most can produce two rows and two columns (this is because we have two rows in First Matrix and two columns in Second Matrix). Hence, our resultant matrix will be a 2X2 matrix. We will store the same under cells varying from A6:B8 as shown below:

MMULT excel 1-3

Step 1: Select all the cells (A7:B8) from Resultant Matrix to apply the formula at once.

Selecting cells

Step 2: Inside the active cell (cell A7), start initiating the formula for matrix multiplication. Use =MMULT( in the cell to initiate the formula.

MMULT in excel 1-4

Step 3: Use First Matrix cells, i.e. from A2 to C3, as a first array argument under the formula for Matrix Multiplication. Give comma (“,”) after the first array is set in the formula.

MMULT in excel 1-5

Step 4: Use Second Matrix cells, i.e. from E2 to F4, as a second array argument under the formula for Matrix Multiplication. Close the parentheses to complete this formula.

MMULT in excel 1-6

Step 5: The formula is now complete. But don’t press the Enter button directly. Remember, the MMULT function is an array function. Instead of pressing Enter, use Ctrl + Shift + Enter to get the output of this formula.

MMULT in excel 1-7

You’ll get the output of multiplication/product of two matrices as shown below across cells A7:B8:

Resultant-Matrix

Notice the curly open and close braces under which the formula for MMULT is wrapped. These braces are indicators that the formula we have entered is an array formula or is applied on arrays.

How does the formula work? Let’s see below:

The matrix multiplication is like each element of every row from the first matrix gets multiplied by each element of every column from another matrix. Then, we will sum all the element-wise values to get a single value. The first row for First Matrix is 2, 6, 3, and the first column of the Second Matrix has values 2, 7, 4. Going with element-wise multiplication, we will get –

(2*2) = 4, (6*7) = 42 and (3*4) = 12 as multiplication results. Now, we will add these three values together to get the first element of the Resultant Matrix.

4 + 42 + 12 = 58.

Thus, the first element of the Resultant Matrix will be 58.

Example #2 – Using MMULT to Multiply Two Matrices

Suppose we have two matrices as shown below with three rows and three columns:

Multiply Two Matrix 2-1

We will use the MMULT to have the product of these two matrices and get a new matrix out of it called as Resultant Matrix, which can be stored in A7:C9.

Multiply Two Matrix 2-2

Since we have three rows in the First Column and the same number of columns in the Second Matrix, the Resultant Matrix will be a matrix with three rows and three columns.

Step 1: Select all cells across A7:C9 under Resultant Matrix and initiate a formula for MMULT in cell A7.

Resultant Matrix 2-2

Step 2: Use First Matrix as a first argument under MMULT function, which is spread across A2:C4. Use a comma to separate the first argument from the second.

Resultant Matrix 2-3

Step 3: Use the Second Matrix as a second array argument under the MMULT function, which is spread across E2:G4. Complete the formula by adding a parenthesis that closes the formula.

Resultant Matrix 2-4

Step 4: Now, press Ctrl + Shift + Enter to get the output of this array formula instead of the press Enter key. You’ll get an output as shown below:

Resultant Matrix 2-5

This is how we can use the MMULT function to get the matrix multiplication for two matrix arrays. Let’s wrap the things up with some points to be remembered:

Things to Remember

  • Since the MMULT function returns an array value, it must be entered as an array formula. For this to happen, you must use Ctrl + Shift + Enter button instead of entering the button at the time you execute the MMULT formula.
  • You will get a #VALUE! error if the number of rows from the First Matrix and the column from the Second Matrix does not match each other. Also, if any of the cells are empty or have text values stored in it for any matrix, we will get the same error.
  • We may get the #N/A error if we have selected the cells within the Resulting Matrix that is not a part of it.

Recommended Articles

This is a guide to MMULT in Excel. Here we discuss How to use MMULT in Excel along with practical examples and a downloadable excel template. You can also go through our other suggested articles –

  1. Excel Match Multiple Criteria
  2. Matrix in Excel
  3. Inverse Matrix in Excel
  4. Excel Correlation Matrix
Popular Course in this category
All in One Excel VBA Bundle (120+ Courses)
  120+ Online Courses |  500+ Hours |  Verifiable Certificates |  Lifetime Access
4.9
Price

View Course

Related Courses

Excel Advanced Training (16 Courses, 23+ Projects)4.9
Excel for HR Training (8 Courses, 10+ Projects)4.8
Primary Sidebar
Footer
About Us
  • Blog
  • Who is EDUCBA?
  • Sign Up
  • Live Classes
  • Corporate Training
  • Certificate from Top Institutions
  • Contact Us
  • Verifiable Certificate
  • Reviews
  • Terms and Conditions
  • Privacy Policy
  •  
Apps
  • iPhone & iPad
  • Android
Resources
  • Free Courses
  • Excel Charts
  • Excel Tips
  • All Tutorials
Certification Courses
  • All Courses
  • Excel VBA Course - All in One Bundle
  • VBA Course
  • Excel Data Analysis Course
  • Excel for Marketing Course
  • Excel for Finance Course
  • Excel for HR Training

ISO 10004:2018 & ISO 9001:2015 Certified

© 2023 - EDUCBA. ALL RIGHTS RESERVED. THE CERTIFICATION NAMES ARE THE TRADEMARKS OF THEIR RESPECTIVE OWNERS.

EDUCBA
Free Excel Course

Excel functions, formula, charts, formatting creating excel dashboard & others

By continuing above step, you agree to our Terms of Use and Privacy Policy.
*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you

Let’s Get Started

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

*Please provide your correct email id. Login details for this Free course will be emailed to you
EDUCBA

Download MMULT Excel Template

EDUCBA Login

Forgot Password?

By signing up, you agree to our Terms of Use and Privacy Policy.

EDUCBA

Download MMULT Excel Template

EDUCBA

डाउनलोड MMULT Excel Template

This website or its third-party tools use cookies, which are necessary to its functioning and required to achieve the purposes illustrated in the cookie policy. By closing this banner, scrolling this page, clicking a link or continuing to browse otherwise, you agree to our Privacy Policy

Loading . . .
Quiz
Question:

Answer:

Quiz Result
Total QuestionsCorrect AnswersWrong AnswersPercentage

Explore 1000+ varieties of Mock tests View more