mmult
January 10th in Functions by .

MMult Function

The MMULT function in Excel is used for matrix multiplication. It takes as inputs two arrays or matrices and outputs the matrix product of the two

Owner and site operator for Excelbuddy.com

The MMULT function in Excel is used for matrix multiplication.  It takes as inputs two arrays or matrices and outputs the matrix product of the two.

In order to properly use MMULT, it’s important to understand how matrix multiplication works.  You can multiply any two matrices together as long as the number of columns in the first matrix is equal to the number of rows in the second matrix.  The size of the resulting matrix is determined by the input matrices.  If your matrix 1 has A rows and B columns, matrix 2 must have B rows, but could have any number, C, columns.  The resulting matrix would be A rows by C columns.

Assuming you’ve got a handle on matrix multiplication, the format for the MMULT function is:

=MMULT(array1, array2)

The way that you enter the function depends on what your result is going to be.  If your result is going to be a single value (meaning you have a 1xB array to multiply by a Bx1 array), you can simply enter the equation as above in a single cell.  However if your result will have multiple rows and/or columns, you should select the proper number of cells, type the function and then press SHIFT, CTRL, and ENTER together.  See below for some examples of using the MMULT function.

In cell B6: =MMULT(A1:B1,D1:D2) = 6

In cell B8: =MMULT(A3:B3,E1:E2) = 21

In cells D5:E6: =MMULT(A1:B2,D1:E2) then press SHIFT, CTRL, and ENTER

In cells G5:H7: =MMULT(A1:B3,D1:E2) then press SHIFT, CTRL, and ENTER

Leave a Reply

Excelbuddy.com Get your excel questions answered in our forum!