What is the MDETERM function?
=MDETERM(array)MDETERM returns the determinant of a square matrix. For a 2×2 matrix {a,b;c,d}, it is a×d−b×c.
If the determinant is 0, the matrix has no inverse (MINVERSE returns #NUM!). A2:C4 is matrix 1, E2:G4 is matrix 2, and the result fills from column I. Drag a range to change the matrix size.
The main use of MDETERM is to check that a system of equations has exactly one solution before solving it. A determinant of 0 means one equation is a multiple or combination of the others, so there is no solution or there are infinitely many. For a 2×2 matrix, the absolute value of the determinant is also the area of the parallelogram formed by its two columns.
Arguments
- array
- A range of numbers with as many rows as columns.
MDETERM examples
Example 1. 2×2
=MDETERM(A2:B3)1×4−2×3 = -2.
Example 2. 3×3
=MDETERM(A2:C4)The determinant of a 3×3 matrix.
Example 3. 2×2 determinants
=MDETERM(A2:B3)Calculated as a×d − b×c.
Matrix Calculation Result {1,2;3,4} 1×4 − 2×3 -2 {2,0;0,3} 2×3 − 0×0 6 {1,2;2,4} 1×4 − 2×2 0 (no inverse) Example 4. A 3×3 example
=MDETERM({1,2,1;3,4,-1;0,2,0})8. It is not 0, so MINVERSE can find the inverse.
Common mistakes
Not square
It returns #VALUE!.
Blank cells
A blank or text cell returns #VALUE!.
Tiny values instead of 0
Rounding error can turn a determinant that should be 0 into something like 1E-16. Test with =ROUND(MDETERM(A2:C4), 10)=0.
FAQ
- What is it used for?
- To check whether a system of equations has a single solution (determinant ≠ 0).
- Inverse?
- Use MINVERSE.
- How do I solve the equations?
- =MMULT(MINVERSE(coefficients), constants).