A=matrix([[3, 0, 3, -5], [1, -1, 1, -1], [-2, -1, 4, -2], [2, 1, -1, -1]]) show("det(A)=", A.det()) B=matrix([[3, 0, 3, -5], [1, -1, 1, -1], [-2, -1, 4, -2], [2, 1, -1, 1]]) show("det(B)=", B.det()) show("B^{-1}=", B.inverse()) # Sage computes the inverse in the bigger ring ... show("B^*=", B.adjugate()) show("test vztahu:", B.inverse()*B.det()-B.adjugate()) B=matrix(RR, [[3, 0, 3, -5], [1, -1, 1, -1], [-2, -1, 4, -2], [2, 1, -1, 1]]) show("det(B)=", B.det()) show("B^{-1}=", B.inverse()) # Sage computes the inverse in the bigger ring ... show("B^*=", B.adjugate()) show("test vztahu:", B.inverse()*B.det()-B.adjugate())