Previous Up Next

11.8.16  Inverse of a matrix with coefficients in ℤ/pℤ

The inv or inverse command finds the inverse of a matrix with elements in ℤ/pℤ. (See also Section 15.1.2.)

Example

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

or:

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

or:

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

or:

inverse([[1,2,9],[3,10,0],[3,11,1]]%13)
     
⎡
⎢
⎢
⎢
⎢
⎢
⎣
    2%13
⎛
⎝
−4⎞
⎠
%13
⎛
⎝
−5⎞
⎠
%13
    2%130%13
⎛
⎝
−5⎞
⎠
%13
    ⎛
⎝
−2⎞
⎠
%13
⎛
⎝
−1⎞
⎠
%13
6%13
⎤
⎥
⎥
⎥
⎥
⎥
⎦
          

Previous Up Next