The MDETERM function in Google Sheets is a powerful tool designed for users dealing with linear algebra and matrix computations. It calculates the determinant of a specified square matrix, which is a fundamental concept in various mathematical applications such as solving linear equations and analyzing matrix properties.
Syntax
MDETERM(matrix)
- matrix - A range of cells or an array representing a square matrix.
Example #1
=MDETERM(A1:B2)
This function calculates the determinant of a 2×2 matrix defined in the cells A1 to B2. For instance, if A1=3, A2=2, B1=1, and B2=4, the result would be (34) – (21) = 10.
Example #2
=MDETERM(A1:C3)
This function determines the determinant of a 3×3 matrix located in the range A1 to C3. Supposing the values are set as A1=1, A2=0, A3=2, B1=3, B2=4, B3=5, C1=6, C2=7, C3=8, the outcome would be calculated as 1(48 – 57) – 0 + 2(37 – 46) = -6.
Example #3
=MDETERM(E1:E1)
This example attempts to compute the determinant of a 1×1 matrix in the cell E1. If E1 holds the value 5, the result is straightforwardly 5. However, if E1 is empty or contains a non-numeric entry, it will yield an error.
Error handling
- VALUE! – Indicates that the input isn’t a square matrix. Ensure the specified range has the same number of rows and columns.
- REF! – Occurs if the specified range doesn’t exist or is out of bounds. Double-check the cell references used in the function.
- NUM! – It can appear if the matrix is singular (i.e., the determinant is zero). This doesn’t prevent calculation but indicates specific properties about the matrix.