I want to compute the determinant of a 2*2 matrix , and I use linalg.det from Numpy like this:
import numpy as np
a = np.array([
[1,2],
[3,4]
])
b=np.linalg.det(a)
In other hand, We know that we also can compute it by a multiplication and a subtract like this:
1*4 - 2*3 = -2
But when I set b equal to -2 :
b == -2
It returns false.
What is the problem here? And How can I fix it?