To write a python program to find the Eigenvalues and Eigen Vectors
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
importing numpy
get the values in variable A
Using the np.linalg.eig(), we get two results (first is eigenvalue and second is eigenvector) of the given matrix.
print the output
#Program to find the eigen values and eigen vectors.
#Developed by: Thilakeshwaran
#RegisterNumber : 23013560
import numpy as np
A=[[-2,2,-3],[2,1,-6],[-1,-2,0]]
values,vectors=np.linalg.eig(A)
print("Eigen values are",values,"and Eigen Vectors are",vectors)
Thus the Eigenvalue and Eigenvector is successfully solved using python program