Contact

MMULT Function (LibreOffice Calc)

Array Intermediate LibreOffice Calc

Learn the MMULT function in LibreOffice Calc: Array multiplication. Returns the product of two arrays.

Verification status: Selected examples were executed in LibreOffice Calc 25.2.3.2. This does not establish that every formula and edge case was tested. How formula examples are checked

Quick answer

MMULT performs matrix multiplication. You may multiply a matrix of size m×n by a matrix of size n×p; the result is m×p. The shared inner dimension (n) must agree. Multiply each row of the first matrix by each column of the second matrix and sum the products.

Precise syntax and arguments

=MMULT(Array1; Array2)

Array1 — Required. The first numeric matrix; its columns must match the second matrix’s rows.

Array2 — Required. The second numeric matrix. Matrix multiplication is generally not commutative; order matters.

LibreOffice 26.8 Help lists both required arrays and describes array output. In tested Calc 25.2.3.2, the argument separator was semicolon (;), but formula settings and locale can change separators.

Reproducible 2×2 multiplication

Enter the following two matrices in blank areas of the same sheet:

On a narrow screen, scroll this table sideways to see every column.

First matrix A B
Row 3 1 2
Row 4 4 5

On a narrow screen, scroll this table sideways to see every column.

Second matrix D E
Row 3 5 6
Row 4 7 8

Select H14:I15 (2×2 empty cells), enter:

=MMULT(A3:B4;D3:E4)

Confirm as an array formula; in Windows/Linux Calc this normally means Ctrl+Shift+Enter. The expected output is:

On a narrow screen, scroll this table sideways to see every column.

Destination H I
Row 14 19 22
Row 15 55 64

Derivation: top-left 1×5 + 2×7 = 19; top-right 1×6 + 2×8 = 22; bottom-left 4×5 + 5×7 = 55; bottom-right 4×6 + 5×8 = 64. All four cells were natively read back and matched. The exact source data matters: confusing a value of 4 with 3 in the first matrix changes the entire second output row.

Advanced: retrieve one matrix-product element

Without expanding a full output block:

=INDEX(MMULT(A3:B4;D3:E4);2;2)

Expected: 64. The indexed element was native-tested. Another calculation uses Q10=2, R10=1, Q11=1, R11=3 and verifies the top-left entry of the product with its inverse:

=ROUND(INDEX(MMULT(Q10:R11;MINVERSE(Q10:R11));1;1);6)

Expected: 1. This is one element of the identity-matrix cross-check, not a full test of all four positions; the full matrix identity was not separately native-tested in the recorded checks.

Dimension errors, limitations and troubleshooting

If you try MMULT(A3:C4;D3:E4), the first input is 2×3 but the second is 2×2. Calc 25.2.3.2 returned Err:502 when evaluating an indexed result from this incompatible product. Confirm the number of columns in the left matrix matches the number of rows on the right. Check that text headers were not included accidentally and that output range dimensions are correct.

If editing one output cell causes an array-protection warning, select the entire matrix-output range. Check for numeric source data; pasted numbers stored as text are not a valid substitute. Ordinary A3:B4*D3:E4 performs elementwise multiplication under array rules, not matrix multiplication.

Excel and Google Sheets support MMULT but often use automatic array spilling rather than Calc’s manual matrix-output entry. Cross-software rounding and array behavior can differ. Related guides: MINVERSE, MDETERM, TRANSPOSE, INDEX.

Official documentation and native tests

How this guide was checked

Selected example formulas were run in LibreOffice Calc 25.2.3.2 on Linux on October 12, 2026. The official Help may cover a newer version. Tests of selected formulas do not certify every locale, interactive array operation or file round trip. View the example-check record.

Official MMULT reference · Editorial standards