Contact

MDETERM in Google Sheets: Calculate and Check Matrix Determinants

Array Intermediate Google Sheets

Find Sheets matrix determinants with two-by-two and triangular controls, row operations and a carefully bounded singularity check.

Verification status: See the evidence and test scope described in this guide. How formula examples are checked

Quick answer: MDETERM returns one determinant for a square matrix. For rows 3,1 and 2,1, =MDETERM(A2:B3) has independently expected result 1, calculated as 3×1−1×2.

Availability and version history

  • Introduced: first service launch date is not established by the official history reviewed; no numbered desktop introduction is assigned.
  • Availability: documented in the rolling Google Sheets service. Examples target ordinary web-spreadsheet cells; mobile clients and imported file modes are not separately certified.
  • Checked: October 14, 2026; official MDETERM reference. Documentation and independently calculated examples, without native Sheets execution.

Syntax and matrix shape

=MDETERM(square_matrix)

The required argument is an array or range with equal row and column counts. Google explicitly defines that square-matrix shape. The output is a scalar, even though the input occupies several cells.

Use numeric cells for these controls. The short help does not certify an exact error code for every nonsquare, blank, text or malformed matrix. It also does not establish an application-wide maximum matrix size or numerical accuracy guarantee.

Example 1: enter a complete two-by-two matrix

Place the following numeric values in A2:B3, with no headers inside the range:

A B
3 1
2 1
=MDETERM(A2:B3)

Expected result: 1. Multiplying the main diagonal gives 3; multiplying the other diagonal gives 2; subtracting gives 1. This shortcut is for a two-by-two determinant, not a general rule for larger matrices.

The English-locale array-literal version is =MDETERM({3,1;2,1}). Commas separate columns and the semicolon separates rows inside this literal. Those separators are distinct from function arguments and may differ with spreadsheet locale.

Example 2: use a triangular three-by-three matrix

Enter D2:F4 with rows 2,−1,4, 0,3,2, and 0,0,5:

=MDETERM(D2:F4)

Expected result: 30. A triangular matrix’s determinant is the product of its diagonal entries: 2×3×5. The zeros below the diagonal are explicit numeric entries, not empty cells.

This provides an independent larger control without manually expanding every cofactor. It does not imply that multiplying the diagonal works when the lower-left entries are arbitrary nonzero values.

Advanced check: swap two rows

Create H2:I3 with rows 2,1 and 3,1, exchanging the original rows:

=MDETERM(H2:I3)

Expected result: −1. Swapping two rows reverses the determinant’s sign. A determinant is not always positive and should not be interpreted as an unsigned count.

Keeping the sign can matter when a matrix represents an oriented transformation. Taking ABS deliberately discards that information; it should be a separate choice rather than an automatic cleanup.

Advanced example: distinguish one-row scaling from whole-matrix scaling

For rows 6,2 and 2,1, only the original first row has been doubled. Its expected determinant is 2.

For rows 6,2 and 4,2, every entry of the original matrix has been doubled. Its expected determinant is 4, because both rows contribute a factor of two. For an n-by-n matrix, scaling every entry by a factor scales the determinant by that factor raised to n.

These controls help catch a common mistake: assuming a determinant always scales in the same way as one matrix entry. Inspect the matrix dimension and which rows were changed.

Advanced example: distinguish a singular matrix from a near-singular one

Rows 3,1 and 6,2 are dependent: the second row is twice the first. Their exact determinant is 0, so no ordinary multiplicative inverse exists.

For the separate rows 1,1 and 1,1.00000001, the exact decimal determinant is 0.00000001. The matrix is mathematically nonsingular but close to a dependent case.

That exact decimal value is an independent mathematical target, not a captured native floating-point result. An exact comparison with zero is not a universal numerical conditioning test. A practical tolerance depends on scale and the task; this guide does not prescribe one threshold for every matrix.

Advanced check: connect the determinant to an inverse

The original matrix has inverse rows 1,−1 and −2,3. That inverse’s determinant is also 1, the reciprocal of the original determinant 1.

For the doubled whole matrix, determinant 4 corresponds to inverse determinant 0.25. MINVERSE computes a matrix inverse, while MDETERM returns one scalar. Neither should be replaced by elementwise reciprocals.

Use MMULT to inspect an inverse-product identity if the inverse is used in later calculations. A plausible determinant alone does not certify all entries of a derived inverse.

Troubleshooting and scope

Check the exact square range and keep descriptive headers outside it. An extra header row changes the shape and the data type. A blank cell is not certified here as interchangeable with an explicit zero.

The cited Google page documents the operation and shape but not a complete numerical/error matrix. Singular inverse errors, extreme precision, nonnumeric conversion and maximum dimensions remain unverified native cases. The worked finite matrices are independently checked mathematical expectations.

References and verification

Inputs are fictional. Approximate answers are independent mathematical expectations rounded to nine places, not captured native results. Complete type/error matrices, extreme-magnitude accuracy and cross-client behavior remain untested.