from sympy import * print("\n--- a: -------------------------------") A = Matrix([ [5, 4], [2, 1] ]) pprint(det(A)) print("\n--- b: -------------------------------") A = Matrix([ [1, 3, 6], [0, 5, 4], [-1, 2, 1] ]) pprint(det(A))