import numpy as np
a1=np.array([[1,2,3],[1,2,3]])
a2=np.array([[1,0,1],[1,1,3]])
a1,a2,a1+a2
a1=np.array([[1,2,3],[1,2,3]])
a2=np.array([[1,0,1],[1,1,3]])
a1,a2,a1*a2
a1=np.array([[1,2,3],[1,2,3]])
a2=np.array([[1,0],[1,1],[0,1]])
a1,a2,np.dot(a1,a2)
a=np.array([1,2,3])
b=np.array([1,1,2])
np.dot(a,b)
a=np.array([[1,2,3],[2,2,1],[3,4,3]])
a.transpose()
a=np.array([[1,2,3],[2,2,1],[3,4,3]])
np.linalg.inv(a)
a=np.array([[1,2,3],[2,2,1],[3,4,3]])
np.linalg.det(a)
a=np.array([[1,2,3],[2,2,1],[3,4,3]])
np.linalg.det(a) *np.linalg.inv(a)
a=np.array([[1,2,3],[2,2,1],[3,4,3]])
np.linalg.matrix_rank(a)
import numpy as np
import scipy
a = np.array([[0,1,3,1,-1], [1,-1,3,-4,2], [1,1,-1,2,1],[1,0,-1,0,1],[1,0,0,0,0]])
b = np.array([1,3,0,2,4])
x = np.linalg.solve(a, b)
x
A = np.array([[0,1],[-1,0]])
a,b = np.linalg.eig(A)
a,b
A = np.array([[0,-1,-1],[-1,0,-1],[-1,-1,0]])
a,b = np.linalg.eig(A)
a,b