A=matrix(QQ, 3, 3, [1, 1, 2, 2, 3, 3, 4, 4, 5])
Ai=A.inverse()
print Ai
print "det(A)=", A.det()
print "det(A^(-1))=", Ai.det()
print 1/A.det()==Ai.det() #checking the theorem
|
[ -1 -1 1]
[-2/3 1 -1/3]
[ 4/3 0 -1/3]
det(A)= -3
det(A^(-1))= -1/3
True
[ -1 -1 1]
[-2/3 1 -1/3]
[ 4/3 0 -1/3]
det(A)= -3
det(A^(-1))= -1/3
True
|