To write a python program to find the Eigenvalues and Eigen Vectors
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
Import numpy as np.
Assign np.array() in eigen values and eigen vectors.
Using the np.linalg.eig(), we get two results (first is eigenvalue and second is eigenvector) of the given matrix.
Print both the values and vectors, then end the program.
#Program to find the eigen values and eigen vectors.
#Developed by: ARUN KUMAR SUKDEV CHAVAN
#RegisterNumber:2208531
import numpy as np
A=np.array([[2,2],[1,3]])
values,vectors=np.linalg.eig(A)
print("Eigen values are {} and Eigen Vectors are {}".format(values,vectors))
Thus the Eigenvalue and Eigenvector is successfully solved using python program