The MDETERM function calculates the matrix determinant of an array. Array must be numeric, have an equal number of rows and columns, and not contain any empty cells. If these conditions are not met MDETERM will return a #VALUE error message. Array can be given as numeric constants, for example
MDETERM({3,7,9; 1,7,2; 4,3,2})
or call upon a range of cells containing numeric values:
MDETERM(A1..C3)
MDETERM can be used to solve systems of linear equations. For example, the system of linear equations
2x -y + 2z = 2
x + 10y - 3z = 5
-x + y + z = -3
can be arranged so that the coefficients appear in the cell range A1..D3 as follows:
row/col |
A |
B |
C |
D |
1 |
2 |
-1 |
2 |
2 |
2 |
1 |
10 |
-3 |
5 |
3 |
-1 |
-1 |
1 |
-3 |
The system of equations can then be solved using the following formulas:
x is given by =MDETERM({2, 5, -3; -1, 10, 1; 2, -3, 1}) / MDETERM(A1..C3) = 2
y is given by =MDETERM({2, 1, -1; 2, 5, -3; 2, -3, 1}) / MDETERM(A1..C3) = 0
z is given by =MDETERM({2, 1, -1; -1, 10, 1; 2, 5, -3}) / MDETERM(A1..C3) = -1
See also: