MDETERM Function (Gnumeric)
Calculate determinants in Gnumeric with MDETERM. Reproduce square-matrix examples, check row swaps and understand text, Boolean and empty-cell conversion.
Verification status: 16 reference, boundary and advanced-check formulas were recalculated with Gnumeric 1.12.57 ssconvert. Retained native records and independent calculations were checked. Version 1.12.62 was source-checked only. One single-cell range was normalized to the equivalent cell reference. How formula examples are checked
Quick answer: =MDETERM(M2:N3) gives 1 in the tested Gnumeric 1.12.57 build.
Availability and version history
- Introduced: Gnumeric 0.32 release notes explicitly record this function being added.
- Supported in: Gnumeric 1.12.62; no retirement is established.
- Scope: Desktop Gnumeric with the Mathematics plugin. English comma-separated formulas are shown.
- Checked: October 14, 2026. Tables and the named advanced check were recalculated through 1.12.57 ssconvert. Current 1.12.62 source was inspected; the later release was not executed.
What MDETERM returns
MDETERM returns a single determinant from a square matrix. For a 2×2 matrix [[a,b],[c,d]], the determinant is ad − bc. A zero determinant identifies an exactly singular matrix mathematically; a floating-point result close to zero needs interpretation at the scale and conditioning of the data. Versioned function help.
Syntax and arguments
=MDETERM(matrix)
| Argument | Meaning |
|---|---|
matrix |
One square cell range, array or scalar value. A scalar is treated as a 1×1 matrix. Nonsquare ranges fail. |
Reproducible examples
Enter these matrices by rows at the named ranges:
| Range | Rows |
|---|---|
| J2:K3 | (1, 2); (3, 4) |
| M2:N3 | (1, 0); (0, 1) |
| P2:Q3 | (1, 2); (2, 4) |
| T2:V4 | (1, 2, 3); (0, 1, 4); (5, 6, 0) |
| J6:K7 | (3, 4); (1, 2) |
| M6:N7 | (2, 0); (0, 3) |
| P6:Q7 | (2, 3); (0, 5) |
| T6:U7 | (0.5, 0); (0, 0.25) |
For diagnostics, F2:F4 is 1, 2, 3; F5 is empty; G2:H3 has rows (1, TRUE) and (text abc, 2).
Ordinary results are rounded to twelve decimal places; tiny values use scientific notation. The eight reference rows were independently checked.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=MDETERM(J2:K3) |
-2 |
=MDETERM(M2:N3) |
1 |
=MDETERM(P2:Q3) |
0 |
=MDETERM(T2:V4) |
1 |
=MDETERM(J6:K7) |
2 |
=MDETERM(M6:N7) |
6 |
=MDETERM(P6:Q7) |
10 |
=MDETERM(T6:U7) |
0.125 |
Practical worksheet
For J2:K3 the determinant is 1×4 − 2×3 = −2. The executed check =MDETERM(J2:K3)-(J2*K3-K2*J3) returned zero. Swapping its two rows in J6:K7 changes the determinant to +2.
The singular P2:Q3 matrix has a second row twice its first and returns zero. The identity matrix returns one. For the triangular P6:Q7 matrix, the determinant is the diagonal product 2×5 = 10; the upper-right value does not change it.
Advanced interpretation and checks
Expanding the 3×3 T2:V4 matrix along the first row gives 1×(0−24) − 2×(0−20) + 3×(0−5) = 1. This independent integer calculation agrees with the native result.
A determinant is not a reliable standalone measure of numerical conditioning: changing units or multiplying a row rescales it. For a matrix that is nearly singular, do not infer a stable inverse just because the displayed determinant is nonzero. The examples use small, fully specified matrices so their expected values can be checked independently.
Boundaries and troubleshooting
The source converts each matrix element numerically after propagating existing cell errors. In the tested mixed matrix, text abc became zero and TRUE became one, giving determinant 2. An empty scalar reference returned zero. This behavior differs from an assumption that all text or logical entries must be rejected. The saved MDETERM(H2:H2) expression was normalized to MDETERM(H2); its single-cell result is preserved, but literal range syntax did not round-trip.
F5 is an actually empty cell. Listed errors are native error results, not mathematical zeroes.
| Formula | Gnumeric 1.12.57 result |
|---|---|
=MDETERM(F2:F4) |
#VALUE! |
=MDETERM(G2:H3) |
2 |
=MDETERM(H2:H2) |
1 |
=MDETERM(F5) |
0 |
=MDETERM(5) |
5 |
=MDETERM() |
#N/A |
=MDETERM(J2:K3,M2:N3) |
#N/A |
Official evidence and checking scope
The retained workbook contained a deliberately stale SUM cache and an uncached SUM formula, both recalculated correctly. Native evidence covers the listed 1.12.57 cases; worksheet layouts and algebraic interpretations are independently specified explanations. Other locales, direct GUI entry and later-release output were not tested.