DET INDEX

DET _ _ _ _ _ _ _ _ _ _ _ _ operator

The det operator returns the determinant of its (square matrix) argument.

syntax:

det(<expression>) or det <expression>

<expression> must evaluate to a square matrix.

examples:



matrix m,n; 


m := mat((a,b),(c,d)); 

  M(1,1) := A
  M(1,2) := B
  M(2,1) := C
  M(2,2) := D
                                 


det m; 

  A*D - B*C 


n := mat((1,2),(1,2)); 

  N(1,1) := 1
  N(1,2) := 2
  N(2,1) := 1
  N(2,2) := 2
                                 



det(n); 

  0 



det(5); 

  5

Given a numerical argument, det returns the number. Howev er, given a variable name that has not been declared of type matrix, or a non-square matrix, det returns an error message.