To write a python program to find the Eigenvalues and Eigen Vectors
- Hardware – PCs
- Anaconda – Python 3.7 Installation / Moodle-Code Runner
we have imported numpy which is needed.
we have created a matrix using np.array with different values in it.
Using the np.linalg.eig(), we get two results (first is eigenvalue and second is eigenvector) of the given matrix.
finally,print the values of the eigen values and eigen vectors.
Developed by: RITHISH P
RegisterNumber:212223230173
import numpy as np
A=np.array([[2,-3,0],[2,-5,0],[0,0,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