To write a python program to find the Eigenvalues and Eigen Vectors
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
import the numpy package
Get the input matrix.
Using the np.linalg.eig(), we get two results (first is eigenvalue and second is eigenvector) of the given matrix.
Print the result
#Program to find the eigen values and eigen vectors.
#Developed by: PRAVEEN S
#RegisterNumber: 22009017
import numpy as nv
a=nv.array([[2,2],[1,3]])
val,vector=nv.linalg.eig(a)
print("Eigen values are",val,"and Eigen Vectors are",vector)
Thus the Eigenvalue and Eigenvector is successfully solved using python programming