# Determinant of a matrix with coefficients in ℤ/pℤ: Det

### 5.35.5 Determinant of a matrix with coefficients in ℤ/pℤ: Det

In Xcas mode, Det is simply the inert form of det; namely, it gives the determinant of a matrix without evaluating it. (See section Section 5.47.4.) In Maple mode, the Det command can additionally be used in conjunction with mod to find the determinant of a matrix whose elements are in ℤ/pℤ.

- (In Maple mode.)
  Det takes one argument:
  A, a matrix with elements in ℤ/pℤ.
- Det(A) returns the determinant of A.

#### Example.

Input (in Xcas mode):

Det([[1,2,9] mod 13,[3,10,0] mod 13,[3,11,1] mod 13])

Output:

det

⎛
⎜
⎜
⎜
⎜
⎜
⎝

⎡
⎢
⎢
⎢
⎢
⎢
⎣

1%13

2%13

⎛ ⎝ | −4 | ⎞ ⎠ | %13

3%13

⎛ ⎝ | −3 | ⎞ ⎠ | %13

0%13

3%13

⎛ ⎝ | −2 | ⎞ ⎠ | %13

1%13

⎤
⎥
⎥
⎥
⎥
⎥
⎦

⎞
⎟
⎟
⎟
⎟
⎟
⎠

To find the value of the determinant, you can enter:
Input:

eval(ans())

Output:

5%13

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

Det([[1,2,9],[3,10,0],[3,11,1]]) mod 13

Output:

5