Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sage is not returning all solutions to equations modulo n

I am trying to find all 2x2 matrices S over Z/9Z such that S^3=I, where I is the identity matrix. I am currently using the following procedure: S = matrix(SR, 2, [[a,b],[c,d]]);S3=S^3 l=solve_mod([S3[0,0]==1,S3[0,1]==0,S3[1,0]==0,S3[1,1]==1], 9);l

The list of solutions (there are 207) I receive does not include S=[[1,3],[3,1]], for example, which does in fact satisfy S^3=I. I am new to Sage, is there something I am missing? How can I get a complete list of solutions?

click to hide/show revision 2
No.2 Revision

Sage is not returning all solutions to equations modulo n

I am trying to find all 2x2 matrices S over Z/9Z $Z/9Z$ such that S^3=I, $S^3=I$, where I is the identity matrix. I am currently using the following procedure: procedure:

S = matrix(SR, 2, [[a,b],[c,d]]);S3=S^3
l=solve_mod([S3[0,0]==1,S3[0,1]==0,S3[1,0]==0,S3[1,1]==1], 9);l

9);l

The list of solutions (there are 207) I receive does not include S=[[1,3],[3,1]], S=[[1,3],[3,1]], for example, which does in fact satisfy S^3=I. $S^3=I$. I am new to Sage, is there something I am missing? How can I get a complete list of solutions?

click to hide/show revision 3
No.3 Revision

Sage is not returning all solutions to equations modulo n

I am trying to find all 2x2 matrices S $S$ over $Z/9Z$ such that $S^3=I$, where I is the identity matrix. I am currently using the following procedure:

S = matrix(SR, 2, [[a,b],[c,d]]);S3=S^3
[[a,b],[c,d]]);
S3=S^3
l=solve_mod([S3[0,0]==1,S3[0,1]==0,S3[1,0]==0,S3[1,1]==1], 9);l
9);
l

The list of solutions (there are 207) I receive does not include S=[[1,3],[3,1]], for example, which does in fact satisfy $S^3=I$. I am new to Sage, is there something I am missing? How can I get a complete list of solutions?