Determinant of a matrix in ℤ/pℤ: det

### 5.34.15 Determinant of a matrix in ℤ/pℤ: det

The det command can find the determinant of a matrix with elements in ℤ/pℤ. (See also Section 5.47.4.)

- det takes one argument:
  A, a matrix with elements in ℤ/pℤ.
- det(A) returns the determinant of A.
  Computations are done in ℤ/pℤ by Gaussian reduction.

#### Example

Input:

det([[1,2,9]%13,[3,10,0]%13,[3,11,1]%13])

or:

det([[1,2,9],[3,10,0],[3,11,1]]%13)

Output:

5%13

5%13

Hence, in ℤ/13ℤ, the determinant of M=[[1,2,9],[3,10,0],[3,11,1]] is 5%13 (in ℤ, det(M)=31).