Comparing determinant and product of eigenvalues of a matrix

import numpy as np A = np.array([ [2,18,5,6], [17,6,15,11], [11,7,6,12], [4,9,11,6] ]) determinant = np.linalg.det(A) product_eigvals = np.prod(np.linalg.eigvals(A)) print(determinant, product_eigvals.real) # 8875.0 8875.0 print(np.abs(determinant - product_eigvals) < 1**-12) # True