Created
June 24, 2022 13:51
-
-
Save YHaruoka/02c3191dda777410687d9b04ea398477 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
matrix1 = np.array([[3, 4], | |
[1, 1]]) | |
matrix1_inv = np.linalg.inv(matrix1) | |
print(matrix1_inv) | |
print(np.dot(matrix1,matrix1_inv)) | |
matrix2 = np.array([[1, 1, 2], | |
[3, -1, 2], | |
[2, 1, 1]]) | |
matrix2_inv = np.linalg.inv(matrix2) | |
print(matrix2_inv) | |
print(np.dot(matrix2,matrix2_inv)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment