I want to find the eigen vector for a matrix. I am using the numpy.linalg.eig library in python. The output obtained from this command is not giving eigen vector in the vector form.
x = np.array([[0, 1], [-2, -3]])
val, vec=np.linalg.eig(x)
vec
gives the output array([[ 0.70710678, -0.4472136 ], [-0.70710678, 0.89442719]])
. And hence vec[0]
and vec[1]
are [ 0.70710678, -0.4472136 ]
and [-0.70710678, 0.89442719]
respectively.(These are not the eigen vectors for this matrix).
The eigen vectors for this matrix are [0.70710678,-0.70710678]
and [-0.4472136, 0.89442719]
.(which cannot be obtained from vec[0]
or vec[1]
as it is the transpose). How to get the actual eigen vectors from vec
variable?