import numpy as np
def inverse_2_2(A):
a = A[0][0]
b = A[0][1]
c = A[1][0]
d = A[1][1]
det = a*d - b*c
if det == 0:
return (False)
else:
return(1/det*np.array([[d,-b],[-c,a]]))
A = np.array([[0,0], [0,9]])
print(inverse_2_2(A))
To embed this project on your website, copy the following code and paste it into your website's HTML: