eigenvalue and eigenvectors in python vs matlab
I have noticed there is a difference between how matlab calculates the eigenvalue and eigenvector of a matrix, where matlab returns the real valued while numpy's return the complex valued eigen valus and vector. For example: for matrix: A= 1 -3 3 3 -5 3 6 -6 4 Numpy: w, v = np.linalg.eig(A) w array([ 4. +0.00000000e+00j, -2. +1.10465796e-15j, -2. -1.10465796e-15j]) v array([[-0.40824829+0.j , 0.24400118-0.40702229j, 0.24400118+0.40702229j], [-0.40824829+0.j , -0.41621909-0.40702229j, -0.41621909+0.40702229j], [-0.81649658+0.j , -0.66022027+0.j , -0.66022027-0.j ]]) Matlab: [E, D] = eig(A) E -0