# How to find solution to the following matrix

[ a a + 1] [ a^2 a^2 + a]

Following is the code which tries to find solution to the 2X2 matrix A in field GF(2^4,'a'). I am trying to find solution(vector) x such that Ax=O; where O is a zero vector. The rank of A is 1 and still I am getting trivial solution(zero vector). How to find non-trivial solution of the above matrix

sage: F.<a>=GF(2^4);
sage: A=Matrix(GF(2^4,'a'),[[a,a^4],[a^2,a^5]]);
sage: b=vector(GF(2^4,'a'),2)
sage: A.rank()
sage: A.solve_right(b)
(0, 0)

edit retag close merge delete

Sort by » oldest newest most voted

The solve_right method only gives you one solution (and is mainly used for affine equations, where b is nonzero). The set of solutions is the (right) kernel of your matrix:

sage: A.right_kernel()
Vector space of degree 2 and dimension 1 over Finite Field in a of size 2^4
Basis matrix:
[                1 a^3 + a^2 + a + 1]
sage: A.right_kernel().basis()
(1, a^3 + a^2 + a + 1)
sage: A*A.right_kernel().basis()
(0, 0)

more