Contact

MMULT Function in ONLYOFFICE Spreadsheet Editor: Multiply Matrices Correctly

Mathematical Advanced ONLYOFFICE Spreadsheet Editor

Reproducible MMULT range multiplication, input/output shapes, array entry, error cases, engineering uses and source comparisons.

Verification status: Official documentation referenced; example outcomes independently reasoned or arithmetically checked where stated. Not executed in ONLYOFFICE Spreadsheet Editor. How formula examples are checked

MMULT multiplies two numeric arrays as matrices. The number of columns of the first matrix must equal the number of rows of the second. A matrix of shape m×n multiplied by n×p produces an m×p output array. This is not elementwise multiplication. See ONLYOFFICE’s MMULT reference.

Exact syntax, argument order and defaults

=MMULT(array1, array2)
Position Argument Type and meaning Default / optional status
1 array1 Required numeric matrix on the left, size m×n No default.
2 array2 Required numeric matrix on the right, size n×p No default.

No argument is optional, and there is no implied default. Source matrix entries should be numeric, including zero where intended; leaving a cell blank is not equivalent to zero in vendor-documented error handling. Preserve the order of arguments when combining matrix functions.

Vendor-confirmed: ONLYOFFICE documents #N/A when an input contains blanks or nonnumeric cells and #VALUE! when the number of columns in array1 differs from the number of rows in array2. The result is an array; selecting a single output cell can leave only the first value visible per the general array help.

Reproducible common matrix dataset

Start with a blank worksheet. Type each entry as a numeric cell (not as quoted text), then place results only in the indicated unused output cells. The sample is deliberately small enough for manual checking.

Range Matrix or vector, row by row Purpose
A2:B3 row 2: 2, 1; row 3: 3, 2 Invertible 2×2 matrix A (determinant 1).
D2:E3 row 2: 1, 4; row 3: 2, 5 Second 2×2 matrix B (determinant −3).
A6:C8 row 6: 1, 2, 3; row 7: 0, 1, 4; row 8: 5, 6, 0 Invertible 3×3 matrix C (determinant 1).
A11:B12 row 11: 1, 2; row 12: 2, 4 Singular 2×2 matrix S (determinant 0).
A14:B15 row 14: 2, 0; row 15: 0, 3 Diagonal 2×2 matrix D (determinant 6).
J2:J3 5 in J2, 8 in J3 Right-hand-side vector b.

Select a blank output area before entering each formula. Never overwrite these input ranges with array-formula results. Use one clean worksheet per guide, or reset your worksheet to this exact baseline before moving between scenarios.

How to enter a matrix result correctly

For multi-cell results, first highlight an appropriately sized blank output rectangle; then enter the formula in the formula bar and use Ctrl+Shift+Enter as explained in the ONLYOFFICE array-formula instructions. The editor adds array braces in the formula bar automatically. If you only press Enter, the vendor’s array guide warns that some functions return the first value rather than filling the requested result range. Always select the exact output shape and compare all cells, not just the upper-left cell. The array guide also says you cannot change only part of an entered array: select the entire array to delete or re-enter it.

Expected results, independently checked (not native execution)

Output placement Formula to enter Expected numerical result Rationale
G2:H3 =MMULT(A2:B3,D2:E3) [[4, 13], [7, 22]] 2×2 by 2×2 matrix product A×B.
G6:H7 =MMULT(D2:E3,A2:B3) [[14, 9], [19, 12]] Reversing operands changes the result (B×A).
G10:H11 =MMULT(A2:B3,A2:B3) [[7, 4], [12, 7]] Matrix square A×A, not elementwise square.
G14:G15 =MMULT(A2:B3,J2:J3) [[18], [31]] 2×2 multiplied by 2×1 vector.
G18:H19 =MMULT(A2:B3,MUNIT(2)) [[2, 1], [3, 2]] Identity operation; array-valued nested MUNIT needs editor testing.
G22:G23 =MMULT(MINVERSE(A2:B3),J2:J3) [[2], [1]] Solves A×x=b mathematically; nested array expression requires editor testing.

Each displayed matrix is written as rows inside [[...],[...]]. For example [[2,-1],[-3,2]] means output row one 2, -1 and output row two -3, 2; it is not a formula literal to paste into the spreadsheet. Fill the indicated output rectangle using the actual formula, not by typing the expected array. These predictions were calculated with exact rational SymPy mathematics and do not represent measurements from ONLYOFFICE.

Shape-error test: =MMULT(J2:J3,A2:B3) attempts 2×1 multiplied by 2×2 and is incompatible because 1 ≠ 2. ONLYOFFICE documents #VALUE! for a shape mismatch. =MMULT(A6:C8,J2:J3) is another 3×3 by 2×1 mismatch. The examples above focus on mathematically valid arrays; error handling is sourced from the vendor’s documented rules.

Advanced application and reasoning

Matrix multiplication is not commutative. Our test shows AB=[[4,13],[7,22]], while BA=[[14,9],[19,12]]. Check individual result cells: for AB upper-left, 2×1+1×2=4; upper-right, 2×4+1×5=13. You can apply MMULT to a column vector (a weighted linear transformation); MMULT(A2:B3,J2:J3) should produce [18,31] as a 2×1 array. An advanced identity check MMULT(A,MUNIT(2))=A depends on nested array support in the actual editor, which is an outstanding native test.

Troubleshooting: symptoms versus documented behaviour

Symptom Likely cause Specific action / evidence boundary
#N/A Blank or nonnumeric cell in either matrix Explicitly documented; enter all source cells as numbers.
#VALUE! Incompatible inner dimensions Explicitly documented; align first array columns with second array rows.
Only first scalar appears Output selected as a single cell Re-enter with correct m×p selection and Ctrl+Shift+Enter.
A×B differs from B×A Operand order changed Matrix multiplication is order-sensitive; preserve argument order.
Display rounds results Number formatting Increase decimal places and compare with independent calculations.

Verification and compatibility

This guide is based on the current, unversioned English ONLYOFFICE help pages on 2026-10-13 (UTC) and independent numerical reasoning. The sample values below are expected values, not results observed in a running ONLYOFFICE Spreadsheet Editor. No screenshot, workbook execution, web edition test, Desktop edition test, or historic version support test was performed. Use the official function catalogue.

Edition and compatibility: ONLYOFFICE’s documentation describes the current Docs Spreadsheet Editor; its Desktop changelog and Docs changelog are distinct records. None of the cited function pages establishes a first-supported Desktop or web version for this function; do not infer universal historical compatibility or claim that an XLSX exported to another spreadsheet program evaluates identically. Where a function returns an array, the current ONLYOFFICE array-entry guide explicitly describes selecting the complete output range, entering the formula and pressing Ctrl+Shift+Enter. Do not manually type the surrounding { }. In some editions, dynamic-array behaviour may differ and must be tested.

Formula language and separators: The examples use English names, A1-style references, a decimal point, and commas between arguments. The official function-entry guide shows these conventions. The Advanced Settings guide documents configurable formula language, region and numeric separators; it does not provide a verified translation or formula argument separator for every locale. Change regional settings as appropriate and verify the resulting formula entry in the target edition rather than blindly substituting commas with semicolons.

Official evidence checked on 2026-10-13 (UTC)

Specific claim ONLYOFFICE official reference Validation status
Purpose, exact function syntax and required arguments MMULT reference Documentation checked; no app run
Input errors, argument shape/domain and array declaration, where given MMULT reference Only vendor-stated cases are called native errors
Select output range and use Ctrl+Shift+Enter for multi-cell array output Inserting array formulas Documentation checked
Enter names, arguments and ranges as spreadsheet formulas Inserting functions Documentation checked
Locale and formula-language settings Advanced settings Documentation checked; exact translations not inferred
Desktop vs Docs/web historical support Desktop changelog and Docs changelog A first-supported release is not established by these checks
All numeric examples Independent exact-rational mathematical calculation Expected, not native ONLYOFFICE output