I am working with finite fields in Python. I have a matrix containing polynomials, each polynomial is represented as an integer. For example, the polynomial x^3 + x + 1
is represented as 11, because:
x^3 + x + 1 ==> (1,0,1,1) ==> (8,0,2,1) ==> 8 + 0 + 2 + 1 ==> 11
Given a matrix, for example:
6, 2, 1
7, 0, 4
1, 7, 3
How can I compute the inverse of a matrix in Python ? I have already implemented the following functions (for polynomials, not matrices of polynomials): add()
, sub()
, mul()
, div()
, inv()