Created
October 11, 2018 12:40
-
-
Save Francis-Lee-Earth/033126b2a94611ba9daa58436a7e7ffe to your computer and use it in GitHub Desktop.
Matrix Inverse
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 | |
a = np.array([ | |
[1, -2, -1], | |
[2, -1, 1], | |
[3, -6, -5] | |
]) | |
a_inv = np.linalg.inv(a) | |
print("A:") | |
print(a) | |
print() | |
print("Inverse:") | |
print(a_inv) | |
print() | |
print("Identities:") | |
print(a.dot(a_inv)) | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment