The MMULT function in Excel performs matrix multiplication on two arrays. It returns the product of two matrices, which are stored in arrays. This function is useful in various fields such as engineering, physics, and economics where matrix calculations are common.
Syntax
Function | Description |
---|---|
MMULT(array1, array2) | Multiplies two arrays and returns the resulting matrix. |
Where array1 and array2 are the two arrays you want to multiply. The number of columns in array1 must be equal to the number of rows in array2 .
Example
Consider the following matrices:
Matrix A | Matrix B | |||
---|---|---|---|---|
1 | 2 | 5 | 6 | |
3 | 4 | 7 | 8 |
To multiply these matrices, you would use the formula =MMULT(A2:B3, D2:E3) in Excel, which would produce the following result:
Resultant Matrix | |
---|---|
19 | 22 |
43 | 50 |
Explanation
Step 1: Understanding Matrix Multiplication
Matrix multiplication involves multiplying each row element of the first matrix (Matrix A) with the corresponding column element of the second matrix (Matrix B) and then summing the products.
Step 2: Calculate Each Element of the Resulting Matrix
(1 * 5) + (2 * 7) = 19 | (1 * 6) + (2 * 8) = 22 |
(3 * 5) + (4 * 7) = 43 | (3 * 6) + (4 * 8) = 50 |
Practice Exercise 1
Task: Multiply the following matrices using the MMULT function.
Practice Exercise 2
Task: Multiply the following matrices using the MMULT function.
Solution for Exercise 1
Given the following matrices:
Matrix C | Matrix D | |||
---|---|---|---|---|
2 | 4 | 1 | 3 | |
1 | 0 | 2 | 5 |
The resultant matrix can be calculated using:
=MMULT(A2:B3, D2:E3)
Resultant Matrix:
Result | |
---|---|
10 | 26 |
1 | 3 |
Solution for Exercise 2
Given the following matrices:
Matrix E | Matrix F | ||||
---|---|---|---|---|---|
1 | 2 | 3 | 2 | 1 | |
4 | 5 | 6 | 0 | 3 | |
7 | 8 | 9 | 1 | 4 |
The resultant matrix can be calculated using:
=MMULT(A2:C4, E2:F4)
Resultant Matrix:
Result | |
---|---|
5 | 19 |
14 | 43 |
23 | 67 |
Conclusion
The MMULT function in Excel is a powerful tool for matrix multiplication. By understanding its syntax and how to apply it through various examples and exercises, users can confidently carry out complex matrix calculations in their spreadsheets.