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?