MINVERSE in Calligra Sheets: Invert a Square Matrix
Calculate a matrix inverse, inspect each element and verify the result with a matrix product.
Verification status: Consult the documentation, examples and any stated test scope below. How formula examples are checked
Quick answer: MINVERSE(matrix) calculates a square matrix inverse. For rows [2, 1] and [1, 1], the independently expected inverse has rows [1, −1] and [−1, 2]. Multiplying the original matrix by that inverse gives the identity matrix.
An inverse is not the element-by-element reciprocal: replacing each coefficient with 1/coefficient generally gives the wrong operation. For substantial numerical problems, a dedicated linear-system solver is usually preferable to explicitly calculating an inverse; this guide uses a small transparent example.
Syntax, dimensions and result
=MINVERSE(matrix)
There is exactly one required argument, a square matrix or numeric range. No default or optional tolerance is exposed. The result is an array with the same number of rows and columns as the input. The source rejects a nonsquare or empty matrix with an internal value error, and uses Eigen’s full-pivot LU invertibility test before returning an inverse.
A matrix can fail that numerical invertibility test because it is singular or numerically rank-deficient. Do not promise that only an exactly zero symbolic determinant can trigger the division-by-zero error path.
Worked worksheet: solve a small coefficient system
The equations are 2x + y = 7 and x + y = 4. Put the coefficient rows [2, 1] and [1, 1] in A2:B3 and the right-hand values 7 and 4 in D2:D3.
- Reserve a clear 2×2 output area, F2:G3.
- Enter four ordinary scalar formulas: F2
=INDEX(MINVERSE(A2:B3);1;1), G2=INDEX(MINVERSE(A2:B3);1;2), F3=INDEX(MINVERSE(A2:B3);2;1)and G3=INDEX(MINVERSE(A2:B3);2;2). This uses the same element-access method verified natively below; the illustrative cell layout is different. - The expected inverse is:
| Output row | F | G |
|---|---|---|
| 2 | 1 | -1 |
| 3 | -1 | 2 |
- Independently inspect each element with
=INDEX(MINVERSE(A2:B3);1;1)and the other row/column pairs (1;2), (2;1), (2;2). Their expected values are 1, −1, −1 and 2. These scalar formulas are also useful for diagnosing whether only the first array element is visible. - The solution follows from inverse × right-hand vector: x = 1×7 − 1×4 = 3 and y = −1×7 + 2×4 = 1.
- Substitute back: 2×3 + 1 = 7 and 3 + 1 = 4. A returned inverse should be checked against the original task, not accepted solely because it contains plausible numbers.
Optional documented array entry in Calligra
KDE’s function description specifies Ctrl+Alt+Enter, rather than plain Enter, to display array elements in separate cells. This is different from assuming Excel-style automatic dynamic spilling. The target range must have the intended dimensions and be clear of other work. The native tests here verified all four elements through scalar INDEX formulas. Direct multi-cell array entry and the keyboard shortcut were not verified, so the shortcut remains a documentation-based option.
Do not manually type braces around the formula or fill the inverse formula down as if each output were an unrelated scalar. If only 1 appears from this example, that may be the upper-left element rather than the complete inverse.
Advanced check: multiply back to the identity
For the coefficient matrix A, MMULT(A;MINVERSE(A)) should approximate the 2×2 identity: rows [1, 0] and [0, 1]. Check all four elements, including the off-diagonal zeros. A determinant-only check can miss a matrix whose entries are wrong but determinant happens to match.
For this exact small integer example, =MDETERM(MINVERSE(A2:B3)) has expected value 1. More generally the inverse determinant is the reciprocal of the original determinant when an inverse exists, but roundoff can affect numerical comparisons. Choose a tolerance justified by scale and conditioning; do not demand exact binary zero for every floating-point residual.
Errors and limits
- Rows [1, 2] and [2, 4] are dependent. The source’s numerical invertibility check fails and returns an internal division-by-zero error.
- A 3×2 range is not square and returns an internal value error.
- Text, blanks and Booleans are converted through the engine’s numeric converter. This review does not treat that as reliable validation; use a complete numeric coefficient matrix.
- A large coefficient scale or nearly dependent rows may make a computed inverse unreliable even where numbers are returned. Scaling, condition assessment and residual checks matter.
- No hard maximum matrix dimension was established from this code path. Do not interpret that as unlimited safe memory or runtime.
Related functions and compatibility
See KDE MDETERM, KDE MMULT and KDE MUNIT. Function names alone do not prove that matrix-entry keystrokes, error labels or near-singular thresholds match another spreadsheet.
Availability, sources and test scope
Checked October 18, 2026. Original introduction date is unknown. The function is registered in Calligra 26.08.2 source; the relevant mathematics, statistical and information-function source plus numeric engine/converter files are byte-identical in the separately retrieved 25.04.2 source. This establishes source availability in both releases, not an introduction date. Native tests used Calligra Sheets 25.04.2 on Linux, October 18, 2026. The tables below record formulas recalculated in that application and read from its completed saved ODS workbook. Source inspection of 26.08.2 is separate; no native 26.08.2 run is claimed.
Primary references: KDE MINVERSE handbook, 26.08.2 function implementation, numeric calculation engine and numeric converter. The handbook is an unversioned living page; the source links identify the inspected release. The native table identifies the exact cases with confirmed application error labels; other source-derived cases are not claimed as runtime tests.
Array-entry instruction source: KDE matrix function description. This documentation is not itself proof of a successful multi-cell entry in a running application.
Native verification in Calligra Sheets 25.04.2
The following formulas were recalculated in the actual Linux application on October 18, 2026. Results were checked in the completed native-saved workbook. The screenshot is an unmodified application capture; it is not a simulated worksheet. The model examples above are independent mathematical explanations, and only the formulas below are claimed as executed tests.
Array-test boundary: all four 2×2 elements were verified through separate INDEX formulas. Successful direct array entry, automatic spill and the Ctrl+Alt+Enter workflow were not established. The screenshot therefore demonstrates scalar element readbacks, not a multi-cell array output.
Test inputs: H2:I3 contains rows [2, 1] and [1, 1]; H6:I7 contains [1, 2] and [3, 4]; H10:I11 contains the singular rows [1, 2] and [2, 4]; H14:I16 contains [1, 2], [3, 4], [5, 6]. These are the native test coordinates, separate from the illustrative worksheet above.

| Formula executed | Native result |
|---|---|
=INDEX(MINVERSE(H2:I3);1;1) |
1 |
=INDEX(MINVERSE(H2:I3);1;2) |
-1 |
=INDEX(MINVERSE(H2:I3);2;1) |
-1 |
=INDEX(MINVERSE(H2:I3);2;2) |
2 |
=MINVERSE(H10:I11) |
#DIV/0! |
=MINVERSE(H14:I16) |
#VALUE! |
=MDETERM(MINVERSE(H2:I3)) |
1 |
These observations are specific to the tested release, settings and inputs. They do not establish all coercions, precision limits or cross-application import behavior.