import numpy as np
m = np.array([[1,2],[3,4]])
print("Original matrix:")
print(m)
result = np.linalg.inv(m)
print("Inverse of the said matrix:")
print(result)
Sample Output:
Original matrix:
[[1 2]
[3 4]]
Inverse of the said matrix:
[[-2. 1. ]
[ 1.5 -0.5]]
Sample Output:
need an explanation for this answer? contact us directly to get an explanation for this answer