In [1]:
import numpy as np
In [2]:
w,v = np.linalg.eig(np.array([[1,-2], [2,-3]]))
In [6]:
print w
In [7]:
print v
In [ ]:
"""
To find the eigenvalue (x) of a square matrix (A), multiply x by the identity matrix then subtract from A.
Next, find the determinant of this matrix. Setting this equation equal to 0 gives you the eigenvalues. Repeat
the first step, substituting one of the eigenvalues for x to get a new matrix (B). Use the rows of B as independent
equations equal to 0 to find the eigenvector.
"""