R = ZZ/11[x,y,z] A = matrix {{x,0,x*z},{z,y,x^2},{x^2,y,z}} B = matrix {{2*x,3,y*z},{z^4,1,z^3},{y^2,x,y}} C = matrix table(3,3,(i,j)->random(i+j,R)) A^4 A+B D=A*C U=exteriorPower(2,A) transpose B rank A trace A toString D