Search This Blog

pCloud Crypto

The MMULT formula with example in Excel

The MMULT function in Excel is used to perform matrix multiplication. It returns the matrix product of two arrays. The number of columns in the first array must be equal to the number of rows in the second array, and the resulting array will have the same number of rows as the first array and the same number of columns as the second array.

Syntax

MMULT(array1, array2)
  • array1: The first array or range to multiply.
  • array2: The second array or range to multiply.

Example

Suppose you have two matrices and you want to multiply them using the MMULT function.

Data

Matrix 1 (A1):

AB
112
234

Matrix 2 (D1):

DE
156
278

You want to calculate the matrix product of these two matrices.

Steps

  1. Enter the first matrix in cells A1

    and the second matrix in cells D1
    .

  2. Select the range where you want to display the result, which will be a 2x2 matrix. Select cells F1

    .

  3. Enter the MMULT formula:

    =MMULT(A1:B2, D1:E2)
  4. Press Ctrl+Shift+Enter to enter the formula as an array formula. Excel will automatically enclose the formula in curly braces {}.

Explanation of the Formula

  • A1:B2 is the first matrix (2 rows by 2 columns).
  • D1:E2 is the second matrix (2 rows by 2 columns).

Calculation

Matrix multiplication is performed as follows:

[1234]×[5678]=[(15+27)(16+28)(35+47)(36+48)]=[19224350]\begin{bmatrix} 1 & 2 \\ 3 & 4 \end{bmatrix} \times \begin{bmatrix} 5 & 6 \\ 7 & 8 \end{bmatrix} = \begin{bmatrix} (1*5 + 2*7) & (1*6 + 2*8) \\ (3*5 + 4*7) & (3*6 + 4*8) \end{bmatrix} = \begin{bmatrix} 19 & 22 \\ 43 & 50 \end{bmatrix}

Result

FG
11922
24350

The resulting matrix (F1) is:

19 22 43 50

By using the MMULT function, you can easily perform matrix multiplication in Excel, which is particularly useful for various mathematical and engineering applications.

No comments:

Post a Comment

pCloud Lifetime

Popular Posts