In [1]:
import numpy as np

In [2]:
w,v = np.linalg.eig(np.array([[1,-2], [2,-3]]))

In [6]:
print w


[-0.99999998 -1.00000002]

In [7]:
print v


[[ 0.70710678  0.70710678]
 [ 0.70710678  0.70710678]]

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.

"""