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 module to use the built-in function for calculation.
Prepare the lists from each linear equation and assign in np.array().
using the np.linalg.matrix_rank(),we can find the solution.
End the program
#Program to find the eigen values and eigen vectors.
#Developed by: VINNUSH KUMAR L S
#RegisterNumber:23012349
import numpy as np
a=np.array([[2,-3,0],[2,-5,0],[0,0,3]])
#eig()fun return two values(value,vector)
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