In [1]:
import numpy as np
import matplotlib.pyplot as plt

%matplotlib inline
In [2]:
a1 = np.array([[-1, 1], [-1, -1]])

det = a1[0][0] * a1[1][1] - a1[1][0] * a1[0][1]
print(det)
2
In [3]:
det = np.linalg.det(a1)
print(det)
2.0