To write a python program to find the Eigenvalues and Eigen Vectors
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
Step 3: Using the np.linalg.eig(), we get two results (first is eigenvalue and second is eigenvector) of the given matrix.
import numpy as np A=np.array([[-2,2,-3],[2,1,-6],[-1,-2,0]]) Eigen_Values,Eigen_Vectors=np.linalg.eig(A) print("Eigen values are",Eigen_Values,"and Eigen Vectors are",Eigen_Vectors)
Thus the Eigenvalue and Eigenvector is successfully solved using python program