Download as pdf or txt
Download as pdf or txt
You are on page 1of 1

8/22/23, 3:59 PM CLASS 7 AUG 5 SEM 3 - Jupyter Notebook

CLASS 7
EIGEN VALUES
1.compute: (lambda)I
2.compute: (lambda)I - A
3.equate: det((lambda)I - A)=0

In [2]:

import numpy as np
D1=np.matrix([[1,2,3],[3,4,5],[5,6,7]])
print("The matrix D1= ",D1)

The matrix D1= [[1 2 3]


[3 4 5]
[5 6 7]]

In [3]:

eigen_values= np.linalg.eigvals(D1)
print("The eigen values of the matrix D is: ",eigen_values)

The eigen values of the matrix D is: [ 1.29282032e+01 -9.28203230e-01 7.58


225307e-16]

INVERSE OF A MATRIX
D1**-1

In [5]:

Inverse=np.linalg.inv(D1)
print("The inverse of the matrix D1 is: ",Inverse)

The inverse of the matrix D1 is: [[-1.18515780e+15 2.37031559e+15 -1.18515


780e+15]
[ 2.37031559e+15 -4.74063119e+15 2.37031559e+15]
[-1.18515780e+15 2.37031559e+15 -1.18515780e+15]]

In [ ]:

localhost:8888/notebooks/CLASS 7 AUG 5 SEM 3.ipynb 1/1

You might also like